I have a RAK5146 gateway hat on a Pi 3 running Basic Station in a Docker container. I followed the instructions at 868 MHz RAK5146 SPI – LoRa Basics Station – LoRa@VSB – LoRaWAN Network of Technical University of Ostrava Campus | lora.vsb.cz. When I first connected my RAK5146 Pi3 gateway to TTN it worked fine, then I did a full delete and purge of the gateway to connect to TTN Arduino Cloud version and the gateway won’t make a persistent connection. It cycles continuously through connection attempts that end in failure. I generated a new EUI at Random EUI or Key generator | descartes and put that in the docker-compose.yml file, but I get the same cycling behavior.
Here is the log:
[+] Running 1/1
Container basicstation Created 0.0s
Attaching to basicstation
basicstation | ------------------------------------------------------------------
basicstation | BasicStation ™ Packet Forwarder Container v2.8.4
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: LNS
basicstation | LNS Server: wss://arduino.nam1.cloud.thethings.industries:8887
basicstation | Gateway EUI: B827EBFFFEB31100
basicstation | EUI Source: file
basicstation |
basicstation | Radio
basicstation | ------------------------------------------------------------------
basicstation | Model: RAK5146
basicstation | Concentrator: SX1303
basicstation | Design: CORECELL
basicstation | Interface: SPI
basicstation | Radio Device: /dev/spidev0.1
basicstation | SPI Speed: 8000000
basicstation | Reset GPIO: 17
basicstation | Enable GPIO: 0
basicstation |
basicstation | Killing process group 1
basicstation | 2025-04-19 23:47:18.567 [SYS:INFO] Logging : stderr (maxsize=10000000, rotate=3)
basicstation | 2025-04-19 23:47:18.567 [SYS:INFO] Station Ver : 2.0.6(corecell/stdn) 2024-08-27 09:53:19
basicstation | 2025-04-19 23:47:18.567 [SYS:INFO] Package Ver : (null)
basicstation | 2025-04-19 23:47:18.568 [SYS:INFO] mbedTLS Ver : 2.28.0
basicstation | 2025-04-19 23:47:18.568 [SYS:INFO] proto EUI : b827:ebff:feb3:1100 (station.conf)
basicstation | 2025-04-19 23:47:18.568 [SYS:INFO] prefix EUI : ::1 (builtin)
basicstation | 2025-04-19 23:47:18.568 [SYS:INFO] Station EUI : b827:ebff:feb3:1100
basicstation | 2025-04-19 23:47:18.568 [SYS:INFO] Station home: ./ (builtin)
basicstation | 2025-04-19 23:47:18.568 [SYS:INFO] Station temp: /var/tmp/ (builtin)
basicstation | 2025-04-19 23:47:18.568 [SYS:INFO] GPS device: ./
basicstation | 2025-04-19 23:47:18.568 [SYS:WARN] Station in NO-CUPS mode
basicstation | 2025-04-19 23:47:18.570 [RAL:DEBU] execvp argv[0]: </proc/self/exe>
basicstation | 2025-04-19 23:47:18.570 [RAL:DEBU] argv[1]: <-S>
basicstation | 2025-04-19 23:47:18.571 [RAL:DEBU] argv[2]: <(null)>
basicstation | 2025-04-19 23:47:18.575 [S00:INFO] Logging : stderr (maxsize=10000000, rotate=3)
basicstation | 2025-04-19 23:47:18.575 [S00:INFO] Station Ver : 2.0.6(corecell/stdn) 2024-08-27 09:53:19
basicstation | 2025-04-19 23:47:18.575 [S00:INFO] Package Ver : (null)
basicstation | 2025-04-19 23:47:18.575 [S00:INFO] mbedTLS Ver : 2.28.0
basicstation | 2025-04-19 23:47:18.575 [S00:INFO] proto EUI : b827:ebff:feb3:1100 (station.conf)
basicstation | 2025-04-19 23:47:18.575 [S00:INFO] prefix EUI : ::1 (builtin)
basicstation | 2025-04-19 23:47:18.575 [S00:INFO] Station EUI : b827:ebff:feb3:1100
basicstation | 2025-04-19 23:47:18.575 [S00:INFO] Station home: ./ (builtin)
basicstation | 2025-04-19 23:47:18.575 [S00:INFO] Station temp: /var/tmp/ (builtin)
basicstation | 2025-04-19 23:47:18.575 [S00:INFO] Station slave: 0
basicstation | 2025-04-19 23:47:18.575 [S00:WARN] Station in NO-CUPS mode
basicstation | 2025-04-19 23:47:18.575 [S00:INFO] Slave LGW (0) - started.
basicstation | 2025-04-19 23:47:18.570 [RAL:INFO] Master has started slave: pid=41 idx=0 (attempt 1)
basicstation | 2025-04-19 23:47:18.769 [GPS:ERRO] Failed to open TTY ‘./’: Is a directory
basicstation | 2025-04-19 23:47:18.769 [GPS:CRIT] Initial open of GPS FIFO ‘./’ failed - GPS disabled!
basicstation | 2025-04-19 23:47:18.770 [TCE:INFO] Starting TC engine
basicstation | 2025-04-19 23:47:18.930 [AIO:INFO] ./tc.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-04-19 23:47:18.931 [TCE:INFO] Connecting to INFOS: wss://arduino.nam1.cloud.thethings.industries:8887
basicstation | 2025-04-19 23:47:20.190 [TCE:INFO] Infos: b827:ebff:feb3:1100 muxs-::0 wss://arduino.nam1.cloud.thethings.industries:8887/traffic/eui-B827EBFFFEB31100
basicstation | 2025-04-19 23:47:20.190 [AIO:DEBU] [4] ws_close reason=1000
basicstation | 2025-04-19 23:47:20.190 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
basicstation | 2025-04-19 23:47:20.190 [AIO:DEBU] [4] WS connection shutdown…
basicstation | 2025-04-19 23:47:20.344 [AIO:INFO] ./tc.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-04-19 23:47:20.344 [TCE:VERB] Connecting to MUXS…
basicstation | 2025-04-19 23:47:21.376 [S00:VERB] /app/config/reset.sh: Forked, waiting…
basicstation | 2025-04-19 23:47:21.376 [S00:DEBU] execvp argv[0]: </app/config/reset.sh>
basicstation | 2025-04-19 23:47:21.376 [S00:DEBU] argv[1]: </dev/spidev0.1>
basicstation | 2025-04-19 23:47:21.377 [S00:DEBU] argv[2]: <0>
basicstation | Concentrator reset through GPIO17 (using sysfs)
basicstation | 2025-04-19 23:47:21.304 [TCE:VERB] Connected to MUXS.
basicstation | 2025-04-19 23:47:21.335 [RAL:INFO] Region plan hwspec ‘sx1301/1’ mapped to 1 slaves ‘sx1301/1’
basicstation | 2025-04-19 23:47:21.335 [RAL:INFO] Master sending 645 bytes of JSON sx1301conf to slave (0)
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] Configuring for region: US915 – 923.0MHz…928.0MHz
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR0 SF10/BW125
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR1 SF9/BW125
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR2 SF8/BW125
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR3 SF7/BW125
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR4 SF8/BW500
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR5 FSK
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR6 FSK
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR7 FSK
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR8 SF12/BW500
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR9 SF11/BW500
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR10 SF10/BW500
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR11 SF9/BW500
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR12 SF8/BW500
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR13 SF7/BW500
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR14 FSK
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] DR15 FSK
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] TX power: 26.0 dBm EIRP
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] JoinEui list: 0 entries
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] NetID filter: FFFFFFFF-FFFFFFFF-FFFFFFFF-FFFFFFFF
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] Dev/test settings: nocca=1 nodc=1 nodwell=1
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] Beaconing every 2m8s on 923.3MHz(8) @ DR8 (frame layout 5/11/23)
basicstation | 2025-04-19 23:47:21.335 [S2E:INFO] Beaconing suspend - missing GPS data: time
basicstation | Warning: /sys/class/gpio/gpio17 does not exist
basicstation | 2025-04-19 23:47:21.408 [S00:INFO] Process /app/config/reset.sh (pid=42) completed
basicstation | 2025-04-19 23:47:21.408 [S00:INFO] Lora gateway library version: Version: 2.1.0;
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] [LGW sx1302] full_duplex=0 clksrc=0 lorawan_public=1
basicstation | 2025-04-19 23:47:21.409 [S00:DEBU] SX130x txlut table (16 entries)
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] SX1302 txlut 0: rf_power=12 pa_gain=0 pwr_idx=15
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] SX1302 txlut 1: rf_power=13 pa_gain=0 pwr_idx=16
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] SX1302 txlut 2: rf_power=14 pa_gain=0 pwr_idx=17
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] SX1302 txlut 3: rf_power=15 pa_gain=0 pwr_idx=19
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] SX1302 txlut 4: rf_power=16 pa_gain=0 pwr_idx=20
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] SX1302 txlut 5: rf_power=17 pa_gain=0 pwr_idx=22
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] SX1302 txlut 6: rf_power=18 pa_gain=1 pwr_idx=1
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] SX1302 txlut 7: rf_power=19 pa_gain=1 pwr_idx=2
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] SX1302 txlut 8: rf_power=20 pa_gain=1 pwr_idx=3
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] SX1302 txlut 9: rf_power=21 pa_gain=1 pwr_idx=4
basicstation | 2025-04-19 23:47:21.409 [S00:INFO] SX1302 txlut 10: rf_power=22 pa_gain=1 pwr_idx=5
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] SX1302 txlut 11: rf_power=23 pa_gain=1 pwr_idx=6
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] SX1302 txlut 12: rf_power=24 pa_gain=1 pwr_idx=7
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] SX1302 txlut 13: rf_power=25 pa_gain=1 pwr_idx=9
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] SX1302 txlut 14: rf_power=26 pa_gain=1 pwr_idx=11
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] SX1302 txlut 15: rf_power=27 pa_gain=1 pwr_idx=14
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] RX/TX RF0: 904.3MHz rssi_offset=-215.4 type=5 rssi_tcomp=0.000 0.000 20.410 2162.560 0.000
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] RX RF1: 905.0MHz rssi_offset=-215.4 type=5 rssi_tcomp=0.000 0.000 20.410 2162.560 0.000
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [mSF] 0: 903.9MHz rf=0 freq=-400.0 datarate=0
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [mSF] 1: 904.1MHz rf=0 freq=-200.0 datarate=0
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [mSF] 2: 904.3MHz rf=0 freq= +0.0 datarate=0
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [mSF] 3: 904.5MHz rf=0 freq=+200.0 datarate=0
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [mSF] 4: 904.7MHz rf=1 freq=-300.0 datarate=0
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [mSF] 5: 904.9MHz rf=1 freq=-100.0 datarate=0
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [mSF] 6: 905.1MHz rf=1 freq=+100.0 datarate=0
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [mSF] 7: 905.3MHz rf=1 freq=+300.0 datarate=0
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [STD] 8: 904.6MHz rf=0 freq=+300.0 datarate=8 bw=6 Explicit header
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] channel 9 disabled
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] Station device: spi:/dev/spidev0.1 (PPS capture disabled)
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [lgw_com_open:84] Opening SPI communication interface
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [lgw_spi_open:88] Setting SPI speed to 8000000
basicstation | 2025-04-19 23:47:21.410 [S00:INFO] [lgw_connect:1192] chip version is 0x00 (v0.0)
basicstation | ERROR: Failed to set SX1250_0 in STANDBY_RC mode
basicstation | 2025-04-19 23:47:23.011 [S00:ERRO] [lgw_start:908] failed to setup radio 0
basicstation | 2025-04-19 23:47:23.011 [S00:ERRO] Concentrator start failed: lgw_start
basicstation | 2025-04-19 23:47:23.011 [S00:CRIT] Slave radio start up failed with status 0x08
basicstation | 2025-04-19 23:47:22.972 [RAL:ERRO] Slave (0) - EOF
basicstation | 2025-04-19 23:47:22.973 [any:CRIT] Slave pid=41 idx=0: Fatal exit
basicstation exited with code 0
Here is my docker-compose.yml
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: “RAK5146”
TC_KEY: "NNSXS.X2SYTWTGZ4HWICE55FIXLRW3JBQX2IHKEYRPY3A.K7UEK4RWA2ZP445KFCRDK6RDXVOMMAKGZHHO>
TTS_REGION: “us1”
GATEWAY_EUI: “B827EBFFFEB31100”
SERVER: “arduino.nam1.cloud.thethings.industries”
Can anyone help me figure out what is going wrong?