Manual install of gateway bridge on Raspberry Pi

After installing the complete OS image of the full Chrispstack stack on a Raspberry Pi with RAK2243 shield I’m trying to manually move everything to a different Raspberry Pi running Raspbian OS and a full set of IoT tools. Installing and running network and application servers was quite straightforward. However, gateway-bridge is a different story. I’ve been unable to find in the docs how to install concentratord and the rest of SX1301 config and init scripts. Only the gateway-bridge install seem to be handled by the docs so I’ve been trying to pick up the config files and init scripts from my first working install and move them to my manual setup. I also copied chirpstack-concentratord-sx1301 to /usr/bin/. At the end, I’m always getting this result:

pi@home-server:~ $ sudo systemctl status chirpstack-gateway-bridge.service
● chirpstack-gateway-bridge.service - ChirpStack Gateway Bridge
Loaded: loaded (/lib/systemd/system/chirpstack-gateway-bridge.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-04-10 17:20:55 CEST; 16min ago
Docs: https://www.chirpstack.io/
Main PID: 476 (chirpstack-gate)
Tasks: 7 (limit: 2200)
Memory: 10.6M
CGroup: /system.slice/chirpstack-gateway-bridge.service
└─476 /usr/bin/chirpstack-gateway-bridge

Apr 10 17:36:46 home-server chirpstack-gateway-bridge[476]: time=“2020-04-10T17:36:46+02:00” level=error msg=“backend/concentratord: event socket dial error” error="dial event api url error: zmq4: could not dial to "ipc:///tmp/concentratord_event": dial unix /tmp/concentratord_event: connect: no such file or direct

Last two lines from tail -n 100 -f /var/log/messages:

Apr 10 17:20:57 home-server chirpstack-gateway-bridge[476]: time=“2020-04-10T17:20:57+02:00” level=info msg=“starting ChirpStack Gateway Bridge” docs=“Introduction - ChirpStack open-source LoRaWAN<sup>®</sup> Network Server” version=3.8.0
Apr 10 17:20:57 home-server chirpstack-gateway-bridge[476]: time=“2020-04-10T17:20:57+02:00” level=info msg=“backend/concentratord: setting up backend” command_url=“ipc:///tmp/concentratord_command” event_url=“ipc:///tmp/concentratord_event”

Contents of /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.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.
> 
> 
> [general]
> # debug=5, info=4, warning=3, error=2, fatal=1, panic=0
> log_level=4
> 
> # Log to syslog.
> #
> # When set to true, log messages are being written to syslog.
> log_to_syslog=true
> 
> 
> # Gateway backend configuration.
> [backend]
> # Backend type.
> type="concentratord"
> 
>   # ChirpStack Concentratord backend.
>   [backend.concentratord]
> 
>   # Check for CRC OK.
>   crc_check=true
> 
>   # Event API URL.
>   event_url="ipc:///tmp/concentratord_event"
> 
>   # Command API URL.
>   command_url="ipc:///tmp/concentratord_command"
> 
> 
> # Integration configuration.
> [integration]
> # Payload marshaler.
> #
> # This defines how the MQTT payloads are encoded. Valid options are:
> # * protobuf:  Protobuf encoding (this will become the LoRa Gateway Bridge v3 default)
> # * json:      JSON encoding (easier for debugging, but less compact than 'protobuf')
> marshaler="protobuf"
> 
>   # MQTT integration configuration.
>   [integration.mqtt]
>   # Event topic template.
>   event_topic_template="gateway/{{ .GatewayID }}/event/{{ .EventType }}"
> 
>   # Command topic template.
>   command_topic_template="gateway/{{ .GatewayID }}/command/#"
> 
>   # 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://127.0.0.1:1883"
> 
>     # Connect with the given username (optional)
>     username=""

And contents of /etc/default/chirpstack-concentratord

> # reset the LoRa concentrator on Concentratord start
> CONCENTRATOR_RESET="yes"
> 
> # reset pin
> CONCENTRATOR_RESET_PIN=17
> 
> # power enable pin
> CONCENTRATOR_POWER_EN_PIN=18
> 
> # concentratord version
> CONCENTRATORD_VERSION="sx1301"

I understand the recommendation of relying on a full OS image for Raspberry Pi instead of taking the manual way. I simply wanted to know whether there is a documented procedure somewhere. By the way, thanks so much @brocaar for sharing this marvelous work with the rest of the community.

Have a nice day.

2 Likes