#1 Can complicated integration of sensors and LNS be made super easy?
#2 How to make super easy integration of sensors and LNS?
Working for 10+ years in IoT we witnessed very tech-orientated and complicated integrations. The LoRaWAN community made it much easier, however, it is still an IoT-believers world. One of our missions is flexible integration and customization of our services to bring value to customers. In this post, we demonstrate a simple step-by-step tutorial on setting up the LoRaWAN network server (LNS) on the ChirpStack platform and connecting sensors. Hopefully, it will help with the demystification of IoT.
Chirpstack allows us to fully control our LoRa network servers and ensure security and data privacy so it is very suitable for private networks.
The server was set up on Docker software. Docker will let us create a network server in an easy and fast way. To ensure the scalability of integrations with different customers, we set up the LoRa network server on the Docker platform.
This blog covers the most important points of setting up a ChirpStack server and device connection, for more details please refer to the links attached at the bottom of this blog.
ChirpStack provides an example of a docker-compose.yml file that you can use as a starting point. This example can be found at https://github.com/brocaar/chirpstack-docker and also contains more documentation.
After using the starting point example from ChirpStack we have to set up a network server on the Docker platform.
When using the above example, it means that you must enter chirpstack-network-server:8000 as the network-server hostname: IP.
The next step is to connect our gateway to our new ChirpStack server. First, we have to set up the Packet-forwarder and gateway bridge.
In our case, we used Mikrotik EU 868 Gateway. In our previous projects, it proved to be a cost-effective and reliable solution.
The packet-forwarder that is configured on your gateway must forward its data to the ChirpStack Gateway Bridge. As it controls the LoRa chipset of the gateway, it also must be configured for the correct frequencies. A mismatch in frequencies means that the gateway will not receive uplinks sent by a device and/or is unable to send downlink payloads when the downlink frequency is outside the configured frequency range. Usually, gateway vendors provide configuration examples for various bands.
ChirpStack Gateway Bridge
The ChirpStack Gateway Bridge must be configured with the correct packet-forwarder backend. To find out more in-depth how to set up a gateway bridge check links at the bottom of the blog.
Adding Applications and Devices
After our gateway is connected and running, we can create an application to which we will also add our desired device. Devices we add will need to be configured the same way as on other server platforms. For configuration, we need information about connectivity and device keys. We only use OTAA connectivity with our devices so that’s how we connected our Senstick to the Chirpstack as well.
Under the ‘’codec tab’’ in device profiles, we can also add the decoder for the device.
Did it help?
For us it did. We would also love your feedback if the proposed tutorial made it easier for your project.
Sources used in this blog and links for help more in-depth: