Appendix Ii: Sensor Data Format - Advantech WISE-1510 User Manual

M2.com lora iot node
Hide thumbs Also See for WISE-1510:
Table of Contents

Advertisement

Appendix II: Sensor Data Format

In the sample application, node_get_sensor_data() encodes sensor data according to
the following format:
,where
Length: Total TLV length
MsgType: Fixed as 0xc
one or more Tag-Length-Values: tag matches with gateway's setting,
Multiple
TLVs are
length is sensor data length, and value is sensor data. All octets are in hexadecimal.
For example, LoRa Payload Field setting on WISE-3610 is as below:
If temperature is 25.55 Celsius degree, translate decimal 2555 to hexadecimal 9FB.
Similarly, if humidity is 60.55%, translate from decimal 6055 to hexadecimal 17A7.
The encoded data will be
0x9 | 0xc | 0x1 | 0x3 | 0x1 | 0x9 | 0xFB | 0x2 | 0x2 | 0x17 | 0xA7
, where
0x9: the Total TLV length, included two TLVs
0xc: the fixed MsgType
0x1 | 0x3 | 0x1 | 0x9 | 0xFB: the first TLV with tag id (0x1), value length (0x3), and
positive (0x1) value (0x9FB)
0x2 | 0x2 | 0x17 | 0xA7: the second TLV with tag id (0x2), value length (0x2), and
unsigned value (0x17A7)
Be reminded temperature "Sign" setting is On, 1 extra byte is required to indicate (0
means negative, and 1 means positive) , but humidity "Sign" setting on gateway is Off,
so no extra 1 byte is required.
Users are free to define their own payload field format, but only sensor data encoded
according to the above format can be decoded successfully, and displayed on LoRa
Dashboard on WISE-3610.
WISE-1510 User Manual
43

Advertisement

Table of Contents
loading

Table of Contents