EasyManua.ls Logo

Dragino LSN50 - Page 18

Dragino LSN50
60 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
www.dragino.com
LSN50 LoRa Sensor Node User Manual 18 / 60
2.3.5 Decode payload in The Things Network
While using TTN network, you can add the payload format to decode the payload.
The payload decoding function is as follows:
function Decoder(bytes, port) {
// Decode an uplink message from a buffer
// (array) of bytes to an object of fields.
if(bytes[6] & 0x10)
{
var mod4="3DS18B20"; //work mode
}
else if(bytes[6] & 0x08)
{
var mod3="3ADC"; //work mode

Related product manuals