BalenaOS 6.5.17+rev1 and RAK883

Hi,

I had a long running TTN v3 GW based on the, now deprecated project, GitHub - mpous/basicstation: LoRa Basics™ Station - The LoRaWAN Gateway Software. Based on RasPi3 and a RAK833 concentrator (Pi Supply IoT Gateway HAT).

As I relocating the GW I decided yesterday to update the BalenaOS on the device. But after upgrading to 6.5.17+rev1 I get the error “Concentrator start failed: lgw_star”.

I don’t remember which version I upgraded from, but I have an identical GW in the same fleet with BalenaOS 6.3.21 that works fine with same variables.

It looks like there are some similar cases:

Is there a bug in the latest BalenaOS?

Just created a new fleet and flashed a SD card with balenaOS 6.3.23. Swapped the SD card in the gateway and pushed GitHub - xoseperez/basicstation-docker: Basics™ Station Packet Forward protocol using Docker to the application. Updated the variables and the GW is online in the TTN console again.

Hi,
I’m having issues with the GitHub - xoseperez/basicstation-docker: Basics™ Station Packet Forward protocol using Docker when updating to the latest BalenaOS. I have two GW, one with a pi5, the other with a pi3 (with rak833 + pi supply hat). If it works for you, can you share how you’ve set the variables?

Thanks

Sure. Below are my parameters on Pi3 and a RAK833 Pi Supply HAT.
But I did not use the “Balena Deploy” button. I made a need fleet with Pi3 , added a device and downloaded the BalenaOS 6.3.21 image. Then I botted the Pi3 and used Balena-CLI to push the Basicstation. With Pi5 there is something on the basicstation github page about using the gpiod library for reset SPI concentrators. I’ve sett RESET_GPIO to 22.

Hi, thank you for sharing. I managed to have it working on a Pi5 with RAK833 + Pi Supply Hat and balenaOS 5.3.22. However, it seems to be unstable and disconnect from time to time. Unfortunately, newer OS might not be working due to deprecated RPi.GPIO library, as explained here.

Hi all,

I’m trying to understand the meaning of the error message below - and also how to resolve it. The gateway concentrator fails to start (although not always).

 basicstation  Concentrator reset through gpiochip4:22 (using libgpiod)
 basicstation  2025-04-29 21:00:40.994 [S00:ERRO] Process /app/config/reset.sh (pid=55) did not terminate within 200ms - killing it (SIGTERM)
 basicstation  2025-04-29 21:00:40.994 [S00:CRIT] Slave radio start up failed with status 0x04
 basicstation  2025-04-29 21:00:40.975 [RAL:ERRO] Slave (0) - EOF
 basicstation  2025-04-29 21:00:40.975 [any:CRIT] Slave pid=54 idx=0: Fatal exit

Hi,

Did you figure this out? I get the same issue after upgrading an old gateway.

I’ve just tried to update a gateway from the archived GitHub - mpous/basicstation: LoRa Basics™ Station - The LoRaWAN Gateway Software to newly updated GitHub - xoseperez/basicstation-docker: Basics™ Station Packet Forward protocol using Docker .

I’ve a fresh Pi OS 64 bit lite (Bookworm) on a Pi3 and a RAK833 (Pi Supply Lora GW HAT) trying to start the docker container with setting I’ve used before. I had to USE_LIBGPIOD: 1 and GPIO_CHIP: “gpiochip0” as I get “Warning: /sys/class/gpio/gpio22 does not exist” without.

But get this, that I haven’t been able to figure out. GW_RESET_PIN = 22 worked before.

basicstation  | Concentrator reset through gpiochip0:22 (using libgpiod)
basicstation  | 2025-09-29 20:33:47.475 [S00:ERRO] Process /app/config/reset.sh (pid=35) did not terminate within 200ms - killing it (SIGTERM)
basicstation  | 2025-09-29 20:33:47.475 [S00:CRIT] Slave radio start up failed with status 0x04
basicstation  | 2025-09-29 20:33:47.455 [RAL:ERRO] Slave (0) - EOF
basicstation  | 2025-09-29 20:33:47.455 [any:CRIT] Slave pid=34 idx=0: Fatal exit

It looks to be something with off with reset.sh.gpiod.

I added dtoverlay=gpio-no-irq to /boot/firmware/config.txt and changed to USE_LIBGPIOD: 0 to get i working. Not sure if that is an option on Pi5.

For some reason I’m back to failing. After an reboot I get [lgw_start:742] FAIL TO CONNECT BOARD again. Looks to be something off with the reset .

basicstation | 2025-10-11 10:50:10.172 [S00:INFO] SX130x LBT not enabled
basicstation | 2025-10-11 10:50:10.172 [S00:INFO] Station device: /dev/spidev0.0 (PPS capture enabled)
basicstation | 2025-10-11 10:50:10.172 [S00:INFO] [lgw_spi_open:101] Setting SPI speed to 2000000
basicstation | 2025-10-11 10:50:10.172 [S00:INFO] [lgw_spi_open:135] Note: SPI port opened and configured ok
basicstation | 2025-10-11 10:50:10.172 [S00:ERRO] [lgw_start:742] FAIL TO CONNECT BOARD
basicstation | 2025-10-11 10:50:10.172 [S00:ERRO] Concentrator start failed: lgw_start
basicstation | 2025-10-11 10:50:10.172 [S00:CRIT] Slave radio start up failed with status 0x08
basicstation | 2025-10-11 10:50:10.083 [TCE:VERB] Connected to MUXS.

And I got it to work again by setting

  USE_LIBGPIOD: 1 # set to 1 by default for Raspberry Pi 5
  GPIO_CHIP: "gpiochip1" # set to "gpiochip4" by default for Raspberry Pi 5
  RESET_GPIO: 22

So changing USE_LIBGPIOD from 0 to 1 and GPIO_CHIP from “gpiochip0” to “gpiochip1”. Don’t know why. gpiodetect gives:

pi@BasicStation2:~ $ gpiodetect
gpiochip0 [pinctrl-bcm2835] (54 lines)
gpiochip1 [raspberrypi-exp-gpio] (8 lines)
gpiochip0 [pinctrl-bcm2835] (54 lines)
pi@BasicStation2:~ $