chirpstack-tutorial/doc/1-gateway/1-gateway-bridge.md

62 lines
1.6 KiB
Markdown

# Gateway Bridge
Get the ChirpStack GPG key:
```sh
# https://superuser.com/a/1773782
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1CE2AFD36DBCCA00 && \
gpg --export 1CE2AFD36DBCCA00 | sudo tee /etc/apt/trusted.gpg.d/chirpstack.gpg >/dev/null && \
gpg --batch --yes --delete-keys 1CE2AFD36DBCCA00
```
This avoids using the deprecated `apt-key` command listed on the ChirpStack site.
Add the source at:
```conf
echo "deb https://artifacts.chirpstack.io/packages/4.x/deb stable main" | sudo tee /etc/apt/sources.list.d/chirpstack.list
```
Update and install:
```conf
sudo apt update
sudo apt install chirpstack-gateway-bridge
```
See the following message:
```none
---------------------------------------------------------------------------------
The configuration file is located at:
/etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
Some helpful commands for chirpstack-gateway-bridge:
Start:
$ sudo systemctl start chirpstack-gateway-bridge
Restart:
$ sudo systemctl restart chirpstack-gateway-bridge
Stop:
$ sudo systemctl stop chirpstack-gateway-bridge
Display logs:
$ sudo journalctl -f -n 100 -u chirpstack-gateway-bridge
---------------------------------------------------------------------------------
```
Edit `/etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml` to match the port that the packet forwarder is using (1730 instead of 1700):
```toml
upd_bind = "0.0.0.0:1730"
```
Add/change some values:
```toml
event_topic_template="us915_1/gateway/{{ .GatewayID }}/event/{{ .EventType }}"
command_topic_template="us915_1/gateway/{{ .GatewayID }}/command/#"
````