Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy ChirpStack in docker-compose

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces how to deploy ChirpStack in docker-compose, the content is very detailed, interested friends can use for reference, I hope it can be helpful to you.

About LoraWan Server

Before you talk about LoraWan Server, you need to understand the LoraWan protocol. LoraWan is a long-distance transport protocol of the Internet of things. To quote an official introduction, the LoRaWAN open specification is a low-power wide area network (LPWAN) protocol based on LoRa technology.

The protocol stack also refers to the official diagram:

How is the data sent from the sensor to the server and processed by the corresponding application? You can take a look at the following picture, which is still from the government:

The top one is the sensor, and then the data is transmitted to the gateway through the LoraWan protocol, which transmits to the network server (NS) through the network, and the NS distributes the data to the corresponding application server (AS).

Take Chestnut: the hand sanitizer box and tissue box in a smart toilet are equipped with LoraWan sensors, and the equipment is provided by two manufacturers. They upload the surplus data (how much soap liquid / how many paper towels are left) to the network server (including the part of the gateway transmission, of course), and the network server distributes the data of the tissue box to the application server of the tissue box manufacturer. Distribute the soap box data to the soap box manufacturer's application server.

In this way, under the premise that everyone follows the LoraWan protocol, we can achieve the situation of vendor neutrality. I can find a manufacturer who conforms to the LoraWan specification to replace any kind of device, and there is no need to worry about the locking problem of the manufacturer.

In this process, web servers play a very important role. Let's take a look at what open source web servers are currently available.

Open source LoraWan Server

Currently, there are three main open source LoraWan Server:

Chirpstack

Lorawan-server

Ttn

ChirpStack and ttn are Golang implementations, and lorawan-server is Erlang implementations.

I have only come into contact with the first two, this article only talks about chirpStack, which is also the LoraWanServer technology stack that we are using. I have tried the deployment of ttn, and the ease of getting started is not as good as that of chirpStack, so I did not continue to study ttn.

Deploy ChirpStack

The deployment of ChirpStack is fairly simple, and here we use the docker-compose deployment as an example.

Download the source code

Git clone https://github.com/brocaar/chirpstack-docker.git

Deploy with docker-compose

> cd chirpstack-docker > docker-compose up-d

Here is an output after I executed the deployment command:

[root@node123 chirpstack-docker] # docker-compose up-dWARNING: The Docker Engine you're using is running in swarm mode.Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.To deploy your application across the swarm, use `docker stack deploy`.Creating network "chirpstack-docker_default" with the default driverCreating chirpstack-docker_chirpstack-gateway-bridge_1... DoneCreating chirpstack-docker_chirpstack-geolocation-server_1... DoneCreating chirpstack-docker_chirpstack-network-server_1... DoneCreating chirpstack-docker_mosquitto_1... DoneCreating chirpstack-docker_redis_1... DoneCreating chirpstack-docker_chirpstack-application-server_1... DoneCreating chirpstack-docker_postgresql_1... Done

Now open IP:8080 and you should see the Application Server page that comes with ChirpStack. My IP here is 192.168.3.123. When you open it, you can see the login page:

The default account password is admin/admin, and being able to log in indicates that the deployment is successful.

Of course, the sensor data cannot be received at this time (referring to the configuration problem of the network server). The default frequency band is EU868. We need to use CN_470_510 in China. Change the network_server.band in the configuration/chirpstack-network-server/chirpstack-network-server.toml file to CN_470_510.

[network_server.band] name= "CN_470_510"

Comment out the following network_server.network_settings configuration:

[network_server.network_settings] # [[network_server.network_settings.extra_channels]] # frequency=867100000# min_dr=0# max_dr=5# [[network_server.network_settings.extra_channels]] # frequency=867300000# min_dr=0# max_dr=5# [[network_server.network_settings.extra_channels]] # frequency=867500000# min_dr=0# max_dr=5# [[network_server.network_settings.extra_channels]] # frequency=867700000# Min_dr=0# max_dr=5# [[network_server.network_settings.extra_channels]] # frequency=867900000# min_dr=0# max_dr= 5` that's all about how to deploy ChirpStack in docker-compose. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report