Keep-alive
How to decode the keep-alive packet and how to set new keep-alive period
Last updated
How to decode the keep-alive packet and how to set new keep-alive period
Last updated
Periodically sent message which contains the most important device data.
The data is described in Table 3. In Table 4 example packet is given.
Table 3
Table 4
Sets the period of the device keep-alive command messages. See table 5 for details.
Table 5
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. In most of cases, min. allowed period is 3 minutes and recommended values are 10 minutes or greater.
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.
Example command sent from server: 0x12;
Example command response: 0x1209 β Device keep-alive period is 9 minutes.
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 0x00 isnβt applicable. Default value: 0x03.
Byte index
Bit index
Sent request
Received response
0
-
12 β The command code.
12 β The command code.
1
-
XX β device keep-alive period in minutes.
Payload index
Value
Meaning
0
01
Command byte for this packet.
1
XX
sAQI bits 8:1 β sAQI[8:1].
2
XX
Bit 7
sAQI bit 0 β sAQI[0]. Result value is calculated as:
Bits 6:2
AQI bits 4:0 β AQI[4:0]. Result value is calculated as:
Bits 1:0
CO2eq bits 9:8 β CO2eq[9:8].
3
XX
CO2eq bits 7:0 β CO2eq[7:0]. Result value is calculated as:
4
XX
VOC bits 7:0 β VOC[7:0]. Result value is calculated as:
5
XX
6
XX
Pressure data, bits 10:3 β P[10:3].
7
XX
Bits 7:5
Pressure data, bits 2:0 β P[2:0]. Result value is calculated as:
Bits 4:0
Temperature data, bits 10:6 β T[10:6].
8
XX
Bits 7:2
Temperature data, bits 5:0 β T[5:0]. Result value is calculated as:
XX
Bits 1:0
Air quality related parameters accuracy:
0: Sensor data is unreliable (Sensor stabilization);
1: Low accuracy, to reach higher accuracy please expose sensor
once to good air (for about hour) and bad air for auto-
trimming;
2: Medium accuracy: auto-trimming ongoing;
3: High accuracy.
9
XX
Payload index
Value
Meaning
0
01
Command byte for this packet.
1
07
sAQI[8:1] = 0x07.
2
A4
Bit 7
sAQI[0] = 0x01.
Bits 6:2
Bits 1:0
CO2eq[9:8] = 0x00.
3
4C
CO2eq[7:0] = 0x4C
4
03
5
53
6
C9
P[10:3] = 0xC9.
7
A9
Bits 7:5
P[2:0] = 0x05
Bits 4:0
Temperature data, bits 10:6 β T[10:6].
8
E3
Bits 7:2
Temperature data, bits 5:0 β T[5:0]
Bits 1:0
Air quality related parameters accuracy: 3
9
CD
Relative humidity data. Relative humidity,
Device battery voltage.
Relative humidity,