แพ็คเก็ต Chirpstack 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 และ (RE) เริ่มบริการ:
sudo systemctl restart chirpstack-packet-multiplexer
การสร้าง Chirpstack Packet Multiplexer ต้องการ:
Nix ใช้สำหรับการตั้งค่าสภาพแวดล้อมการพัฒนาที่ใช้สำหรับการพัฒนาในท้องถิ่นและสำหรับการสร้างไบนารี
หากคุณไม่ได้ติดตั้ง NIX และไม่ต้องการติดตั้งคุณยังสามารถทำซ้ำสภาพแวดล้อมการพัฒนาได้โดยการติดตั้งแพ็คเกจที่แสดงใน shell.nix ด้วยตนเอง
Docker ถูกใช้โดย Cross-Rs สำหรับการคอมไพล์ข้ามรวมถึงคำสั่ง make บางส่วน
เรียกใช้คำสั่งต่อไปนี้เพื่อเริ่มการพัฒนาเชลล์:
nix-shellดำเนินการคำสั่งต่อไปนี้เพื่อเรียกใช้การทดสอบ:
make testดำเนินการคำสั่งต่อไปนี้เพื่อสร้าง Chirpstack Packet Multiplexer Binaries และแพ็คเกจ:
# 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 Packet Multiplexer เป็น Chirpstack Packet Multiplexer ดูประกาศเปลี่ยนชื่อสำหรับข้อมูลเพิ่มเติม
Chirpstack Packet Multiplexer มีการแจกจ่ายภายใต้ใบอนุญาต MIT ดูใบอนุญาตด้วย