IoT into the Wild
41
9.4 Battery Information
Please note the counter number. After 20 packets, it will follow one special packet with
battery info.
You can either ignore this packet or get rid of the battery info in your code.
Original Info:
00070064000500010610B45F0000010710A41F00003259
Battery Package: 00070064000500
Example:
Battery & Soil Moisture and Temperature Sensor(S2104) measurement packet:
00070064000500010610B45F0000010710A41F00003259
00 is the channel number.
0700 is 0x0007 ( little-endian byte order ) ,
which is the measurement ID for battery.
6400 is 0x0064
(
little-endian byte order
)
,
whose equivalent decimal value is 100.
Battery level is 100%.
0500 is 0x0005( little-endian byte order),
whose equivalent decimal value is 5. Upload
interval is 5 minutes.
01 is the channel number.
0610 is 0x1006
(
little-endian byte order
)
,
which is the measurement ID for soil
temperature.
B45F0000is actually 0x00005FB4, whose
equivalent decimal value is 24500. Divide it by
1000, and you will get the actual
measurement value for soil temperature as
24.5
℃
.