MQTT Messages

Output Topics

Node Joined
lora/<DEV-EUI>/joined
Uplink packet received – duplicates removed and packet is authenticated
lora/<DEV-EUI>/up
Packet received – duplicates are not removed and packet is not-authenticated
lora/<DEV-EUI>/packet_recv
Packet sent – a packet has been sent to the radio to be transmitted
lora/<DEV-EUI>/packet_sent
Queue full
lora/<DEV-EUI>/queue_full

Input Topics

Downlink packet – schedule a packet to be sent to node on next uplink
lora/<DEV-EUI>/down {“data”:”<BASE64-DATA>”,”ack”:false,”port”:1}
Clear queue – clear the downlink queue for a node
lora/<DEV-EUI>/clear

Message Format

Semtech Packet Forwarder Protocol
LoRaWAN 1.0

Packet forwarder message format

Name | Type | Function
:----:|:------:|--------------------------------------------------------------
time | string | UTC time of pkt RX, us precision, ISO 8601 'compact' format
tmst | number | Internal timestamp of "RX finished" event (32b unsigned)
freq | number | RX central frequency in MHz (unsigned float, Hz precision)
chan | number | Concentrator "IF" channel used for RX (unsigned integer)
rfch | number | Concentrator "RF chain" used for RX (unsigned integer)
stat | number | CRC status: 1 = OK, -1 = fail, 0 = no CRC
modu | string | Modulation identifier "LORA" or "FSK"
datr | string | LoRa datarate identifier (eg. SF12BW500)
datr | number | FSK datarate (unsigned, in bits per second)
codr | string | LoRa ECC coding rate identifier
rssi | number | RSSI in dBm (signed integer, 1 dB precision)
lsnr | number | Lora SNR ratio in dB (signed float, 0.1 dB precision)
size | number | RF packet payload size in bytes (unsigned integer)
data | string | Base64 encoded RF packet payload, padded

Additional info added by network server to up packets

{ ...
"data": "YWxzZGtqZg==",
"mhdr": "4006000000000100",
"opts": "",
"port": 1,
"seqn": 1,
"size": 12,
"timestamp": "2016-10-10T15:17:21.190132Z",
... }

  • data – Decrypted payload (BASE64)
  • mhdr – LoRaWAN packet header (HEX)
  • opts – MAC commands (HEX)
  • port – Application port
  • seqn – Packet sequence number
  • size – Size of “data” field
  • timestamp – time packet was received by network server