Tag Archives: Lorawan

LT-W208 LoraWAN Soil NPK Sensor node Connect to Dragino gateway and ChirpStack

Overview

LT-W208  LoraWAN Soil NPK Sensor node is powered by battery, with long battery life, no wiring, and convenient construction.Useing the LoraWAN spread spectrum technology which Products are widely used in the field of smart farming. this document shows a basic idea about LT-W208  LoraWAN Soil NPK Sensor node Connect to Dragino gateway and ChirpStack.

1.Connect via LAN port with direct connection from PC ,Power on the gateway, access the gateway with the url( 10.130.1.1) in the browser( Access via WiFi AP network http:// IP_ADDRESS:8000 ), click LORA, and select correct frequency plan and frequency band mask. The default frequency band mask is: 1 . click Save & Apply .

2. Select the LORANWAN configuration interface to set the NS address of the gateway. We use The CHIRPSTACK server as example for the test, so select CUSTOM and select it according to the real server address.  Record the GATEWAY EUI information. click Save & Apply.

3. Log in to the ChirpStack server Enter the IP address and port, enter the user name and password, and click Login .

4. Add a LORAWAN gateway. Click Gateways and CREATE to enter the gateway EUI, which is the gateway EUI shown in the pictures below. 

5. Add an app Click Applications and click CREATE to add an app. 

6. Click Add Application, add device, click CREATE to add device name.

7. Device Description DEVEUI of device, select the corresponding frequency band, and click Add Device, as shown in picture below.  AU915 communication is not very stable, which may be related to the frequency band. It is recommended to disable the frame count verification function. 

8. Add APPKEY, enter APPKEY parameter in Application Key, and click SET device-keys.

9. Click DEVICE DATA to view the DATA.

10. DECODE Example

function Decode(fPort, bytes, variables) {

  var paramLength = bytes[2]/2;

  var params = new Object();

  for(var i=0;i<paramLength;i++)

  {

    params[“param”+i] = bytes[3+i*2]*256+bytes[4+i*2];

  }

  return params;

}

DECODER

function decodeUplink(input) {
var params = new Object();
params[“N”] = input.bytes[23]256+input.bytes[24]

params[“P”] = input.bytes[25]256+input.bytes[26]
params[“K”] = input.bytes[27]256+input.bytes[28]

params[“BAT”] = (input.bytes[29]256+input.bytes[30])/1000
return {
data: params
};
}

TTN Device Hardware options

Brand: stmicroelectronics Model: nucleo-wl55jc1 Hardware version: 1.0 Firmware version: 1.0

TTN Decoder

function decodeUplink(input) {
var params = new Object();
params[“N”] = input.bytes[23]256+input.bytes[24]
params[“P”] = input.bytes[25]256+input.bytes[26]
params[“K”] = input.bytes[27]256+input.bytes[28]
params[“BAT”] = (input.bytes[29]256+input.bytes[30])/1000
return {
data: params
};
}