LoRaWAN Commands and Responses
The device has LoRaWAN 1.0.2 certification. The device uses the LoRaWAN Firmware Management Protocol Specification TS006-1.0.0. These specifications control how the device reports the battery level and the version data.
Device Status Request / Response
The network server sends a device status request (DevStatusReq) two times in each 24 hours. MQcentral uses the answer to fill the battery life field.
The raw value is also in the Output Profile in the BatteryLevel field. This value is available when an uplink contains the DevStatusAns.
To change the raw value to a percent, divide the raw value by 2.54.
Example: Output Profile with BatteryLevel
{
"Time": "2022-06-21T17:18:22.524Z",
"DecoderType": "",
"DevEUI": "27D5223AAB819B9A",
"DevAddr": "45810E29",
"FPort": "1",
"FCntUp": "31",
"ADRbit": "1",
"ACKbit": "",
"MessageType": "4",
"FCntDn": "30",
"payload_hex": "00fc",
"decoded_payload": {
"RawData": "00fc"
},
"mic_hex": "47c0bdf0",
"GatewayRSSI": "-85.000000",
"GatewaySNR": "8.750000",
"SpreadingFactor": "7",
"SubBand": "G0",
"Channel": "LC1",
"GatewayCount": "1",
"GatewayID": "B43E13B9",
"Late": "0",
"GatewayLAT": "0.000000",
"GatewayLON": "0.000000",
"BatteryLevel": "254",
"GatewayList": [
{
"GatewayID": "B43E13B9",
"GatewayRSSI": "-85.000000",
"GatewaySNR": "8.750000",
"GatewayESP": "-85.543648"
}
]
}
Device Version Request / Response
The device sends a device version response (DevVersionAns) on port 203 at startup and every 15 days. You can send a device version request at any time.
Example: DevVersionAns Decode
This example payload comes from an MQflex 9s device. The SKU and Device Code fields identify the device model.
Payload: 01002d000003007e0f
| Field | Decode | Raw Hex |
|---|---|---|
| CID | DevVersionAns | 01 |
| Firmware Version (Big Endian) | 0.42.0 | 00 2d 00 |
| Reserved | - | 00 |
| Bootloader Minor Version | 3 | 03 |
| Board and Module Version | Reserved Nibble: 0000b. Board Version: 00b. Module Version: 00b | 00 |
| SKU | Reading 9s | 7e |
| Device Code | MQFlex | 0f |
What's Next?
- MQPS and Other Data Reporting - Packet format, sensor readings, configuration, reset reasons, and join reasons.
- Sensor Operation - Supported sensors, sensor reporting, sensor operation, data caching, and battery depassivation.
- DFU Instructions - Update the device firmware with nRF Connect for Mobile.