Edge devices are equipped with the LR1110 chip, that allows for communication with a LoRaWAN network. The LoRaWAN messages that are being send by the device are an output of specific device routines. Different routines output different LoRaWAN messages. Different LoRaWAN messages are being send on different LoRaWAN ports. The LoRaWAN messages are called payloads and are encrypted by the LoRaWAN protocol. The LoRaWAN server is responsible for decryption of the LoRaWAN payloads. After the payload decryption has been done by the LoRaWAN server, a decoder is used to turn the payload into readable data. The same goes for messages that are send to the device. The LoRaWAN server is responsible for encrypting the payloads before sending them via a LoRaWAN gateway to the device.
Messages that are send by the device to the LoRaWAN server are called Uplink messages. Messages that are send by the LoRaWAN server to the device are called Downlink messages.
We will provide an overview of all valid uplink and downlink messages.
Edge devices are able to send the different LoRaWAN messages. Each message type is associated with specific port.
The following ports and message types are supported:
Message | Port | ID | msg | Description | Lenght |
---|---|---|---|---|---|
LP GPS | 1 | 0x90 | msg_lr_messaging | ||
Ublox GPS | 2 | 0xF2 | msg_ublox_gps | 32 | |
Settings | 3 | Downlink port to accept messages with new settings | |||
Status | 4 | 0xF4 | msg_status | Status message. | 16 |
LP GPS satellite data | 5 | 0xF5 | msg_lr_sat_data | Message, containing satellite data, used in GNSS LR position fix. | 252 |
WiFi scan aggregated | 6 | 0xF7 | msg_wifi_scan_aggregated | Message containing top-3 scanned WiFi results. | 252 |
BLE scan aggregated | 7 | 0xF9 | msg_ble_scan_aggregated | Message containing top-3 scanned BT results. | 252 |
RF scan | 8 | 0xFB | msg_rf_scan | 252 | |
Ublox GPS satellite data | 9 | 0xF6 | msg_ublox_satellites | Message, containing satellite data, used in Ublox position fix. | 252 |
WiFi single scan | 10 | 0xF8 | msg_wifi_scan | Message containing scanned WiFi results from single scan. | 252 |
BLE single scan | 11 | 0xFA | msg_bt_scan | Message containing all results from single BT scan. | 252 |
Fence | 12 | 0x92 | msg_fence | Message containing the measurements from the Electric Fence module | 252 |
Ublox GPS - short | 13 | 0x93 | msg_ublox_location_short | 16 | |
Flash status | 14 | 0x94 | msg_flash_status | 7 | |
CMDQ | 15 | 0xFC | msg_cmdq | Message containing all results from the CMDQ scan data capture. It is an array that may have multiple scan results. | 252 |
Memfault | 27 | 0x91 | msg_memfault_chunks | 252 | |
Messaging | 28 | 0x90 | msg_lr_messaging | 252 | |
Flash logs | 29 | 0xFF | msg_read_flash | Message with flash logs | 252 |
Port values | 30 | Uplink port to to respond with requested variable values | 252 | ||
Port messages | 31 | Uplink port to respond with predefined messages (eg. last know position) | 252 | ||
Commands | 32 | Downlink port to accept messages with commands | 252 | ||
Modem-E message | 199 | Modem-E traffic |
Please use the decoder that matches your firmware version. Newer decoders are usually backward compatible.
Different LoRaWAN servers have slightly different ways of implementing the decoder. The difference comes from the way the payload data and port information is loaded into the Javascript decoder. Addition note for Chirpstack users: from Chirpstack version 4, there is a breaking change in how the decoder is loading the payload data. Fortunately there is a simple action to make the general decoder compatible again. Please be aware of this and use the correct decoder for your LoRaWAN server.
With each firmware release, changes may be needed to the decoder. Please ensure you use the correct decoder, matching the firmware version of your Edge device.
Example:
8QIACA==
f1020008
{
"nav_payload": "08"
}
Example:
8h4BAAAQAOakDR+XEA4DoMsAAAMILwAEjGFoZQAAAAA=
f21e0100001000e6a40d1f97100e03a0cb000003082f00048c61686500000000
{
"latitude": 52.0987878,
"longitude": 5.1253399,
"altitude": 52.128,
"success": 1,
"hot_retry": 0,
"cold_retry": 0,
"ttf": 16,
"fixType": 3,
"SIV": 8,
"h_acc_est": 47,
"pDOP": 4,
"fix_time": 1701339532,
"active_t": 0
}
Example:
9A4EAKAAlQB/f3IURFUAAA==
f40e0400a00095007f7f721444550000
{
"reset": 4,
"bat": 4100,
"chg": 0,
"temp": 16.862745098039213,
"uptime": 0,
"locked": 0,
"msg": 0,
"acc_x": -0.39215686274509665,
"acc_y": -0.39215686274509665,
"acc_z": -10.588235294117652,
"lr_sat": 0,
"err_lr": 0,
"err_lr_join": 0,
"err_ble": 0,
"err_ublox": 0,
"err_acc": 0,
"err_bat": 0,
"err_ublox_fix": 0,
"err_flash": 0,
"ver_fw_major": 4,
"ver_fw_minor": 4,
"ver_hw_major": 1,
"ver_hw_minor": 4,
"ver_hw_type": 5,
"ver_fw_type": 5,
"sat_support": 0,
"sat_try": 0,
"rf_scan": 0,
"fence": 0
}
Example:
9QEA
f50100
{
"N_sat": 0,
"N_reported": 0
}
Example:
9xwGaP97OQFBYmhlAB2qMgFBYmhlYDKxKQFBYmh
f71c0668ff7b390141626865001daa3201416268656032b1290141626865
{
"1": {
"rssi": -71,
"count": 1,
"mac": "7b:ff:68",
"t": 1701339713
},
"2": {
"rssi": -78,
"count": 1,
"mac": "aa:1d:0",
"t": 1701339713
},
"3": {
"rssi": -87,
"count": 1,
"mac": "b1:32:60",
"t": 1701339713
},
"N_wifi_res": 6
}
Example:
+S4Uge0MRAGvZGhlslUJQwGvZGhljmoJPgGvZGhlZHogPAGuZGhllFy6OAGvZGhl
f92e1481ed0c4401af646865b255094301af6468658e6a093e01af646865647a203c01ae646865945cba3801af646865
{
"1": {
"rssi": -60,
"count": 1,
"mac": "c:ed:81",
"t": 1701340335
},
"2": {
"rssi": -61,
"count": 1,
"mac": "9:55:b2",
"t": 1701340335
},
"3": {
"rssi": -66,
"count": 1,
"mac": "9:6a:8e",
"t": 1701340335
},
"4": {
"rssi": -68,
"count": 1,
"mac": "20:7a:64",
"t": 1701340334
},
"5": {
"rssi": -72,
"count": 1,
"mac": "ba:5c:94",
"t": 1701340335
},
"N_BT_res": 20
}
Example:
+w4BAL4jYCIA/whhyl0A/w==
fb0e0100be23602200ff0861ca5d00ff
{
"version": 1,
"should_alert": 0,
"band_8": {
"start": 915,
"stop": 880,
"peak_count": 0,
"max_rssi": -255
},
"band_wifi_bt": {
"start": 2484,
"stop": 2401,
"peak_count": 0,
"max_rssi": -255
}
}
Example:
9j0KCRIGZgABCBwFPAABByUsPwABURMEAgECTRYHwwACTCMxrQACSyI3NwACShQHHAACQxQQMgECQhJDRQEC
f63d0a091206660001081c053c000107252c3f00015113040201024d1607c300024c2331ad00024b22373700024a14071c0002431410320102421243450102
{
"1": {
"id": 9,
"cn0": 18,
"ele": 6,
"azi": 102,
"con": "GPS"
},
"2": {
"id": 8,
"cn0": 28,
"ele": 5,
"azi": 60,
"con": "GPS"
},
"3": {
"id": 7,
"cn0": 37,
"ele": 44,
"azi": 63,
"con": "GPS"
},
"4": {
"id": 81,
"cn0": 19,
"ele": 4,
"azi": 258,
"con": "GLONASS"
},
"5": {
"id": 77,
"cn0": 22,
"ele": 7,
"azi": 195,
"con": "GLONASS"
},
"6": {
"id": 76,
"cn0": 35,
"ele": 49,
"azi": 173,
"con": "GLONASS"
},
"7": {
"id": 75,
"cn0": 34,
"ele": 55,
"azi": 55,
"con": "GLONASS"
},
"8": {
"id": 74,
"cn0": 20,
"ele": 7,
"azi": 28,
"con": "GLONASS"
},
"9": {
"id": 67,
"cn0": 20,
"ele": 16,
"azi": 306,
"con": "GLONASS"
},
"10": {
"id": 66,
"cn0": 18,
"ele": 67,
"azi": 325,
"con": "GLONASS"
},
"N_sat": 10,
"N_reported": 10
}
Example:
+DcGaP97OQFBYmhlAB2qMgFBYmhlYDKxKQFBYmhlshWiMQFBYmhl+pK/KwFBYmhl9JK/LQFBYmhl
f8370668ff7b390141626865001daa3201416268656032b1290141626865b215a2310141626865fa92bf2b0141626865f492bf2d0141626865
{
"1": {
"rssi": -71,
"count": 1,
"mac": "7b:ff:68",
"t": 1701339713
},
"2": {
"rssi": -78,
"count": 1,
"mac": "aa:1d:0",
"t": 1701339713
},
"3": {
"rssi": -87,
"count": 1,
"mac": "b1:32:60",
"t": 1701339713
},
"4": {
"rssi": -79,
"count": 1,
"mac": "a2:15:b2",
"t": 1701339713
},
"5": {
"rssi": -85,
"count": 1,
"mac": "bf:92:fa",
"t": 1701339713
},
"6": {
"rssi": -83,
"count": 1,
"mac": "bf:92:f4",
"t": 1701339713
},
"N_wifi_res": 6
}
Example:
+lWvZGhlFIHtDESyVQlDjmoJPmR6IDyUXLo4/FbQOBv8xjSMEhkzhdo/Mjg5VDHkO98xfqvGMdB0nStWb3YrcN5dK4QT0ColgrUqpfpqKNrhFifxS/8n
fa55af6468651481ed0c44b25509438e6a093e647a203c945cba38fc56d0381bfcc6348c12193385da3f3238395431e43bdf317eabc631d0749d2b566f762b70de5d2b8413d02a2582b52aa5fa6a28dae11627f14bff27
{
"1": {
"rssi": -60,
"mac": "c:ed:81"
},
"2": {
"rssi": -61,
"mac": "9:55:b2"
},
"3": {
"rssi": -66,
"mac": "9:6a:8e"
},
"4": {
"rssi": -68,
"mac": "20:7a:64"
},
"5": {
"rssi": -72,
"mac": "ba:5c:94"
},
"6": {
"rssi": -72,
"mac": "d0:56:fc"
},
"7": {
"rssi": -76,
"mac": "c6:fc:1b"
},
"8": {
"rssi": -77,
"mac": "19:12:8c"
},
"9": {
"rssi": -78,
"mac": "3f:da:85"
},
"10": {
"rssi": -79,
"mac": "54:39:38"
},
"11": {
"rssi": -79,
"mac": "df:3b:e4"
},
"12": {
"rssi": -79,
"mac": "c6:ab:7e"
},
"13": {
"rssi": -85,
"mac": "9d:74:d0"
},
"14": {
"rssi": -85,
"mac": "76:6f:56"
},
"15": {
"rssi": -85,
"mac": "5d:de:70"
},
"16": {
"rssi": -86,
"mac": "d0:13:84"
},
"17": {
"rssi": -86,
"mac": "b5:82:25"
},
"18": {
"rssi": -88,
"mac": "6a:fa:a5"
},
"19": {
"rssi": -89,
"mac": "16:e1:da"
},
"20": {
"rssi": -89,
"mac": "ff:4b:f1"
},
"N_BT_res": 20,
"t": 1701340335
}
Example:
kgYAAAAAAAA=
9206000000000000
{
"success": 0,
"N": 0,
"voltage": 0,
"energy": 0
}
Example:
kw75Y2hlq6UNH44JDgMVAA==
930ef9636865aba50d1f8e090e031500
{
"fix_timestamp": 1701340153,
"latitude": 52.0988075,
"longitude": 5.1251598,
"h_acc_est": 21
}
Example:
lAUAEAAAAA==
94050010000000
{
"percentage": 0,
"n_msg": 16
}
Example:
/BxW9bllAAAAAAAGSA/wC/a5ZQAAAAAABkgP8A==
fc1c56f5b965000000000006480ff00bf6b965000000000006480ff0
{
"0": {
"cmdq_Active_Min_In_Last_Hour": 0,
"cmdq_Activity_Average": 0,
"cmdq_Activity_Max": 0,
"cmdq_H_Impedance": 4080,
"cmdq_RR_Median_Modesum": 0,
"cmdq_RR_Meridian": 0,
"cmdq_Raw_Temp": 1608,
"cmdq_Temp": 21.7884,
"cmdq_timestamp": 1706685782
},
"1": {
"cmdq_Active_Min_In_Last_Hour": 0,
"cmdq_Activity_Average": 0,
"cmdq_Activity_Max": 0,
"cmdq_H_Impedance": 4080,
"cmdq_RR_Median_Modesum": 0,
"cmdq_RR_Meridian": 0,
"cmdq_Raw_Temp": 1608,
"cmdq_Temp": 21.7884,
"cmdq_timestamp": 1706685963
}
}
Example:
kA0Kc21hcnRwYXJrcwEB
900d0a736d6172747061726b730101
{
"len": 13,
"msg_len": 10,
"msg": {
"0": 115,
"1": 109,
"2": 97,
"3": 114,
"4": 116,
"5": 112,
"6": 97,
"7": 114,
"8": 107,
"9": 115
},
"seq": 1,
"retry": 1
}
Example:
DZMOPGNoZfyhDR99Fg4DDABDY2hlDZMO+WNoZaulDR+OCQ4DFQAAZGhlDZMOumRoZTajDR8NFA4DEwDCZGhlDZMOeGVoZWGlDR/gFA4DFgCBZWhlDZMON2ZoZcOkDR/1Eg4DEQA/ZmhlDZMO9GZoZZmjDR+BEg4DEQD8ZmhlDZMOsWdoZd+jDR/MEg4DDgC3Z2hlDZMObWhoZd+kDR+bEQ4DEAB0aGhlDZMOKmloZXamDR+iDw4DDgAxaWhlDZMO5mloZc6kDR+LEA4DEADtaWhl
0D930E3C636865FCA10D1F7D160E030C00436368650D930EF9636865ABA50D1F8E090E031500006468650D930EBA64686536A30D1F0D140E031300C26468650D930E7865686561A50D1FE0140E031600816568650D930E37666865C3A40D1FF5120E0311003F6668650D930EF466686599A30D1F81120E031100FC6668650D930EB1676865DFA30D1FCC120E030E00B76768650D930E6D686865DFA40D1F9B110E031000746868650D930E2A69686576A60D1FA20F0E030E00316968650D930EE6696865CEA40D1F8B100E031000ED696865
{
"1": {
"data": {
"fix_timestamp": 1701339964,
"latitude": 52.0987132,
"longitude": 5.1254909,
"h_acc_est": 12
},
"fPort": 13,
"timestamp": 1701339971
},
"2": {
"data": {
"fix_timestamp": 1701340153,
"latitude": 52.0988075,
"longitude": 5.1251598,
"h_acc_est": 21
},
"fPort": 13,
"timestamp": 1701340160
},
"3": {
"data": {
"fix_timestamp": 1701340346,
"latitude": 52.0987446,
"longitude": 5.1254285,
"h_acc_est": 19
},
"fPort": 13,
"timestamp": 1701340354
},
"4": {
"data": {
"fix_timestamp": 1701340536,
"latitude": 52.0988001,
"longitude": 5.1254496,
"h_acc_est": 22
},
"fPort": 13,
"timestamp": 1701340545
},
"5": {
"data": {
"fix_timestamp": 1701340727,
"latitude": 52.0987843,
"longitude": 5.1254005,
"h_acc_est": 17
},
"fPort": 13,
"timestamp": 1701340735
},
"6": {
"data": {
"fix_timestamp": 1701340916,
"latitude": 52.0987545,
"longitude": 5.1253889,
"h_acc_est": 17
},
"fPort": 13,
"timestamp": 1701340924
},
"7": {
"data": {
"fix_timestamp": 1701341105,
"latitude": 52.0987615,
"longitude": 5.1253964,
"h_acc_est": 14
},
"fPort": 13,
"timestamp": 1701341111
},
"8": {
"data": {
"fix_timestamp": 1701341293,
"latitude": 52.0987871,
"longitude": 5.1253659,
"h_acc_est": 16
},
"fPort": 13,
"timestamp": 1701341300
},
"9": {
"data": {
"fix_timestamp": 1701341482,
"latitude": 52.0988278,
"longitude": 5.1253154,
"h_acc_est": 14
},
"fPort": 13,
"timestamp": 1701341489
},
"10": {
"data": {
"fix_timestamp": 1701341670,
"latitude": 52.0987854,
"longitude": 5.1253387,
"h_acc_est": 16
},
"fPort": 13,
"timestamp": 1701341677
}
}
All settings and commands that can be controlled with the Smart Parks Connect App using Bluetooth, are also available via LoRaWAN Downlinks to the devices.
The Edge firmware responds to messages to change settings and it responds to message with commands to execute specific tasks. Settings and Command messages are send on different ports. To illustrate the difference: settings messages are used to change settings and command messages are used to get the current settings.
port 3
port 32
Detailed information about all the available settings and commands can be found in this section:
The Edge devices by default are set to use Over-the-Air Activation (OTAA) Device Provisioning. This means the device will try to JOIN a LoRaWAN network using it's Device EUI (DevEUI
) and Application Key (AppKey
). Only when the device has completed a successful JOIN procedure, it will start to send device uplink messages with application data like GNSS position updates. The Edge devices will try to JOIN a LoRaWAN network on the predefined Rejoin interval (default = 1 hour) for a 10 times. When the device can not complete the JOIN procedure, it will try again after the Rejoin interval has passed.