Installing OS v4.5.0 on RAK7268V2 - Forwarder not running

Hi,

I installed the Gateway OS v4.5.0 on a RAK7268V2, using the file

chirpstack-gateway-os-4.5.0-rak7268v2-ramips-mt76x8-rakwireless_rak636-squashfs-sysupgrade.bin

It installed over WisGateOS 2.2.6 (I think – it was 2.2.x for sure) and I can log in.

I enabled Concentratord, selected the proper channel plan (US915 8-15), and it looks like it’s running properly.

# logread -e chirpstack-concentratord
Thu Aug 22 12:31:08 2024 user.info chirpstack-concentratord-sx1302[2456]: Frame received, uplink_id: 2441799461, count_us: 826825162, freq: 904100000, bw: 125000, mod: LoRa, dr: SF7, ftime_received: false, ftime_ns: 0
Thu Aug 22 12:31:10 2024 user.info chirpstack-concentratord-sx1302[2456]: Frame received, uplink_id: 1856374260, count_us: 828938498, freq: 903900000, bw: 125000, mod: LoRa, dr: SF7, ftime_received: false, ftime_ns: 0
Thu Aug 22 12:31:23 2024 user.info chirpstack-concentratord-sx1302[2456]: Publishing stats event, rx_received: 2, rx_received_ok: 2, tx_received: 0, tx_emitted: 0
Thu Aug 22 12:31:53 2024 user.info chirpstack-concentratord-sx1302[2456]: Publishing stats event, rx_received: 0, rx_received_ok: 0, tx_received: 0, tx_emitted: 0

However, I cannot get MQTT Forwarder to run. It is enabled and properly configured. The uci command shows a configuration.

# uci show chirpstack-mqtt-forwarder
chirpstack-mqtt-forwarder.@global[0]=global
chirpstack-mqtt-forwarder.@global[0].enabled='1'
chirpstack-mqtt-forwarder.@mqtt[0]=mqtt
chirpstack-mqtt-forwarder.@mqtt[0].topic_prefix='us915_1'
...

The MQTT Forwarder does not show up in the running process list:

# ps | grep [c]hirp
 2456 root     16780 S    /usr/bin/chirpstack-concentratord-sx1302 -c /var/etc/chirpstack-concentratord/concentratord.toml -c /var/etc/chirpstack-concentratord/region.toml -c /var/etc/chirpstack-concentratord/channels.toml

and there does not exist a /var/etc/chirpstack-mqtt-forwarder directory similar to Concentratord.

# find /var/etc
/var/etc
/var/etc/dnsmasq.conf.cfg01411c
/var/etc/chirpstack-concentratord
/var/etc/chirpstack-concentratord/region.toml
/var/etc/chirpstack-concentratord/channels.toml
/var/etc/chirpstack-concentratord/concentratord.toml
/var/etc/ssl
/var/etc/ssl/providers.cnf
/var/etc/ssl/engines.cnf

I was going to try running it manually, but I cannot find a .toml file for it. I looked for it in all the places I found concentratord.toml (/etc/, /rom/etc, /tmp/etc) but it does not exist.

I reinstalled from a downloaded chirpstack-mqtt-forwarder_4.3.1-r1_mipsel_24kc.ipk, which I do with all my RAK gateways. Still no /var/etc/chirpstack-mqtt-forwarder exists.

I copied the version of chirpstack-mqtt-forwarder.toml I have been using in WisGateOS to /var/etc/chirpstack-mqtt-forwarder (that I created) and tried to start it up. It seems to run, but doesn’t use my configuration:

Thu Aug 22 13:07:11 2024 user.info chirpstack-mqtt-forwarder[6986]: Starting ChirpStack MQTT Forwarder (version: 4.3.1, docs: https://www.chirpstack.io/)
Thu Aug 22 13:07:11 2024 user.info chirpstack-mqtt-forwarder[6986]: Setting up Semtech UDP Packet Forwarder backend
Thu Aug 22 13:07:11 2024 user.info chirpstack-mqtt-forwarder[6986]: Setting up Semtech UDP packet-forwarder backend
Thu Aug 22 13:07:11 2024 user.info chirpstack-mqtt-forwarder[6986]: Binding UDP socket, bind: 0.0.0.0:1700

In the user interface:

The MQTT Forwarder contains two “tabs” at the top of the page: “Slot 1” and “Mesh”
Both have the same configuration options, and I have enabled MQTT Forwarded in both sets of options. Even after a system reboot I don’t see it running.

Let me know what else I can provide to troubleshoot.

1 Like

Facing the same issue waveshare_sx1302_lorawan_gateway_hat mqtt forwarder is not forwarding to network server so i switched backed to old one v4.4 any updates?

I have just pushed an update (v4.5.1) that should fix a regression in the init script. This should fix the issue.

This does fix the MQTT Forwarder issue.

However, the Gateway ID changed when I upgraded from WisGateOS to Chirpstack Gateway OS. I thought the Gateway ID was tied to the GWEUI of the device. They used to be the same. The gateway ID as reported by the gateway-id command no longer matches the GWEUI on the device label. The ID in the MQTT topic matches the output of the gateway-id, as expected.

I have some general questions about using Gateway OS on the RAK devices going forward:

  1. We use the “Fake GPS” feature in WisGateOS, manually entering the rough lat/long of the gateway. Is that available somewhere in the configuration, even if it requires an update using the command line?
  2. Any plans for supporting extensions like the WisGateOS? We use the RAK Custom Logo extension. Most of our customers will not see the gateway UI, but if I ever need them to do anything with the gateway, having our logo in the UI is a nice touch.
    • I don’t know much about OpenWrt, so I’m not sure if the extensions are specific to WisGateOS or OpenWrt.
  3. Are there any other future developments to the Gateway OS you can share?

Thanks for the quick turnaround on the Forwarder issue.

Great the update resolved the issue.

The gateway ID as reported by the gateway-id command no longer matches the GWEUI on the device label.

The ChirpStack Concentratord reads the Gateway ID as provided by the SX1302 HAL. RAK might use a different source. See: sx1302_hal/libloragw/inc/loragw_hal.h at master · Lora-net/sx1302_hal · GitHub

We use the “Fake GPS” feature in WisGateOS, manually entering the rough lat/long of the gateway. Is that available somewhere in the configuration, even if it requires an update using the command line?

Please create a feature request at GitHub - chirpstack/chirpstack-gateway-os: OpenWrt based gateway images including ChirpStack components. for this. All configuration is generated based on UCI configuration so this needs a few changes in the UCI → TOML code.

Any plans for supporting extensions like the WisGateOS?

The extensions are specific to WisGateOS. WisGateOS2 provides a custom UI on top of OpenWrt where the ChirpStack Gateway OS uses LuCI (GitHub - openwrt/luci: LuCI - OpenWrt Configuration Interface) + custom theme. However, nothing prevents you from packing your own “branding” .ipk to overwrite some files and install this on the gateways as additional package.

Are there any other future developments to the Gateway OS you can share?

Nothing big at this moment. There are still some improvements that I would like to make, e.g. installing additional kernel modules is currently not possible. Maybe aligning the web-interface a bit more with the ChirpStack UI. However, the latter is a nice-to-have and not high on my prio list at the moment.


As the topic was related to the init script, please create a new topic / topics for other (GW OS related) questions :slight_smile:

The ChirpStack Concentratord reads the Gateway ID as provided by the SX1302 HAL. RAK might use a different source.

I was curious, so I opened up my gateway. The RAK Gateway ID is the local IPv6 address without the local link prefix. The IPv6 address is derived from the MAC address of the internal RAK634 WiFi Module, which also supplies the wired connection (data sheet).

Label
Label

Internal WiFi Module
Internal WiFi Module

This can also be confirmed by viewing the ipconfig info for the eth0.1 network device.

I never really thought about why the Gateway ID from the 7268V2 gateway is so different from the RAK2287+Pi HAT devices I was building before deciding to just buy them, until the same device reported two different ID values from the different OSes.

Please create a feature request

Done.

However, nothing prevents you from packing your own “branding” .ipk to overwrite some files and install this on the gateways as additional package.

Great idea. Would it also be possible to install configuration via .ipk for devices that will use the same MQTT Forwarder config, or is the UCI / TOML thing a barrier?

Thanks again for your help and efforts.

You could include a post-installation script that executes uci commands to set the config values :slight_smile: See also: [OpenWrt Wiki] The UCI system

1 Like

This topic was automatically closed after 90 days. New replies are no longer allowed.