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許可證分配的。另請參閱許可證。