Problems with basicstation

On a RAK7244 Developer Gateway I’ve used the official one click deploy with balena button from here:

Followed both the youtube instructions, blog post, and readme instructions (including properly setting the GW_KEY and GW_ID).

TTN shows I am connected, but I’m looking at my balena logs and the device has been stuck on repeat with the follow log errors every 10 seconds.

Any ideas?

23.08.20 15:50:48 (-0400)  main  2020-08-23 19:50:48.050 [any:INFO] ./tc.trust: 
23.08.20 15:50:48 (-0400)  main  cert. version     : 3
23.08.20 15:50:48 (-0400)  main  serial number     : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
23.08.20 15:50:48 (-0400)  main  issuer name       : O=Digital Signature Trust Co., CN=DST Root CA X3
23.08.20 15:50:48 (-0400)  main  subject name      : O=Digital Signature Trust Co., CN=DST Root CA X3
23.08.20 15:50:48 (-0400)  main  issued  on        : 2000-09-30 21:12:19
23.08.20 15:50:48 (-0400)  main  expires on        : 2021-09-30 14:01:15
23.08.20 15:50:48 (-0400)  main  signed using      : RSA with SHA1
23.08.20 15:50:48 (-0400)  main  RSA key size      : 2048 bits
23.08.20 15:50:48 (-0400)  main  basic constraints : CA=true
23.08.20 15:50:48 (-0400)  main  key usage         : Key Cert Sign, CRL Sign
23.08.20 15:50:48 (-0400)  main  2020-08-23 19:50:48.050 [AIO:INFO] tc has no key+cert configured - running server auth only
23.08.20 15:50:48 (-0400)  main  2020-08-23 19:50:48.141 [TCE:INFO] Connecting to INFOS: wss://lns.us.thethings.network:443
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:48.935 [TCE:INFO] Infos: dca6:32ff:fe36:fb52 muxs-::0 wss://lns.us.thethings.network:443/traffic/eui-DCA632FFFE36FB52
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:48.935 [AIO:DEBU] [3] ws_close reason=1000
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:48.935 [AIO:DEBU] Echoing close - reason=1000
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:48.935 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:48.935 [AIO:DEBU] [3] WS connection shutdown...
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:48.936 [any:INFO] ./tc.trust: 
23.08.20 15:50:49 (-0400)  main  cert. version     : 3
23.08.20 15:50:49 (-0400)  main  serial number     : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
23.08.20 15:50:49 (-0400)  main  issuer name       : O=Digital Signature Trust Co., CN=DST Root CA X3
23.08.20 15:50:49 (-0400)  main  subject name      : O=Digital Signature Trust Co., CN=DST Root CA X3
23.08.20 15:50:49 (-0400)  main  issued  on        : 2000-09-30 21:12:19
23.08.20 15:50:49 (-0400)  main  expires on        : 2021-09-30 14:01:15
23.08.20 15:50:49 (-0400)  main  signed using      : RSA with SHA1
23.08.20 15:50:49 (-0400)  main  RSA key size      : 2048 bits
23.08.20 15:50:49 (-0400)  main  basic constraints : CA=true
23.08.20 15:50:49 (-0400)  main  key usage         : Key Cert Sign, CRL Sign
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:48.936 [AIO:INFO] tc has no key+cert configured - running server auth only
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.021 [TCE:VERB] Connecting to MUXS...
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.461 [TCE:VERB] Connected to MUXS.
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.544 [RAL:WARN] Ignoring unsupported/unknown field: antenna_gain
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.544 [RAL:INFO] Lora gateway library version: Version: 5.0.1;
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.544 [RAL:VERB] Connecting to device: /dev/spidev0.0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.544 [RAL:DEBU] SX130x txlut table (0 entries)
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.544 [RAL:VERB] SX1301 rxrfchain 0: enable=1 freq=904.3MHz rssi_offset=-166.000000 type=2 tx_enable=1 tx_notch_freq=0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX1301 rxrfchain 1: enable=1 freq=905.0MHz rssi_offset=-166.000000 type=2 tx_enable=0 tx_notch_freq=0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX1301 ifchain  0: enable=1 rf_chain=0 freq=-400000 bandwidth=0 datarate=0 sync_word=0/0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX1301 ifchain  1: enable=1 rf_chain=0 freq=-200000 bandwidth=0 datarate=0 sync_word=0/0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX1301 ifchain  2: enable=1 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX1301 ifchain  3: enable=1 rf_chain=0 freq=200000 bandwidth=0 datarate=0 sync_word=0/0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX1301 ifchain  4: enable=1 rf_chain=1 freq=-300000 bandwidth=0 datarate=0 sync_word=0/0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX1301 ifchain  5: enable=1 rf_chain=1 freq=-100000 bandwidth=0 datarate=0 sync_word=0/0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX1301 ifchain  6: enable=1 rf_chain=1 freq=100000 bandwidth=0 datarate=0 sync_word=0/0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX1301 ifchain  7: enable=1 rf_chain=1 freq=300000 bandwidth=0 datarate=0 sync_word=0/0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX1301 ifchain  8: enable=1 rf_chain=0 freq=300000 bandwidth=1 datarate=4 sync_word=0/0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX1301 ifchain  9: enable=0 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] SX130x LBT not enabled
23.08.20 15:50:49 (-0400)  main  2020-08-23 19:50:49.545 [RAL:VERB] Station device: /dev/spidev0.0 (PPS capture disabled)
23.08.20 15:50:50 (-0400)  main  ERROR: Failed to load fw 1
23.08.20 15:50:50 (-0400)  main  ERROR: Version of calibration firmware not expected, actual:1 expected:2
23.08.20 15:50:50 (-0400)  main  2020-08-23 19:50:50.109 [RAL:ERRO] Concentrator start failed: lgw_start
23.08.20 15:50:50 (-0400)  main  2020-08-23 19:50:50.109 [RAL:ERRO] ral_config failed with status 0x08
23.08.20 15:50:50 (-0400)  main  2020-08-23 19:50:50.109 [any:ERRO] Closing connection to muxs - error in s2e_onMsg
23.08.20 15:50:50 (-0400)  main  2020-08-23 19:50:50.109 [AIO:DEBU] [3] ws_close reason=1000
23.08.20 15:50:50 (-0400)  main  2020-08-23 19:50:50.109 [AIO:DEBU] Echoing close - reason=1000
23.08.20 15:50:50 (-0400)  main  2020-08-23 19:50:50.196 [AIO:DEBU] [3|WS] Server sent close: reason=1000
23.08.20 15:50:50 (-0400)  main  2020-08-23 19:50:50.196 [AIO:DEBU] [3] WS connection shutdown...
23.08.20 15:50:50 (-0400)  main  2020-08-23 19:50:50.196 [TCE:VERB] Connection to MUXS closed in state -1
23.08.20 15:50:50 (-0400)  main  2020-08-23 19:50:50.196 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)

Hello Barry! thank you for reporting!

it seems to me that the certificate haven’t been downloaded properly. It happened to me in the past as well. My only solution at the moment is to restart the device and check in the first lines of the logs if the tc_cert have been downloaded properly!

could you please check that?

let’s stay connected

Marc

pd. we have been thinking solutions to have the certificate already downloaded in the container. It’s on the to-do list!

Thanks for the reply. Seems that restarting with power cycle didn’t do the trick. I do see what you’re talking about with regard to the tc_cert:

23.08.20 15:59:46 (-0400) main 2020-08-23 19:59:46.501 [AIO:INFO] tc has no key+cert configured - running server auth only

Full logs:

23.08.20 15:55:59 (-0400) <main> 2020-08-23 19:55:59.652 [RAL:VERB] SX1301 ifchain  9: enable=0 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0
23.08.20 15:55:59 (-0400) <main> 2020-08-23 19:55:59.652 [RAL:VERB] SX130x LBT not enabled
23.08.20 15:55:59 (-0400) <main> 2020-08-23 19:55:59.652 [RAL:VERB] Station device: /dev/spidev0.0 (PPS capture disabled)
23.08.20 15:56:00 (-0400) <main> ERROR: Failed to load fw 1
23.08.20 15:56:02 (-0400) <main> 2020-08-23 19:56:02.530 [RAL:ERRO] Concentrator start failed: lgw_start
23.08.20 15:56:02 (-0400) <main> 2020-08-23 19:56:02.530 [RAL:ERRO] ral_config failed with status 0x08
23.08.20 15:56:02 (-0400) <main> 2020-08-23 19:56:02.530 [any:ERRO] Closing connection to muxs - error in s2e_onMsg
23.08.20 15:56:02 (-0400) <main> 2020-08-23 19:56:02.530 [AIO:DEBU] [3] ws_close reason=1000
23.08.20 15:56:02 (-0400) <main> 2020-08-23 19:56:02.530 [AIO:DEBU] Echoing close - reason=1000
23.08.20 15:56:02 (-0400) <main> 2020-08-23 19:56:02.631 [AIO:DEBU] [3|WS] Server sent close: reason=1000
23.08.20 15:56:02 (-0400) <main> 2020-08-23 19:56:02.631 [AIO:DEBU] [3] WS connection shutdown...
23.08.20 15:56:02 (-0400) <main> 2020-08-23 19:56:02.632 [TCE:VERB] Connection to MUXS closed in state -1
23.08.20 15:56:02 (-0400) <main> 2020-08-23 19:56:02.632 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)
23.08.20 15:56:12 (-0400) <main> 2020-08-23 19:56:12.633 [any:INFO] ./tc.trust: 
23.08.20 15:56:12 (-0400) <main> cert. version     : 3
23.08.20 15:56:12 (-0400) <main> serial number     : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
23.08.20 15:56:12 (-0400) <main> issuer name       : O=Digital Signature Trust Co., CN=DST Root CA X3
23.08.20 15:56:12 (-0400) <main> subject name      : O=Digital Signature Trust Co., CN=DST Root CA X3
23.08.20 15:56:12 (-0400) <main> issued  on        : 2000-09-30 21:12:19
23.08.20 15:56:12 (-0400) <main> expires on        : 2021-09-30 14:01:15
23.08.20 15:56:12 (-0400) <main> signed using      : RSA with SHA1
23.08.20 15:56:12 (-0400) <main> RSA key size      : 2048 bits
23.08.20 15:56:12 (-0400) <main> basic constraints : CA=true
23.08.20 15:56:12 (-0400) <main> key usage         : Key Cert Sign, CRL Sign
23.08.20 15:56:12 (-0400) <main> 2020-08-23 19:56:12.633 [AIO:INFO] tc has no key+cert configured - running server auth only
23.08.20 15:56:12 (-0400) <main> 2020-08-23 19:56:12.733 [TCE:INFO] Connecting to INFOS: wss://lns.us.thethings.network:443
23.08.20 15:56:13 (-0400) <main> 2020-08-23 19:56:13.274 [TCE:INFO] Infos: dca6:32ff:fe36:fb52 muxs-::0 wss://lns.us.thethings.network:443/traffic/eui-DCA632FFFE36FB52
23.08.20 15:56:13 (-0400) <main> 2020-08-23 19:56:13.274 [AIO:DEBU] [3] ws_close reason=1000
23.08.20 15:56:13 (-0400) <main> 2020-08-23 19:56:13.274 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
23.08.20 15:56:13 (-0400) <main> 2020-08-23 19:56:13.274 [AIO:DEBU] [3] WS connection shutdown...
23.08.20 15:56:13 (-0400) <main> 2020-08-23 19:56:13.275 [any:INFO] ./tc.trust:

Barry, what device are you using? i will try to replicate to see if i get the same error.

It’s the RAK7244 - Pi4 with RAK2245 US915
Thanks for looking into it

and could you point me to the repo you are using?

It’s the balena official repo here:

I’ll try again with a brand new application, new flash to sd, and an unmodified version of the official repo and report back if I get different results.

thanks for the clarification! i wanted to be sure! did you change the region? i’m going to try with EU

I did change the region with a device env variable on the device page to:
TC_URI : wss://lns.us.thethings.network:443

@mpous do you want me to grant support access to the device before I delete the app and try fresh?

i’m testing on my side and everything works good! please share it with me if you want @barryjump

@mpous thats encouraging, wondering if its a problem with the wss://lns.us.thethings.network:443 setting? Did you use the EU endpoint or the US?

Also, if it’s a problem with the US endpoint, do you know if it matters if I just use the EU server even if I’m in the US?

Granted support on the application just now, thanks for digging!

i’m marc6 on balenacloud @barryjump

I did the support access grant earlier, assumed you would see that.

But also just invited you as a collaborator. Thanks!

Do you give me permission to restart your device @barryjump ?

Whatever you need, its all yours

We are still on the 1st error! This error is related with the firmware from the LoRa gateway which can’t be initiated!

Could you please re-deploy the project on your app? Apologizes!

No need to apologize! Pushing now…

@barryjump We think this is an issue related with the SPI SPEED in the LoRa gateway code. We going to test some changes on the repository. So i will keep you updated if we can solve this. Let’s stay connected!

@barryjump we made a PR and i tested the code and it worked for me! now we force the SPI to 200000. Re-deploy again and let’s see if it works (fingers crossed).