RAK5146 doesn't work with basicstation

Hi, I have a RAK5146 hat and concentrator cpnnected to a Raspberry Pi 4. The UDP packet forarder seems to work and shows up in the TTN console but when using the docker basicstation, it just crashloops.

It seems that the error is as follows:

ERROR: Failed to set SX1250_0 in STANDBY_RC mode

I tried different SPI speeds, changed the spi device from 0.1 to 0.0, but nothing works. I also tried setting the GW_RESET_GPIO to 18 and 25.

Here are the full logs:

basicstation exited with code 30 (restarting)
basicstation  | ------------------------------------------------------------------
basicstation  | BasicStation (TM) Packet Forwarder Container v2.8.5
basicstation  | (c) Xose Pérez 2022-2024
basicstation  | 
basicstation  | Based on:
basicstation  |  * basicstation v2.0.6
basicstation  |  * sx1302_hal v2.1.0
basicstation  |  * picoGW_hal v0.2.3
basicstation  | ------------------------------------------------------------------
basicstation  | 
basicstation  | Protocol
basicstation  | ------------------------------------------------------------------
basicstation  | Mode:          STATIC
basicstation  | Protocol:      CUPS
basicstation  | CUPS Server:   https://au1.cloud.thethings.network:443
basicstation  | Gateway EUI:   DCA632FFFE7D7B74
basicstation  | EUI Source:    file
basicstation  | 
basicstation  | Radio
basicstation  | ------------------------------------------------------------------
basicstation  | Model:         SX1303
basicstation  | Concentrator:  SX1303
basicstation  | Design:        CORECELL
basicstation  | Interface:     SPI
basicstation  | Radio Device:  /dev/spidev0.0
basicstation  | SPI Speed:     8000000
basicstation  | Reset GPIO:    25
basicstation  | Enable GPIO:   0
basicstation  | 
basicstation  | Killing process group 1
basicstation  | 2025-10-25 02:46:51.185 [SYS:INFO] Logging     : stderr (maxsize=10000000, rotate=3)
basicstation  | 2025-10-25 02:46:51.185 [SYS:INFO] Station Ver : 2.0.6(corecell/stdn) 2025-09-15 08:42:21
basicstation  | 2025-10-25 02:46:51.185 [SYS:INFO] Package Ver : (null)
basicstation  | 2025-10-25 02:46:51.185 [SYS:INFO] mbedTLS Ver : 2.28.0
basicstation  | 2025-10-25 02:46:51.185 [SYS:INFO] proto EUI   : dca6:32ff:fe7d:7b74	(station.conf)
basicstation  | 2025-10-25 02:46:51.185 [SYS:INFO] prefix EUI  : ::1	(builtin)
basicstation  | 2025-10-25 02:46:51.185 [SYS:INFO] Station EUI : dca6:32ff:fe7d:7b74
basicstation  | 2025-10-25 02:46:51.185 [SYS:INFO] Station home: ./	(builtin)
basicstation  | 2025-10-25 02:46:51.185 [SYS:INFO] Station temp: /var/tmp/	(builtin)
basicstation  | 2025-10-25 02:46:51.185 [SYS:INFO] GPS device: ./
basicstation  | 2025-10-25 02:46:51.186 [RAL:DEBU] execvp argv[0]: </proc/self/exe>
basicstation  | 2025-10-25 02:46:51.186 [RAL:DEBU]        argv[1]: <-S>
basicstation  | 2025-10-25 02:46:51.186 [RAL:DEBU]        argv[2]: <(null)>
basicstation  | 2025-10-25 02:46:51.189 [S00:INFO] Logging     : stderr (maxsize=10000000, rotate=3)
basicstation  | 2025-10-25 02:46:51.189 [S00:INFO] Station Ver : 2.0.6(corecell/stdn) 2025-09-15 08:42:21
basicstation  | 2025-10-25 02:46:51.189 [S00:INFO] Package Ver : (null)
basicstation  | 2025-10-25 02:46:51.189 [S00:INFO] mbedTLS Ver : 2.28.0
basicstation  | 2025-10-25 02:46:51.189 [S00:INFO] proto EUI   : dca6:32ff:fe7d:7b74	(station.conf)
basicstation  | 2025-10-25 02:46:51.189 [S00:INFO] prefix EUI  : ::1	(builtin)
basicstation  | 2025-10-25 02:46:51.189 [S00:INFO] Station EUI : dca6:32ff:fe7d:7b74
basicstation  | 2025-10-25 02:46:51.189 [S00:INFO] Station home: ./	(builtin)
basicstation  | 2025-10-25 02:46:51.189 [S00:INFO] Station temp: /var/tmp/	(builtin)
basicstation  | 2025-10-25 02:46:51.189 [S00:INFO] Station slave: 0
basicstation  | 2025-10-25 02:46:51.189 [S00:INFO] Slave LGW (0) - started.
basicstation  | 2025-10-25 02:46:51.186 [RAL:INFO] Master has started slave: pid=33 idx=0 (attempt 1)
basicstation  | 2025-10-25 02:46:51.386 [GPS:ERRO] Failed to open TTY './': Is a directory
basicstation  | 2025-10-25 02:46:51.386 [GPS:CRIT] Initial open of GPS FIFO './' failed - GPS disabled!
basicstation  | 2025-10-25 02:46:51.386 [TCE:INFO] Starting TC engine
basicstation  | 2025-10-25 02:46:51.387 [AIO:INFO] ./tc.trust: 
basicstation  | cert. version     : 3
basicstation  | serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
basicstation  | issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
basicstation  | subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
basicstation  | issued  on        : 2015-06-04 11:04:38
basicstation  | expires on        : 2035-06-04 11:04:38
basicstation  | signed using      : RSA with SHA-256
basicstation  | RSA key size      : 4096 bits
basicstation  | basic constraints : CA=true
basicstation  | key usage         : Key Cert Sign, CRL Sig2025-10-25 02:46:51.387 [TCE:INFO] Connecting to INFOS: wss://au1.cloud.thethings.network:8887
basicstation  | 2025-10-25 02:46:51.417 [CUP:INFO] Starting a CUPS session in 0 seconds.
basicstation  | 2025-10-25 02:46:51.417 [CUP:INFO] Starting a CUPS session now.
basicstation  | 2025-10-25 02:46:51.417 [CUP:INFO] Connecting to CUPS ... https://au1.cloud.thethings.network:443 (try #1)
basicstation  | 2025-10-25 02:46:51.475 [AIO:INFO] ./cups.trust: 
basicstation  | cert. version     : 3
basicstation  | serial number     : 04:00:00:00:00:01:15:4B:5A:C3:94
basicstation  | issuer name       : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
basicstation  | subject name      : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
basicstation  | issued  on        : 1998-09-01 12:00:00
basicstation  | expires on        : 2028-01-28 12:00:00
basicstation  | signed using      : RSA with SHA1
basicstation  | RSA key size      : 2048 bits
basicstation  | basic constraints : CA=true
basicstation  | key usage         : Key Cert Sign, CRL Sign
basicstation  | 2025-10-25 02:46:51.504 [CUP:VERB] Retrieving update-info from CUPS https://au1.cloud.thethings.network:443...
basicstation  | 2025-10-25 02:46:51.507 [CUP:DEBU] CUPS Request: {"router":"dca6:32ff:fe7d:7b74","cupsUri":"https://au1.cloud.thethings.network:443","tcUri":"wss://au1.cloud.thethings.network:8887","cupsCredCrc":170213749,"tcCredCrc":2139559637,"station":"2.0.6(corecell/stdn) 2025-09-15 08:41:47","model":"corecell","package":null,"keys":[]}
basicstation  | 2025-10-25 02:46:51.887 [TCE:INFO] Infos: dca6:32ff:fe7d:7b74 muxs-::0 wss://au1.cloud.thethings.network:8887/traffic/eui-DCA632FFFE7D7B74
basicstation  | 2025-10-25 02:46:51.888 [AIO:DEBU] [4] ws_close reason=1000
basicstation  | 2025-10-25 02:46:51.888 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
basicstation  | 2025-10-25 02:46:51.888 [AIO:DEBU] [4] WS connection shutdown...
basicstation  | 2025-10-25 02:46:51.888 [AIO:INFO] ./tc.trust: 
basicstation  | cert. version     : 3
basicstation  | serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
basicstation  | issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
basicstation  | subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
basicstation  | issued  on        : 2015-06-04 11:04:38
basicstation  | expires on        : 2035-06-04 11:04:38
basicstation  | signed using      : RSA with SHA-256
basicstation  | RSA key size      : 4096 bits
basicstation  | basic constraints : CA=true
basicstation  | key usage         : Key Cert Sign, CRL Sig2025-10-25 02:46:51.888 [TCE:VERB] Connecting to MUXS...
basicstation  | 2025-10-25 02:46:52.362 [S00:VERB] /app/config/reset.sh: Forked, waiting...
basicstation  | 2025-10-25 02:46:52.362 [S00:DEBU] execvp argv[0]: </app/config/reset.sh>
basicstation  | 2025-10-25 02:46:52.362 [S00:DEBU]        argv[1]: </dev/spidev0.0>
basicstation  | 2025-10-25 02:46:52.363 [S00:DEBU]        argv[2]: <0>
basicstation  | Concentrator reset through GPIO25 (using sysfs)
basicstation  | Warning: /sys/class/gpio/gpio25 does not exist
basicstation  | 2025-10-25 02:46:52.389 [S00:INFO] Process /app/config/reset.sh (pid=34) completed
basicstation  | 2025-10-25 02:46:52.389 [S00:INFO] Lora gateway library version: Version: 2.1.0;
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] [LGW sx1302] full_duplex=0 clksrc=0 lorawan_public=1
basicstation  | 2025-10-25 02:46:52.390 [S00:DEBU] SX130x txlut table (16 entries)
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut  0:  rf_power=12 pa_gain=0 pwr_idx=15
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut  1:  rf_power=13 pa_gain=0 pwr_idx=16
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut  2:  rf_power=14 pa_gain=0 pwr_idx=17
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut  3:  rf_power=15 pa_gain=0 pwr_idx=19
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut  4:  rf_power=16 pa_gain=0 pwr_idx=20
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut  5:  rf_power=17 pa_gain=0 pwr_idx=22
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut  6:  rf_power=18 pa_gain=1 pwr_idx=1
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut  7:  rf_power=19 pa_gain=1 pwr_idx=2
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut  8:  rf_power=20 pa_gain=1 pwr_idx=3
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut  9:  rf_power=21 pa_gain=1 pwr_idx=4
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut 10:  rf_power=22 pa_gain=1 pwr_idx=5
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut 11:  rf_power=23 pa_gain=1 pwr_idx=6
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut 12:  rf_power=24 pa_gain=1 pwr_idx=7
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut 13:  rf_power=25 pa_gain=1 pwr_idx=9
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut 14:  rf_power=26 pa_gain=1 pwr_idx=11
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO] SX1302 txlut 15:  rf_power=27 pa_gain=1 pwr_idx=14
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO]  RX/TX RF0:    917.2MHz rssi_offset=-215.4 type=5 rssi_tcomp=0.000 0.000 20.410 2162.560 0.000
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO]  RX    RF1:    917.9MHz rssi_offset=-215.4 type=5 rssi_tcomp=0.000 0.000 20.410 2162.560 0.000
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO]  [mSF]   0:    916.8MHz rf=0 freq=-400.0 datarate=0
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO]  [mSF]   1:    917.0MHz rf=0 freq=-200.0 datarate=0
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO]  [mSF]   2:    917.2MHz rf=0 freq=  +0.0 datarate=0
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO]  [mSF]   3:    917.4MHz rf=0 freq=+200.0 datarate=0
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO]  [mSF]   4:    917.6MHz rf=1 freq=-300.0 datarate=0
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO]  [mSF]   5:    917.8MHz rf=1 freq=-100.0 datarate=0
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO]  [mSF]   6:    918.0MHz rf=1 freq=+100.0 datarate=0
basicstation  | 2025-10-25 02:46:52.390 [S00:INFO]  [mSF]   7:    918.2MHz rf=1 freq=+300.0 datarate=0
basicstation  | 2025-10-25 02:46:52.391 [S00:INFO]  [STD]   8:    917.5MHz rf=0 freq=+300.0 datarate=8 bw=6 Explicit header
basicstation  | 2025-10-25 02:46:52.391 [S00:INFO]  channel 9 disabled
basicstation  | 2025-10-25 02:46:52.391 [S00:INFO] Station device: spi:/dev/spidev0.0 (PPS capture disabled)
basicstation  | 2025-10-25 02:46:52.391 [S00:INFO] [lgw_com_open:84] Opening SPI communication interface
basicstation  | 2025-10-25 02:46:52.391 [S00:INFO] [lgw_spi_open:88] Setting SPI speed to 8000000
basicstation  | 2025-10-25 02:46:52.391 [S00:INFO] [lgw_connect:1192] chip version is 0x05 (v0.5)
basicstation  | 2025-10-25 02:46:52.334 [TCE:VERB] Connected to MUXS.
basicstation  | 2025-10-25 02:46:52.344 [RAL:INFO] Region plan hwspec 'sx1301/1' mapped to 1 slaves 'sx1301/1'
basicstation  | 2025-10-25 02:46:52.344 [RAL:INFO] Master sending 645 bytes of JSON sx1301conf to slave (0)
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO] Configuring for region: AU915 -- 915.0MHz..928.0MHz
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR0  SF12/BW125 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR1  SF11/BW125 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR2  SF10/BW125 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR3  SF9/BW125 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR4  SF8/BW125 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR5  SF7/BW125 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR6  SF8/BW500 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR7  FSK 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR8  SF12/BW500 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR9  SF11/BW500 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR10 SF10/BW500 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR11 SF9/BW500 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR12 SF8/BW500 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR13 SF7/BW500 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR14 FSK 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   DR15 FSK 
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   TX power: 30.0 dBm EIRP
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   JoinEui list: 0 entries
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   NetID filter: FFFFFFFF-FFFFFFFF-FFFFFFFF-FFFFFFFF
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO]   Dev/test settings: nocca=1 nodc=1 nodwell=1
basicstation  | 2025-10-25 02:46:52.344 [S2E:INFO] Beaconing every 2m8s on 923.3MHz(8) @ DR8 (frame layout 5/11/23)
basicstation  | 2025-10-25 02:46:52.345 [S2E:INFO] Beaconing suspend - missing GPS data: time 
basicstation  | 2025-10-25 02:46:52.716 [AIO:DEBU] [5] HTTP connection shutdown...
basicstation  | 2025-10-25 02:46:52.717 [CUP:INFO] Interaction with CUPS done (no updates) - next regular check in 1d
basicstation  | 2025-10-25 02:46:53.992 [S00:ERRO] [lgw_start:908] failed to setup radio 0
basicstation  | 2025-10-25 02:46:53.992 [S00:ERRO] Concentrator start failed: lgw_start
basicstation  | 2025-10-25 02:46:53.992 [S00:CRIT] Slave radio start up failed with status 0x08
basicstation  | ERROR: Failed to set SX1250_0 in STANDBY_RC mode
basicstation  | 2025-10-25 02:46:53.976 [RAL:ERRO] Slave (0) - EOF
basicstation  | 2025-10-25 02:46:53.976 [any:CRIT] Slave pid=33 idx=0: Fatal exit

and here is my docker-compose.yml with the secrets removed:

version: '2.0'

services:

  basicstation:
    image: xoseperez/basicstation:latest
    container_name: basicstation
    restart: unless-stopped
    privileged: true
    network_mode: host      # required to read main interface MAC instead of virtual one
    environment:
      MODEL: "SX1303"
      DESIGN: "CORECELL"
      INTERFACE: "SPI"
      DEVICE: "/dev/spidev0.0"
      TC_KEY: "REDACTED"
      CUPS_KEY: "REDACTED"
      GATEWAY_EUI_NIC: "eth0"
      TTS_REGION: "au1"
      USE_CUPS: "1"
      TTS_FREQUENCY_PLAN_ID: "AU_915_928_FSB_2"
      CUPS_URI: "https://au1.cloud.thethings.network:443"
      TC_URI: "wss://au1.cloud.thethings.network:8887"
      GW_RESET_GPIO: 25 #tried 18, 17, and leaving it on default

What could be the issue here?