This article will guide you how to integrate Milesight IoT sensors/nodes to ChirpStack server. Please ensure the gateway is online on ChirpStack followed article How to Connect Milesight LoRaWAN Gateway to ChirpStack. Click here for more information about how to install ChirpStack.
- Milesight LoRaWAN Sensors/Nodes
- ChirpStack Server (server frequency should be the same as gateway and sensors)
Step 1. Add Service Profile
Go to Service-Profiles page and click +CREATE to create a service profile. You can keep all settings by default.
Step 2. Add Device Profile
1. Go to Device-Profiles page and click +CREATE to create a device profile according to the join type and class type of your sensors.
2. If join-type is OTAA, go to JOIN(OTAA/ABP) tab to enable Device supports OTAA.
If device class type is Class B/Class C, go to CLASS-B/CLASS-C tab to enable Class B/Class C.
3. Go to CODEC tab to add decoders of sensors/nodes as required. If you use Milesight sensors, click here to find corresponding sensor decoders and copy to ChirpStack.
Note: Function header sould be function Decode(fPort, bytes).
Step 3. Add an Application
Go to Applications page and click +CREATE to create an application.
Step 4. Add a Device
1. Go to Applications page and click the application you create in last step, click +CREATE to add a new device.
2. Type the basic information of the device, including device EUI.
There are two types of joining network: OTAA and ABP.
Join in OTAA mode
- Select OTAA device profile, then click CREATE DEVICE.
- After creating the device, fill in the Application Key of LoRaWAN sensors/nodes, click SET DEVICE-KEYS to save the configurations.
Join in ABP mode
- Select ABP device profile, then click CREATE DEVICE.
- After creating the device, fill in the Device Address, Network session key and Application session key of the sensor/node, click ACTIVATE DEVICE to save the configurations.
Step 5. Check Device Data
Go to LoRaWAN FRAMES tab to check if node joins the network and send uplink data.
Go to DEVICE DATA to check the details of received packets.
Step 6. Battery Level Request via MAC Commands (Optional)
1. Select the service profile and change the Device-status request frequencyto any positive value, then enable the Report device battery level to application-server.
2. Reboot the sensor. After sensor joining the network, you can check the battery level under Application page.