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-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article is to share with you about how to deploy ChirpStack in docker-compose, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

1. Git (optional, you can download the source code first)

2. Docker

3. Docker-compose

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:

1. [chirpstack] https://www.chirpstack.io/

2. [lorawan-server] https://github.com/gotthardp/lorawan-server)

3. [ttn] https://github.com/TheThingsNetwork/ttn

`chirpStack` and `ttn` are Golang implementations, and `chirpStack` is Erlang implementations.

I have only been in contact with the first two. This article only talks about chirpStack, which is also the LoraWanServer technology stack we are using. I have tried the deployment of `ttn`, and it is not as easy to use as chirpStack, so I have not continued to study `ttn`.

Deploy ChirpStack

The deployment of ChirpStack is quite simple. Here we use `docker- compose` deployment as an example.

1. Download the source code

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

two。 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-dCreating 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 can see the Application Server page that comes with ChirpStack. My IP here is `192.168.3.123`. After opening it, you can see the login page:

The default account password is `account admin`. If you can log in, the deployment is successful.

Of course, sensor data cannot be received at this time (referring to the configuration of the network server). The default frequency band is `EU868`. In China, we need to use `network_ server.toml`. 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` and above is how to deploy ChirpStack in docker-compose The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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