Technical building blocks
gtbdecode
LoRaWAN Payload Decoder & Encoder
Decode and encode a LoRaWAN payload — 900+ TTN devices, Cayenne LPP, hex/base64. Downloadable TTN v3 / ChirpStack v4 codec.
- lorawan
- ttn
- chirpstack
- encoder
- downlink
- hex
- base64
spaces and 0x accepted
Select a device, paste your payload,
then click Decode.
Understanding LoRaWAN — encode & decode
Get the codec without decoding a frame
Select your device, then expand the “Get the ready-to-use codec” accordion. You get the manufacturer's payload formatter in two variants: TTN v3 (ready for The Things Stack) or ChirpStack v4 (wrapped for the TR013 runtime). The file includes decodeUplink, and encodeDownlink if the vendor provides it.
Encoding a downlink: what is it for?
Configure a LoRaWAN device without going through the Network Server console: send a setpoint ("set valve on"), change a reporting interval, trigger a test command, request a position on demand. The tool builds the binary payload from a structured object, ready to paste into your NS downlink interface (TTN, ChirpStack, Loriot, Actility…).
How do I find the fPort?
The fPort (1 to 223) identifies the message type at application level. Many
manufacturers use only one (often 1, 2, 10, 85 or 100). Others use several to
distinguish sensor data, alarms and configuration acknowledgements. Check the device
datasheet, or look at the f_port field of your frame.
Where do I get or send the payload?
On ChirpStack: frmPayload field (base64) or data in MQTT JSON. On The Things Stack: uplink_message.frm_payload. On Loriot or Actility
ThingPark: payload_hex field. In Niagara: nFrame object of the LoRaWAN driver. For a
downlink, most NS expect the encoded payload as base64 or hex.
My device is not in the list?
Many generic devices use the Cayenne LPP format (selectable at the top of the list, decoder only). Otherwise, you can contribute to the TTN catalogue with a PR following the contribution guide — the repo is manually resynced on each OpenGTB update.
Encoder coverage
Not all TTN codecs expose the encodeDownlink function.
In our catalogue, about half of the devices have an encoder, and ~399 devices also provide clickable downlink examples (Netvox,
Milesight, Decentlab, Tektelic…). For the others, the "Encode downlink" tab is
automatically disabled.
Codecs from TheThingsNetwork/lorawan-devices under the Apache-2.0 license.
Supported LoRaWAN decoders and encoders
Decode and encode a LoRaWAN payload for MClimate Vicki, Milesight AM102, Milesight WT101, Dragino LHT65, Adeunis Comfort CO2, Enless TX Pulse 600, Cayenne LPP, Netvox, Decentlab, Tektelic, Aquascope. LoRaWAN downlink encoder, set valve on, position on demand, set target temperature, reset device, and over 900 references from the TTN lorawan-devices repo.