Keep-alive
Keep-alive command explanation
Periodically sent message which contains the most important device data.
For this device, the default keep-alive period is 240 minutes.
The data is described in Table 2. In Table 3 example packet is given.
Byte index | Bit index | Meaning |
---|---|---|
0 | - | Command byte for this packet. |
1 | - | Battery voltage, [mV] = XX * 8 + 1600. |
2 | 7:4 | Reserved. |
2 | 3 | The measured temperature: 1: Is negative; 0: Is positive. |
2 | 2 | Thermistor operational status: 1: Thermistor connection is broken; 0: The thermistor is connected. |
2 | 1:0 | Thermistor temperature data, bits [9:8]. |
3 | 7:0 | Thermistor temperature data, bits [7:0]. The measurement resolution is 0.1 °C. t,[°C]= 10 T[9:0]. |
4 | - | Event counter Unsigned value, range 0 – 16,777,215. Bits[23:16] |
5 | - | Bits [15:8] |
6 | - | Bits [7:0] |
7 | 7:1 | Reserved. |
0 | Sensor status: 1: Open; 0: Closed. |
Table 2
Payload index | Value, [hex] | Bit index | Meaning |
---|---|---|---|
0 | 01 | - | Keep-alive |
1 | AB | - | Battery voltage, [mV] = 171 * 8 + 1600 = 2968. |
2 | 00 | 7:4 | Reserved. |
3 | The measured temperature. 0: Is positive. | ||
2 | Thermistor operational status. 0: The thermistor is connected. | ||
1:0 | Thermistor temperature data, bits [9:8] is 0. | ||
3 | D9 | - | Thermistor temperature data, bits [7:0] t = D9 / 10 = 217 / 10 = 21.7 °C. |
4 | 1B | - | Count, [HEX]: 1B5CAE. The hex value convert to decimal =>1 793 198. Bits[23:16] |
5 | 5C | - | Bits [15:8] |
6 | AE | - | Bits [7:0] |
7 | 01 | 7:1 | Reserved. |
1 | Sensor status. 1: Open. |
Table 3
Set keep-alive period command explanation
Sets the period of the device keep-alive command messages. See table 4 for details.
Byte index | Bit index | Hex value – Meaning |
---|---|---|
0 | - | 02 – The command will set the device keep-alive period. |
1 | - | XX – keep-alive period in minutes. Value 00 isn’t applicable. Default value: 240min. |
Table 4
Example command, [Hex]: 020A
The example sets the keep-alive period to 10 minutes.
Note that the keep-alive period must respect the LoRaWAN messages duty cycle limitations. Otherwise the message will be sent when this is allowed. Also, the bigger keep-alive period, the less battery discharge.
Get keep-alive period command explanation
This command is used to get the device keep-alive command messages period. Server sends the command code and the response is sent from the device together with next keep-alive command. The sent command request and the received command response are described in Table 6. The keep-alive in the response is omitted for clarity.
Byte index | Sent request, [hex] | Received response, [hex] |
---|---|---|
0 | 12 – The command code. | 12 – The command code. |
1 | XX – device keep-alive period in minutes. |
Table 5
Example command sent from server, [Hex]: 12;
Example command response, [Hex]: 120A – Device keep-alive period is 10 minutes.
Last updated