Chirpstack Packet Multiplexerを使用すると、SemTech UDP Packet-Forwarderプロトコルを使用して複数のサーバーにゲートウェイを接続することができ、サーバーをアップリンクのみとしてマークするオプションがあります。
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 chirpstack-packet-multiplexer/chirpstack-packet-multiplexer.tomlにある構成ファイルを更新し、(再)サービスを開始します。
sudo systemctl restart chirpstack-packet-multiplexer
Chirpstackパケットマルチプレクサの構築には次のことが必要です。
NIXは、現地開発やバイナリの作成に使用される開発環境のセットアップに使用されます。
Nixがインストールされておらず、インストールを希望しない場合は、 shell.nixにリストされているパッケージを手動でインストールして、開発環境を再現することもできます。
Dockerは、Cross-RSでクロスコンパイルと、 makeコマンドの一部に使用されます。
開発シェルを開始するには、次のコマンドを実行します。
nix-shell次のコマンドを実行してテストを実行します。
make test次のコマンドを実行して、Chirpstackパケットマルチプレクサバイナリとパッケージを構築します。
# Only build binaries
make build
# Build binaries + distributable packages.
make distchirpstack-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
上記の例では、 chirpstack-packet-multiplexer.tomlファイルを含むconfigという名前のローカル構成ディレクトリがあることを前提としています。
gateway_id_prefixesが空の場合に備えて、すべてのゲートウェイを前方に進みます。このリリースは、Lora Packet MultiplexerをChirpstack Packet Multiplexerに変更します。詳細については、名前変更アナウンスを参照してください。
Chirpstackパケットマルチプレクサは、MITライセンスの下で配布されます。ライセンスも参照してください。