Please note that the chirpstack-gateway-bridge is a single binary, that you can execute multiple times. It takes a -c argument for the configuration file. What you probably want to do is create multiple Systemd services, each per region.
I always get an error trying to start a second service. I have even tried to call a duplicate of /usr/bin/chirpstack-gateway-bridge and it still won’t let me start the second service.
Both services work if I only start either of them. They have their own config files as well.
Hello, can you share your .toml file with the regions and the .service or tell me how you made it work for you?
It gives me an error when trying to run both services.
I created two bridge.toml for the regions I require but I don’t know why I can’t get it to work.
I would appreciate if you could help me with this problem.
Thanks, I’m trying. I created a v4 test server with docker and it works perfectly for me, but when I wanted to migrate the production server I got errors, so I was trying to make it work in chirpstack v3 by creating the services with the regions that I would use.
I think one important point is that you have to connect the different gateway bridges to different UDP ports.
here are the two toml files I am using, one for AS923-3 the other one for EU868. They are quite standard, but, as mentioned, they are listening to different UDP ports.
I can’t attach them as files, there are quite strict limitations for file attachments.
EU868.toml:
# This configuration provides a Semtech UDP packet-forwarder backend and
# integrates with a MQTT broker. Many options and defaults have been omitted
# for simplicity.
#
# See https://www.chirpstack.io/gateway-bridge/install/config/ for a full
# configuration example and documentation.
# Gateway backend configuration.
[backend]
# Backend type.
type="semtech_udp"
# Semtech UDP packet-forwarder backend.
[backend.semtech_udp]
# ip:port to bind the UDP listener to
#
# Example: 0.0.0.0:1700 to listen on port 1700 for all network interfaces.
# This is the listener to which the packet-forwarder forwards its data
# so make sure the 'serv_port_up' and 'serv_port_down' from your
# packet-forwarder matches this port.
udp_bind = "0.0.0.0:1701"
# Integration configuration.
[integration]
# Payload marshaler.
#
# This defines how the MQTT payloads are encoded. Valid options are:
# * protobuf: Protobuf encoding
# * json: JSON encoding (easier for debugging, but less compact than 'protobuf')
marshaler="protobuf"
# MQTT integration configuration.
[integration.mqtt]
# Event topic template.
event_topic_template="eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}"
# event_topic_template="gateway/{{ .GatewayID }}/event/{{ .EventType }}"
# Command topic template.
command_topic_template="eu868/gateway/{{ .GatewayID }}/command/#"
# command_topic_template="gateway/{{ .GatewayID }}/command/#"
# State topic template
state_topic_template="eu868/gateway/{{ .GatewayID }}/state/{{ .StateType }}"
# MQTT authentication.
[integration.mqtt.auth]
# Type defines the MQTT authentication type to use.
#
# Set this to the name of one of the sections below.
type="generic"
# Generic MQTT authentication.
[integration.mqtt.auth.generic]
# MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
server="tcp://mosquitto:1883"
# Connect with the given username (optional)
username="eu868"
# Connect with the given password (optional)
password=""
and my AS923-3 toml:
# This configuration provides a Semtech UDP packet-forwarder backend and
# integrates with a MQTT broker. Many options and defaults have been omitted
# for simplicity.
#
# See https://www.chirpstack.io/gateway-bridge/install/config/ for a full
# configuration example and documentation.
# Gateway backend configuration.
[backend]
# Backend type.
type="semtech_udp"
# Semtech UDP packet-forwarder backend.
[backend.semtech_udp]
# ip:port to bind the UDP listener to
#
# Example: 0.0.0.0:1700 to listen on port 1700 for all network interfaces.
# This is the listener to which the packet-forwarder forwards its data
# so make sure the 'serv_port_up' and 'serv_port_down' from your
# packet-forwarder matches this port.
udp_bind = "0.0.0.0:1700"
# Integration configuration.
[integration]
# Payload marshaler.
#
# This defines how the MQTT payloads are encoded. Valid options are:
# * protobuf: Protobuf encoding
# * json: JSON encoding (easier for debugging, but less compact than 'protobuf')
marshaler="protobuf"
# MQTT integration configuration.
[integration.mqtt]
# Event topic template.
event_topic_template="as923_3/gateway/{{ .GatewayID }}/event/{{ .EventType }}"
# event_topic_template="gateway/{{ .GatewayID }}/event/{{ .EventType }}"
# Command topic template.
command_topic_template="as923_3/gateway/{{ .GatewayID }}/command/#"
# command_topic_template="gateway/{{ .GatewayID }}/command/#"
# State topic template
state_topic_template="as923_3/gateway/{{ .GatewayID }}/state/{{ .StateType }}"
# MQTT authentication.
[integration.mqtt.auth]
# Type defines the MQTT authentication type to use.
#
# Set this to the name of one of the sections below.
type="generic"
# Generic MQTT authentication.
[integration.mqtt.auth.generic]
# MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
server="tcp://mosquitto:1883"
# Connect with the given username (optional)
username=""
# Connect with the given password (optional)
password=""