Pi Supply LoRA Gateway HAT with Basic Station TTN

Hello!

I have a Pi Supply LoRa Gateway HAT 915MHz (model is a RAK2247 HAT), and followed this guide: https://www.balena.io/blog/deploy-a-basics-station-lora-gateway-with-ttn-and-balena/

I have changed the specifications to comply with the correct reset pins based off specifications:

However, I get the following error:


12.07.22 17:19:19 (-0700) <basicstation> Gateway EUI: e45f01fffe677a92

12.07.22 17:19:20 (-0700) <basicstation> Using MODEL: SX1301

12.07.22 17:19:20 (-0700) <basicstation> Server: wss://nam1.cloud.thethings.network:8887

12.07.22 17:19:20 (-0700) <basicstation> Resetting gateway concentrator on GPIO 22

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.296 [SYS:INFO] findDefaultEui -> protoEuiSrc /sys/class/net/wlan0/address - protoEUI 251096696584851

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.298 [SYS:INFO] Logging     : stderr (maxsize=10000000, rotate=3)

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.298 [SYS:INFO] Station Ver : 2.0.5(rpi/std) 2022-07-06 19:21:43

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.298 [SYS:INFO] Package Ver : 1.0.0

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.298 [SYS:INFO] proto EUI(x) : 0:e45f:167:7a93	(/sys/class/net/wlan0/address)

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.298 [SYS:INFO] prefix EUI  : ::1	(builtin)

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.298 [SYS:INFO] Station EUI : e45f:1ff:fe67:7a93

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.298 [SYS:INFO] Station home: ./	(builtin)

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.298 [SYS:INFO] Station temp: /var/tmp/	(builtin)

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.298 [SYS:WARN] Station in NO-CUPS mode

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.500 [TCE:INFO] Starting TC engine

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.502 [any:INFO] ./tc.trust: 

12.07.22 17:19:23 (-0700) <basicstation> cert. version     : 3

12.07.22 17:19:23 (-0700) <basicstation> serial number     : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B

12.07.22 17:19:23 (-0700) <basicstation> issuer name       : O=Digital Signature Trust Co., CN=DST Root CA X3

12.07.22 17:19:23 (-0700) <basicstation> subject name      : O=Digital Signature Trust Co., CN=DST Root CA X3

12.07.22 17:19:23 (-0700) <basicstation> issued  on        : 2000-09-30 21:12:19

12.07.22 17:19:23 (-0700) <basicstation> expires on        : 2021-09-30 14:01:15

12.07.22 17:19:23 (-0700) <basicstation> signed using      : RSA with SHA1

12.07.22 17:19:23 (-0700) <basicstation> RSA key size      : 2048 bits

12.07.22 17:19:23 (-0700) <basicstation> basic constraints : CA=true

12.07.22 17:19:23 (-0700) <basicstation> key usage         : Key Cert Sign, CRL Sign

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.502 [AIO:INFO] tc has no cert configured - running server auth and client auth with token

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.561 [TCE:INFO] Connecting to INFOS: wss://nam1.cloud.thethings.network:8887

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.782 [TCE:ERRO] Infos error: ::0 Failed to fetch gateway: error:pkg/gatewayserver:gateway_eui_not_registered (gateway EUI `E45F01FFFE677A93` is not registered)

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.782 [AIO:DEBU] [3] ws_close reason=1000

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.782 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.782 [AIO:DEBU] [3] WS connection shutdown...

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.783 [TCE:INFO] INFOS reconnect backoff 0s (retry 0)

12.07.22 17:19:23 (-0700) <basicstation> 2022-07-13 00:19:23.784 [any:INFO] ./tc.trust: 

A balena team member posted a solution here by deploying this repo. Using the same variables and redeploying with the suggested repo took care of the incorrect EUI “not registered”, but I still came across an issue:

2.07.22 17:32:19 (-0700) <basicstation> GATEWAY_EUI: E45F01FFFE677A92

12.07.22 17:32:20 (-0700) <basicstation> parse error: Invalid numeric literal at EOF at line 1, column 12

12.07.22 17:32:20 (-0700) <basicstation> 

12.07.22 17:32:20 (-0700) <basicstation> ------------------------------------------------------------------

12.07.22 17:32:20 (-0700) <basicstation> Protocol

12.07.22 17:32:20 (-0700) <basicstation> ------------------------------------------------------------------

12.07.22 17:32:20 (-0700) <basicstation> Mode:          DYNAMIC

12.07.22 17:32:20 (-0700) <basicstation> Protocol:      LNS

12.07.22 17:32:20 (-0700) <basicstation> LNS Server:    wss://nam1.cloud.thethings.network:8887

12.07.22 17:32:20 (-0700) <basicstation> Main NIC:      eth0

12.07.22 17:32:20 (-0700) <basicstation> Gateway EUI:   E45F01FFFE677A92

12.07.22 17:32:20 (-0700) <basicstation> ------------------------------------------------------------------

12.07.22 17:32:20 (-0700) <basicstation> Radio

12.07.22 17:32:20 (-0700) <basicstation> ------------------------------------------------------------------

12.07.22 17:32:20 (-0700) <basicstation> Model:         SX1301

12.07.22 17:32:20 (-0700) <basicstation> Concentrator:  SX1301

12.07.22 17:32:20 (-0700) <basicstation> Design:        V2

12.07.22 17:32:20 (-0700) <basicstation> Radio Device:  /dev/spidev0.0

12.07.22 17:32:20 (-0700) <basicstation> Interface:     SPI

12.07.22 17:32:20 (-0700) <basicstation> SPI Speed:     2000000

12.07.22 17:32:20 (-0700) <basicstation> Reset GPIO:    22

12.07.22 17:32:20 (-0700) <basicstation> Enable GPIO:   0

12.07.22 17:32:20 (-0700) <basicstation> ------------------------------------------------------------------

12.07.22 17:32:20 (-0700) <basicstation> 

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.003 [SYS:INFO] Logging     : stderr (maxsize=10000000, rotate=3)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.004 [SYS:INFO] Station Ver : 2.0.6(rpi/stdn) 2022-06-17 14:47:13

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.004 [SYS:INFO] Package Ver : (null)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.004 [SYS:INFO] mbedTLS Ver : 2.28.0

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.005 [SYS:INFO] proto EUI   : e45f:1ff:fe67:7a92	(station.conf)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.005 [SYS:INFO] prefix EUI  : ::1	(builtin)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.005 [SYS:INFO] Station EUI : e45f:1ff:fe67:7a92

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.005 [SYS:INFO] Station home: ./	(builtin)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.006 [SYS:INFO] Station temp: /var/tmp/	(builtin)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.006 [SYS:WARN] Station in NO-CUPS mode

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.012 [RAL:DEBU] execvp argv[0]: </proc/self/exe>

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.012 [RAL:DEBU]        argv[1]: <-S>

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.012 [RAL:DEBU]        argv[2]: <(null)>

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.017 [S00:INFO] Logging     : stderr (maxsize=10000000, rotate=3)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.017 [S00:INFO] Station Ver : 2.0.6(rpi/stdn) 2022-06-17 14:47:13

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.018 [S00:INFO] Package Ver : (null)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.018 [S00:INFO] mbedTLS Ver : 2.28.0

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.019 [S00:INFO] proto EUI   : e45f:1ff:fe67:7a92	(station.conf)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.019 [S00:INFO] prefix EUI  : ::1	(builtin)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.020 [S00:INFO] Station EUI : e45f:1ff:fe67:7a92

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.020 [S00:INFO] Station home: ./	(builtin)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.021 [S00:INFO] Station temp: /var/tmp/	(builtin)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.021 [S00:INFO] Station slave: 0

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.021 [S00:WARN] Station in NO-CUPS mode

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.022 [S00:INFO] Slave LGW (0) - started.

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.012 [RAL:INFO] Master has started slave: pid=46 idx=0 (attempt 1)

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.211 [TCE:INFO] Starting TC engine

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.280 [AIO:INFO] ./tc.trust: 

12.07.22 17:32:21 (-0700) <basicstation> cert. version     : 3

12.07.22 17:32:21 (-0700) <basicstation> serial number     : 04:00:00:00:00:01:15:4B:5A:C3:94

12.07.22 17:32:21 (-0700) <basicstation> issuer name       : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA

12.07.22 17:32:21 (-0700) <basicstation> subject name      : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA

12.07.22 17:32:21 (-0700) <basicstation> issued  on        : 1998-09-01 12:00:00

12.07.22 17:32:21 (-0700) <basicstation> expires on        : 2028-01-28 12:00:00

12.07.22 17:32:21 (-0700) <basicstation> signed using      : RSA with SHA1

12.07.22 17:32:21 (-0700) <basicstation> RSA key size      : 2048 bits

12.07.22 17:32:21 (-0700) <basicstation> basic constraints : CA=true

12.07.22 17:32:21 (-0700) <basicstation> key usage         : Key Cert Sign, CRL Sign

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.280 [TCE:INFO] Connecting to INFOS: wss://nam1.cloud.thethings.network:8887

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.644 [TCE:INFO] Infos: e45f:1ff:fe67:7a92 muxs-::0 wss://nam1.cloud.thethings.network:8887/traffic/eui-E45F01FFFE677A92

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.645 [AIO:DEBU] [4] ws_close reason=1000

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.645 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.645 [AIO:DEBU] [4] WS connection shutdown...

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.711 [AIO:INFO] ./tc.trust: 

12.07.22 17:32:21 (-0700) <basicstation> cert. version     : 3

12.07.22 17:32:21 (-0700) <basicstation> serial number     : 04:00:00:00:00:01:15:4B:5A:C3:94

12.07.22 17:32:21 (-0700) <basicstation> issuer name       : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA

12.07.22 17:32:21 (-0700) <basicstation> subject name      : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA

12.07.22 17:32:21 (-0700) <basicstation> issued  on        : 1998-09-01 12:00:00

12.07.22 17:32:21 (-0700) <basicstation> expires on        : 2028-01-28 12:00:00

12.07.22 17:32:21 (-0700) <basicstation> signed using      : RSA with SHA1

12.07.22 17:32:21 (-0700) <basicstation> RSA key size      : 2048 bits

12.07.22 17:32:21 (-0700) <basicstation> basic constraints : CA=true

12.07.22 17:32:21 (-0700) <basicstation> key usage         : Key Cert Sign, CRL Sign

12.07.22 17:32:21 (-0700) <basicstation> 2022-07-13 00:32:21.711 [TCE:VERB] Connecting to MUXS...

12.07.22 17:32:22 (-0700) <basicstation> 2022-07-13 00:32:22.076 [AIO:ERRO] [4] WS upgrade failed with HTTP status code: 400

12.07.22 17:32:22 (-0700) <basicstation> 2022-07-13 00:32:22.076 [AIO:DEBU] [4] WS connection shutdown...

12.07.22 17:32:22 (-0700) <basicstation> 2022-07-13 00:32:22.076 [TCE:VERB] Connection to MUXS closed in state 3

12.07.22 17:32:22 (-0700) <basicstation> 2022-07-13 00:32:22.076 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)

Both deployment of repos showed the device online in Balena but “disconnected” on TTN. I am new to using Balena OS along with TTN (I have mostly been using LoRa P2P) so any advice is definitely appreciated!

1 Like

Hello @daaz welcome to the balena community!

Could you please confirm that with the 2nd deployment you registered again the gateway using the EUI E45F01FFFE677A92 at TTN? Did you change the TC_KEY?

1 Like

wow…registering again for the 2nd deployment seemed to do the trick! Thank you @mpous. The gateway is now connected with time sync rejection issues that were brought up from that previous post

Here is the log upon connection:

13.07.22 10:02:51 (-0700) <basicstation> GATEWAY_EUI: E45F01FFFE677A92

13.07.22 10:02:51 (-0700) <basicstation> parse error: Invalid numeric literal at EOF at line 1, column 12

13.07.22 10:02:51 (-0700) <basicstation> 

13.07.22 10:02:51 (-0700) <basicstation> ------------------------------------------------------------------

13.07.22 10:02:51 (-0700) <basicstation> Protocol

13.07.22 10:02:51 (-0700) <basicstation> ------------------------------------------------------------------

13.07.22 10:02:51 (-0700) <basicstation> Mode:          DYNAMIC

13.07.22 10:02:51 (-0700) <basicstation> Protocol:      LNS

13.07.22 10:02:51 (-0700) <basicstation> LNS Server:    wss://nam1.cloud.thethings.network:8887

13.07.22 10:02:51 (-0700) <basicstation> Main NIC:      eth0

13.07.22 10:02:51 (-0700) <basicstation> Gateway EUI:   E45F01FFFE677A92

13.07.22 10:02:51 (-0700) <basicstation> ------------------------------------------------------------------

13.07.22 10:02:51 (-0700) <basicstation> Radio

13.07.22 10:02:51 (-0700) <basicstation> ------------------------------------------------------------------

13.07.22 10:02:51 (-0700) <basicstation> Model:         SX1301

13.07.22 10:02:51 (-0700) <basicstation> Concentrator:  SX1301

13.07.22 10:02:51 (-0700) <basicstation> Design:        V2

13.07.22 10:02:51 (-0700) <basicstation> Radio Device:  /dev/spidev0.0

13.07.22 10:02:51 (-0700) <basicstation> Interface:     SPI

13.07.22 10:02:51 (-0700) <basicstation> SPI Speed:     2000000

13.07.22 10:02:51 (-0700) <basicstation> Reset GPIO:    22

13.07.22 10:02:51 (-0700) <basicstation> Enable GPIO:   0

13.07.22 10:02:51 (-0700) <basicstation> ------------------------------------------------------------------

13.07.22 10:02:51 (-0700) <basicstation> 

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.889 [SYS:INFO] Logging     : stderr (maxsize=10000000, rotate=3)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.889 [SYS:INFO] Station Ver : 2.0.6(rpi/stdn) 2022-06-17 14:47:13

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.889 [SYS:INFO] Package Ver : (null)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.889 [SYS:INFO] mbedTLS Ver : 2.28.0

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.889 [SYS:INFO] proto EUI   : e45f:1ff:fe67:7a92	(station.conf)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.889 [SYS:INFO] prefix EUI  : ::1	(builtin)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.889 [SYS:INFO] Station EUI : e45f:1ff:fe67:7a92

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.889 [SYS:INFO] Station home: ./	(builtin)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.889 [SYS:INFO] Station temp: /var/tmp/	(builtin)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.889 [SYS:WARN] Station in NO-CUPS mode

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.893 [RAL:DEBU] execvp argv[0]: </proc/self/exe>

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.893 [RAL:DEBU]        argv[1]: <-S>

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.893 [RAL:DEBU]        argv[2]: <(null)>

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.900 [S00:INFO] Logging     : stderr (maxsize=10000000, rotate=3)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.900 [S00:INFO] Station Ver : 2.0.6(rpi/stdn) 2022-06-17 14:47:13

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.900 [S00:INFO] Package Ver : (null)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.900 [S00:INFO] mbedTLS Ver : 2.28.0

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.900 [S00:INFO] proto EUI   : e45f:1ff:fe67:7a92	(station.conf)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.901 [S00:INFO] prefix EUI  : ::1	(builtin)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.901 [S00:INFO] Station EUI : e45f:1ff:fe67:7a92

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.902 [S00:INFO] Station home: ./	(builtin)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.902 [S00:INFO] Station temp: /var/tmp/	(builtin)

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.902 [S00:INFO] Station slave: 0

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.902 [S00:WARN] Station in NO-CUPS mode

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.903 [S00:INFO] Slave LGW (0) - started.

13.07.22 10:02:51 (-0700) <basicstation> 2022-07-13 17:02:51.893 [RAL:INFO] Master has started slave: pid=45 idx=0 (attempt 1)

13.07.22 10:02:52 (-0700) <basicstation> 2022-07-13 17:02:52.092 [TCE:INFO] Starting TC engine

13.07.22 10:02:52 (-0700) <basicstation> 2022-07-13 17:02:52.159 [AIO:INFO] ./tc.trust: 

13.07.22 10:02:52 (-0700) <basicstation> cert. version     : 3

13.07.22 10:02:52 (-0700) <basicstation> serial number     : 04:00:00:00:00:01:15:4B:5A:C3:94

13.07.22 10:02:52 (-0700) <basicstation> issuer name       : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA

13.07.22 10:02:52 (-0700) <basicstation> subject name      : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA

13.07.22 10:02:52 (-0700) <basicstation> issued  on        : 1998-09-01 12:00:00

13.07.22 10:02:52 (-0700) <basicstation> expires on        : 2028-01-28 12:00:00

13.07.22 10:02:52 (-0700) <basicstation> signed using      : RSA with SHA1

13.07.22 10:02:52 (-0700) <basicstation> RSA key size      : 2048 bits

13.07.22 10:02:52 (-0700) <basicstation> basic constraints : CA=true

13.07.22 10:02:52 (-0700) <basicstation> key usage         : Key Cert Sign, CRL Sign

13.07.22 10:02:52 (-0700) <basicstation> 2022-07-13 17:02:52.160 [TCE:INFO] Connecting to INFOS: wss://nam1.cloud.thethings.network:8887

13.07.22 10:02:52 (-0700) <basicstation> 2022-07-13 17:02:52.609 [TCE:INFO] Infos: e45f:1ff:fe67:7a92 muxs-::0 wss://nam1.cloud.thethings.network:8887/traffic/eui-E45F01FFFE677A92

13.07.22 10:02:52 (-0700) <basicstation> 2022-07-13 17:02:52.609 [AIO:DEBU] [4] ws_close reason=1000

13.07.22 10:02:52 (-0700) <basicstation> 2022-07-13 17:02:52.609 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed

13.07.22 10:02:52 (-0700) <basicstation> 2022-07-13 17:02:52.610 [AIO:DEBU] [4] WS connection shutdown...

13.07.22 10:02:52 (-0700) <basicstation> 2022-07-13 17:02:52.676 [AIO:INFO] ./tc.trust: 

13.07.22 10:02:52 (-0700) <basicstation> cert. version     : 3

13.07.22 10:02:52 (-0700) <basicstation> serial number     : 04:00:00:00:00:01:15:4B:5A:C3:94

13.07.22 10:02:52 (-0700) <basicstation> issuer name       : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA

13.07.22 10:02:52 (-0700) <basicstation> subject name      : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA

13.07.22 10:02:52 (-0700) <basicstation> issued  on        : 1998-09-01 12:00:00

13.07.22 10:02:52 (-0700) <basicstation> expires on        : 2028-01-28 12:00:00

13.07.22 10:02:52 (-0700) <basicstation> signed using      : RSA with SHA1

13.07.22 10:02:52 (-0700) <basicstation> RSA key size      : 2048 bits

13.07.22 10:02:52 (-0700) <basicstation> basic constraints : CA=true

13.07.22 10:02:52 (-0700) <basicstation> key usage         : Key Cert Sign, CRL Sign

13.07.22 10:02:52 (-0700) <basicstation> 2022-07-13 17:02:52.676 [TCE:VERB] Connecting to MUXS...

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.358 [TCE:VERB] Connected to MUXS.

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.489 [S00:VERB] ./reset.sh: Forked, waiting...

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.489 [S00:DEBU] execvp argv[0]: <./reset.sh>

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.490 [S00:DEBU]        argv[1]: </dev/spidev0.0>

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.490 [S00:DEBU]        argv[2]: <0>

13.07.22 10:02:53 (-0700) <basicstation> Concentrator reset through GPIO17

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [RAL:INFO] Region plan hwspec 'sx1301/1' mapped to 1 slaves 'sx1301/1'

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [RAL:INFO] Master sending 645 bytes of JSON sx1301conf to slave (0)

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO] Configuring for region: US915 -- 923.0MHz..928.0MHz

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR0  SF10/BW125 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR1  SF9/BW125 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR2  SF8/BW125 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR3  SF7/BW125 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR4  SF8/BW500 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR5  FSK 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR6  FSK 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR7  FSK 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR8  SF12/BW500 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR9  SF11/BW500 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR10 SF10/BW500 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR11 SF9/BW500 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR12 SF8/BW500 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR13 SF7/BW500 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR14 FSK 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   DR15 FSK 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   TX power: 26.0 dBm EIRP

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   JoinEui list: 0 entries

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   NetID filter: FFFFFFFF-FFFFFFFF-FFFFFFFF-FFFFFFFF

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.479 [S2E:INFO]   Dev/test settings: nocca=1 nodc=1 nodwell=1

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.826 [S00:INFO] Process ./reset.sh (pid=46) completed

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.826 [S00:INFO] Lora gateway library version: Version: 5.0.1;

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.828 [S00:INFO] [LGW lgw1] clksrc=1 lorawan_public=1

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.829 [S00:INFO]  RX/TX RF0:    904.3MHz rssi_offset=-166.0 type=2 tx_notch_freq=0

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.829 [S00:INFO]  RX    RF1:    905.0MHz rssi_offset=-166.0 type=2 tx_notch_freq=0

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.829 [S00:INFO]  [mSF]   0:    903.9MHz rf=0 freq=-400.0 datarate=0

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.829 [S00:INFO]  [mSF]   1:    904.1MHz rf=0 freq=-200.0 datarate=0

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.829 [S00:INFO]  [mSF]   2:    904.3MHz rf=0 freq=  +0.0 datarate=0

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.829 [S00:INFO]  [mSF]   3:    904.5MHz rf=0 freq=+200.0 datarate=0

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.829 [S00:INFO]  [mSF]   4:    904.7MHz rf=1 freq=-300.0 datarate=0

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.829 [S00:INFO]  [mSF]   5:    904.9MHz rf=1 freq=-100.0 datarate=0

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.829 [S00:INFO]  [mSF]   6:    905.1MHz rf=1 freq=+100.0 datarate=0

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.829 [S00:INFO]  [mSF]   7:    905.3MHz rf=1 freq=+300.0 datarate=0

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.829 [S00:INFO]  [STD]   8:    904.6MHz rf=0 freq=+300.0 datarate=4 bw=1 

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.830 [S00:INFO]  channel 9 disabled

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.830 [S00:INFO] SX130x LBT not enabled

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.830 [S00:INFO] Station device: /dev/spidev0.0 (PPS capture disabled)

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.830 [S00:INFO] [lgw_spi_open:101] Setting SPI speed to 2000000

13.07.22 10:02:53 (-0700) <basicstation> 2022-07-13 17:02:53.830 [S00:INFO] [lgw_spi_open:135] Note: SPI port opened and configured ok

13.07.22 10:02:57 (-0700) <basicstation> 2022-07-13 17:02:57.155 [S00:INFO] Concentrator started (3s325ms)

13.07.22 10:03:39 (-0700) <basicstation> 2022-07-13 17:03:39.159 [SYN:INFO] MCU/SX130X drift stats: min: +0.0ppm  q50: +1.0ppm  q80: +7.6ppm  max: +13.3ppm - threshold q90: +9.5ppm

13.07.22 10:03:39 (-0700) <basicstation> 2022-07-13 17:03:39.159 [SYN:INFO] Mean MCU drift vs SX130X#0: 1.0ppm

13.07.22 10:03:56 (-0700) <basicstation> 2022-07-13 17:03:55.965 [SYN:INFO] Time sync qualities: min=73 q90=171 max=175 (previous q90=2147483647)

13.07.22 10:04:01 (-0700) <basicstation> 2022-07-13 17:04:01.217 [SYN:VERB] Time sync rejected: quality=173 threshold=171

13.07.22 10:04:19 (-0700) <basicstation> 2022-07-13 17:04:19.073 [SYN:INFO] MCU/SX130X drift stats: min: +0.0ppm  q50: -3.6ppm  q80: +10.0ppm  max: -14.8ppm - threshold q90: -13.8ppm

13.07.22 10:04:19 (-0700) <basicstation> 2022-07-13 17:04:19.073 [SYN:INFO] Mean MCU drift vs SX130X#0: 0.1ppm

13.07.22 10:04:25 (-0700) <basicstation> 2022-07-13 17:04:25.375 [SYN:VERB] Time sync rejected: quality=174 threshold=171

13.07.22 10:04:48 (-0700) <basicstation> 2022-07-13 17:04:48.074 [S00:DEBU] [CRC FAIL] 905.300MHz -11.50/-105.0 SF7/BW125 (mod=16/dr=2/bw=3) xtick=06c6ed94 (113700244) 163 bytes: 8B439BBEAEABB49C320A7711AF72E3C446C7423567D287C0E26802D7BD391BC11F0AEF4258364191F14C8E47AF98F557ECB01A1190161927AA1B2802836ED52B..

13.07.22 10:04:56 (-0700) <basicstation> 2022-07-13 17:04:56.885 [SYN:INFO] Time sync qualities: min=102 q90=171 max=174 (previous q90=171)

13.07.22 10:05:03 (-0700) <basicstation> 2022-07-13 17:05:03.187 [SYN:INFO] MCU/SX130X drift stats: min: +0.0ppm  q50: +2.4ppm  q80: +9.5ppm  max: +12.9ppm - threshold q90: -11.9ppm

13.07.22 10:05:03 (-0700) <basicstation> 2022-07-13 17:05:03.187 [SYN:INFO] Mean MCU drift vs SX130X#0: 0.6ppm

13.07.22 10:05:22 (-0700) <basicstation> 2022-07-13 17:05:22.094 [SYN:VERB] Time sync rejected: quality=198 threshold=171

13.07.22 10:05:34 (-0700) <basicstation> 2022-07-13 17:05:34.698 [SYN:VERB] Time sync rejected: quality=207 threshold=171

13.07.22 10:05:48 (-0700) <basicstation> 2022-07-13 17:05:48.353 [SYN:INFO] MCU/SX130X drift stats: min: +0.0ppm  q50: -4.0ppm  q80: +9.5ppm  max: -23.8ppm - threshold q90: +11.9ppm

13.07.22 10:05:48 (-0700) <basicstation> 2022-07-13 17:05:48.353 [SYN:INFO] Mean MCU drift vs SX130X#0: 0.1ppm

13.07.22 10:05:58 (-0700) <basicstation> 2022-07-13 17:05:58.856 [SYN:INFO] Time sync qualities: min=99 q90=171 max=207 (previous q90=171)

13.07.22 10:06:17 (-0700) <basicstation> 2022-07-13 17:06:17.762 [SYN:VERB] Time sync rejected: quality=191 threshold=171

13.07.22 10:06:25 (-0700) <basicstation> 2022-07-13 17:06:25.440 [S00:DEBU] [CRC FAIL] 904.300MHz -11.25/-102.0 SF7/BW125 (mod=16/dr=2/bw=3) xtick=0c94b9ab (211073451) 149 bytes: 7AB11D1852E908D7E592F0E5C693583036539E2F3BB76BDB843185C4DFD3DE656B7B96DB54F999C3950BF7270D0AD62E70B853336C3A8E349BA6CC3D3DBDD714..

13.07.22 10:06:32 (-0700) <basicstation> 2022-07-13 17:06:32.466 [SYN:INFO] MCU/SX130X drift stats: min: +0.0ppm  q50: -3.8ppm  q80: -10.0ppm  max: +11.4ppm - threshold q90: +10.5ppm

13.07.22 10:06:32 (-0700) <basicstation> 2022-07-13 17:06:32.466 [SYN:INFO] Mean MCU drift vs SX130X#0: 1.0ppm

13.07.22 10:07:01 (-0700) <basicstation> 2022-07-13 17:07:01.875 [SYN:INFO] Time sync qualities: min=69 q90=169 max=191 (previous q90=171)

I will start testing this with some nodes. For anybody who has purchased the Pi Supply IoT LoRa Gateway HAT 915Mhz, (RAK2247):
Repo: https://github.com/xoseperez/basicstation
GW_RESET_GPIO is 22
GW_RESET_PIN is 15 (deprecated)
TC_KEY can be directly copied from TTN, without need to remove the leading added letters.

Hello @daaz sometimes i had the same behaviour on my gateways. I usually restarted from balenaCloud the gateway or leave it like that during some time and worked again. Let me know what do work for you!

BTW I found this ticket on the original repo, however i’m not sure about the solution.