RPi 4B + Seeed WM1302 (SX1302) — Works perfectly until I reboot after enabling concentratord, then next boot breaks (SPI 0x00, missing files)

Hi all,

I’m looking for help setting up a Raspberry Pi 4B with a Seeed WM1302 on ChirpStack Gateway OS. Following the online installation instruction, everything behaves perfectly (and I can reboot multiple times) until I enable/run concentratord; the very next reboot breaks things, such as (SPI reads 0x00). Being new to ChirpStack/OpenWrt, I’ve been troubleshooting for days. I’ve even tried ChatGPT, but I’m still stuck. Any assistant would be hugely appreciated; details and logs are below.

Environment

  • Raspberry Pi 4B + Seeed WM1302 (SPI)
  • ChirpStack Gateway OS (Download is the Raspberry Pi, Full, SD Card Factory Image 4.8.1)
  • concentratord: chirpstack-concentratord-sx1302 4.5.0
  • Region: US915_0, model: seeed_wm1302

What works (prior to reboot)

  • Fresh image boots cleanly.
  • I can reboot multiple times with no issues before enabling concentratord.
  • After I enable/start concentratord, the system runs perfectly (gateway up, config OK). I have an effective gateway EUI and the LaRa pipeline (SX1302 > concentratord > MQTT forwarder > Chirpstack) is passing traffic.
  • ChirpStack communicates with sensors and the gateway.

When it breaks (the trigger)

  • I reboot after the successful run.
  • On that next boot, things go sideways.

Symptoms after the “bad” reboot

  • Gateway ID: Could not read Gateway ID
  • In syslog, concentratord repeatedly does its setup and “Starting the concentrator” every ~7s, never succeeding. Consentratord starts, configures radios + channels, then immediately exits, and procd respawns it with a new PID each time. It seems the process is dying right after starting the concentrator.
Configuring multi-SF LoRa channel, channel: 0, enabled: true, freq: 902300000, rf_chain: 0, if_freq: -400000
Configuring multi-SF LoRa channel, channel: 1, enabled: true, freq: 902500000, rf_chain: 0, if_freq: -200000
Configuring multi-SF LoRa channel, channel: 2, enabled: true, freq: 902700000, rf_chain: 0, if_freq: 0
Configuring multi-SF LoRa channel, channel: 3, enabled: true, freq: 902900000, rf_chain: 0, if_freq: 200000
Configuring multi-SF LoRa channel, channel: 4, enabled: true, freq: 903100000, rf_chain: 0, if_freq: 400000
Configuring multi-SF LoRa channel, channel: 5, enabled: true, freq: 903300000, rf_chain: 1, if_freq: -400000
Configuring multi-SF LoRa channel, channel: 6, enabled: true, freq: 903500000, rf_chain: 1, if_freq: -200000
Configuring multi-SF LoRa channel, channel: 7, enabled: true, freq: 903700000, rf_chain: 1, if_freq: 0
Configuring Std LoRa channel, enabled: true, freq: 903000000, rf_chain: 0, if_freq: 300000
Configuring FSK channel, enabled: false, freq: 0, rf_chain: 0, if_freq: 0
Starting the concentrator
Configuring reset pin, dev: /dev/gpiochip0, pin: 17
Configuring sx1302 power enable pin, dev: /dev/gpiochip0, pin: 18
Configuring sx1261 reset pin, dev: /dev/gpiochip0, pin: 5
Starting Concentratord SX1302 (version: 4.5.0, docs: https://www.chirpstack.io/docs/chirpstack-concentratord/)
Enabling concentrator power
Triggering sx130x reset
Triggering sx1261 reset
Setting i2c device path, path: /dev/i2c-1
Setting i2c temperature sensor address, address: 57
Setting board configuration, lorawan_public: true, clock_source: 0, com_type: Spi, com_path: /dev/spidev0.0
Setting up fine timestamp, enable: false
Setting up concentrator channels
Configuring radio, radio: 0, enabled: true, center_freq: 902700000, type: SX1250
Configuring radio, radio: 1, enabled: true, center_freq: 903700000, type: SX1250
Setting up concentrator channels
Configuring multi-SF LoRa channel, channel: 0, enabled: true, freq: 902300000, rf_chain: 0, if_freq: -400000
Configuring multi-SF LoRa channel, channel: 1, enabled: true, freq: 902500000, rf_chain: 0, if_freq: -200000
Configuring multi-SF LoRa channel, channel: 2, enabled: true, freq: 902700000, rf_chain: 0, if_freq: 0
Configuring multi-SF LoRa channel, channel: 3, enabled: true, freq: 902900000, rf_chain: 0, if_freq: 200000
Configuring multi-SF LoRa channel, channel: 4, enabled: true, freq: 903100000, rf_chain: 0, if_freq: 400000
Configuring multi-SF LoRa channel, channel: 5, enabled: true, freq: 903300000, rf_chain: 1, if_freq: -400000
Configuring multi-SF LoRa channel, channel: 6, enabled: true, freq: 903500000, rf_chain: 1, if_freq: -200000
Configuring multi-SF LoRa channel, channel: 7, enabled: true, freq: 903700000, rf_chain: 1, if_freq: 0
Configuring Std LoRa channel, enabled: true, freq: 903000000, rf_chain: 0, if_freq: 300000
Configuring FSK channel, enabled: false, freq: 0, rf_chain: 0, if_freq: 0
Starting the concentrator
Configuring reset pin, dev: /dev/gpiochip0, pin: 17
Configuring sx1302 power enable pin, dev: /dev/gpiochip0, pin: 18
Configuring sx1261 reset pin, dev: /dev/gpiochip0, pin: 5
Starting Concentratord SX1302 (version: 4.5.0, docs: https://www.chirpstack.io/docs/chirpstack-concentratord/)
Enabling concentrator power
Triggering sx130x reset
Triggering sx1261 reset
Setting i2c device path, path: /dev/i2c-1
Setting i2c temperature sensor address, address: 57
Setting board configuration, lorawan_public: true, clock_source: 0, com_type: Spi, com_path: /dev/spidev0.0
Setting up fine timestamp, enable: false
Setting up concentrator channels
Configuring radio, radio: 0, enabled: true, center_freq: 902700000, type: SX1250
Configuring radio, radio: 1, enabled: true, center_freq: 903700000, type: SX1250
Setting up concentrator channels
Configuring multi-SF LoRa channel, channel: 0, enabled: true, freq: 902300000, rf_chain: 0, if_freq: -400000
Configuring multi-SF LoRa channel, channel: 1, enabled: true, freq: 902500000, rf_chain: 0, if_freq: -200000
Configuring multi-SF LoRa channel, channel: 2, enabled: true, freq: 902700000, rf_chain: 0, if_freq: 0
Configuring multi-SF LoRa channel, channel: 3, enabled: true, freq: 902900000, rf_chain: 0, if_freq: 200000
Configuring multi-SF LoRa channel, channel: 4, enabled: true, freq: 903100000, rf_chain: 0, if_freq: 400000
Configuring multi-SF LoRa channel, channel: 5, enabled: true, freq: 903300000, rf_chain: 1, if_freq: -400000
Configuring multi-SF LoRa channel, channel: 6, enabled: true, freq: 903500000, rf_chain: 1, if_freq: -200000
Configuring multi-SF LoRa channel, channel: 7, enabled: true, freq: 903700000, rf_chain: 1, if_freq: 0
Configuring Std LoRa channel, enabled: true, freq: 903000000, rf_chain: 0, if_freq: 300000
Configuring FSK channel, enabled: false, freq: 0, rf_chain: 0, if_freq: 0
Starting the concentrator
  • Here are the ChirpStack Configurations:
root@chirpstack-01cfc3:~# uci show chirpstack-concentratord
chirpstack-concentratord.@global[0]=global
chirpstack-concentratord.@global[0].enabled='1'
chirpstack-concentratord.@global[0].chipset='sx1302'
chirpstack-concentratord.@sx1301[0]=sx1301
chirpstack-concentratord.@sx1301[0].model='imst_ic880a'
chirpstack-concentratord.@sx1301[0].region='EU868'
chirpstack-concentratord.@sx1301[0].channel_plan='eu868'
chirpstack-concentratord.@sx1301[0].gateway_id='d83addfffe01cfc3'
chirpstack-concentratord.@sx1301[0].antenna_gain='2'
chirpstack-concentratord.@sx1302[0]=sx1302
chirpstack-concentratord.@sx1302[0].model='seeed_wm1302'
chirpstack-concentratord.@sx1302[0].region='US915'
chirpstack-concentratord.@sx1302[0].channel_plan='us915_0'
chirpstack-concentratord.@sx1302[0].gnss='1'
chirpstack-concentratord.@sx1302[0].antenna_gain='2'
chirpstack-concentratord.@2g4[0]=2g4
chirpstack-concentratord.@2g4[0].model='semtech_sx1280z3dsfgw1'
chirpstack-concentratord.@2g4[0].region='ISM2400'
chirpstack-concentratord.@2g4[0].channel_plan='ism2400'
chirpstack-concentratord.@2g4[0].antenna_gain='2'
root@chirpstack-01cfc3:~# 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_0'
chirpstack-mqtt-forwarder.@mqtt[0].server='tcp://localhost:1883'
chirpstack-mqtt-forwarder.@mqtt[0].qos='0'
chirpstack-mqtt-forwarder.@filters[0]=filters
root@chirpstack-01cfc3:~# uci show chirpstack-udp-forwarder
chirpstack-udp-forwarder.@global[0]=global
chirpstack-udp-forwarder.@global[0].enabled='0'
chirpstack-udp-forwarder.@server[0]=server
chirpstack-udp-forwarder.@concentratord[0]=concentratord
chirpstack-udp-forwarder.@concentratord[0].event_url='ipc:///tmp/concentratord_event'
chirpstack-udp-forwarder.@concentratord[0].command_url='ipc:///tmp/concentratord_command'
root@chirpstack-01cfc3:~# uci show chirpstack
chirpstack.@network[0]=network
chirpstack.@network[0].net_id='000000'
chirpstack.@network[0].enabled_regions='us915_0'

  • Foreground run (RUST_LOG=debug) prints “Opening SPI communication interface” and then stalls.
  • SPI always reads 0x00 on both CS0/CS1:
root@chirpstack-01cfc3:~# spidev_test -D /dev/spidev0.0 -v -p "$(printf '\xAA\x55\xFF\x00')" -s 2000000
spi mode: 0x0
bits per word: 8
max speed: 2000000 Hz (2000 kHz)
TX | AA 55 FF __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __  |.U.|
RX | 00 00 00 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __  |...|
root@chirpstack-01cfc3:~# spidev_test -D /dev/spidev0.1 -v -p "$(printf '\xAA\x55\xFF\x00')" -s 2000000
spi mode: 0x0
bits per word: 8
max speed: 2000000 Hz (2000 kHz)
TX | AA 55 FF __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __  |.U.|
RX | 00 00 00 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __  |...|

  • I²C looks fine: temp sensor at 0x39 shows up in i2cdetect -y 1.

root@chirpstack-01cfc3:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- 39 -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --    

  • I have attempted to restore from backup; however, the symptoms persist.

Questions

  1. Does anyone know of any WM1302 + RPi4B gotchas that would cause SPI to read all zeros only after a power-cycle/reboot (even though the prior run was perfect)?
  2. Can I enable more HAL-level debug to see specifically why lgw_start() (or equivalent) fails instead of just looping “Starting the concentrator”?

Happy to post more logs/outputs. Thanks!

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