CHIRPSTACK数据包多路复用器使使用Semtech UDP数据包 - 弗罗德罗协议将网关连接到多个服务器成为可能,并且可以选择将服务器标记为上行链路。
Chirpstack提供了与Debian / Ubuntu Apt软件包系统兼容的存储库。首先确保安装了dirmngr和apt-transport-https :
sudo apt install apt-transport-https dirmngr
设置此新存储库的关键:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1CE2AFD36DBCCA00
通过创建一个新文件,将存储库添加到存储库列表中:
sudo echo "deb https://artifacts.chirpstack.io/packages/4.x/deb stable main" | sudo tee /etc/apt/sources.list.d/chirpstack.list
更新APT软件包缓存并安装chirpstack-packet-multiplexer :
sudo apt update
sudo apt install chirpstack-packet-multiplexer
要完成安装,请更新位于/etc/chirpstack-packet-multiplexer/chirpstack-packet-multiplexer.toml和(re)启动服务的配置文件:
sudo systemctl restart chirpstack-packet-multiplexer
构建Chirpstack数据包多路复用器需要:
NIX用于设置用于本地开发和创建二进制文件的开发环境。
如果您没有安装NIX并且不想安装它,则还可以通过安装shell.nix中列出的软件包来复制开发环境。
Cross-Rs使用Docker进行交叉编译以及一些make 。
运行以下命令来启动开发外壳:
nix-shell执行以下命令运行测试:
make test执行以下命令来构建Chirpstack数据包多路复用器二进制文件和软件包:
# Only build binaries
make build
# Build binaries + distributable packages.
make dist运行chirpstack-packet-multiplexer --help 。
执行chirpstack-packet-multiplexer configfile返回以下配置模板:
# Logging settings.
[ logging ]
# Log level.
#
# Valid options are:
# * TRACE
# * DEBUG
# * INFO
# * WARN
# * ERROR
level = " info "
# Multiplexer configuration.
[ multiplexer ]
# Interface:port of UDP bind.
#
# This this is the interface:port on which the Multiplexer will receive
# data from the gateways.
bind = " 0.0.0.0:1700 "
# Servers to forward gateway data to.
#
# Example configuration:
# [[multiplexer.server]]
# # Hostname:port of the server.
# server="example.com:1700"
# # Only allow uplink.
# #
# # If set to true, any downlink will be discarded.
# uplink_only=false
# # Gateway ID prefix filters.
# #
# # If not set, data of all gateways will be forwarded. If set, only data
# # from gateways with a matching Gateway ID will be forwarded.
# #
# # Examplex:
# # * "0102030405060708/32": Exact match (all 32 bits of the filter must match)
# # * "0102030400000000/16": All gateway IDs starting with "01020304" (filter on 16 most significant bits)
# gateway_id_prefixes=[]
# Monitoring configuration.
[ monitoring ]
# Interface:port.
#
# If set, this will enable the monitoring endpoints. If not set, the endpoint
# will be disabled. Endpoints:
#
# * /metrics: Exposes Prometheus metrics.
bind = " " services:
chirpstack-packet-multiplexer:
image: chirpstack/chirpstack-packet-multiplexer:4.0.0-test.2
command: -c /etc/chirpstack-packet-multiplexer/chirpstack-packet-multiplexer.toml
ports:
- 1700:1700/udp
volumes:
- ./config:/etc/chirpstack-packet-multiplexer
上面的示例假设您有一个名为config的本地配置目录,该目录包含一个chirpstack-packet-multiplexer.toml文件。
gateway_id_prefixes是空的。此版本将Lora数据包多路复用器重命名为Chirpstack数据包多路复用器。有关更多信息,请参见重命名公告。
Chirpstack数据包多路复用器是根据MIT许可证分配的。另请参阅许可证。