Hello @cem26 welcome to the balena community!
Did you get your EUI
and registered it to The Things Stack as a gateway?
Let me know if this is done
Hello @cem26 welcome to the balena community!
Did you get your EUI
and registered it to The Things Stack as a gateway?
Let me know if this is done
Hello,
Yes, I got my eui and registered I to TTS as a gateway. The device seems to be online in balenacloud but I get the error you see above. It keeps retrying.
In case you need, this is my device variables
Also, once you copy the API key from TTS, it kind of adds extra letters to the beginning and end of the key. So I changed that as well (in the above image, now my tc key starts as A7C…). However, it has started going “status: online (heartbeat only)” as well (but after some time, it gets online again and repeats this process). Lastly, my dashboard says no logs yet. I did not have this problem yesterday.
Hello @mpous , have you had a chance to look at my replies? Thanks
Is there any error showed on the TTS logs?
El dv., 25 de març 2022, 20:34, cem cetinkaya via balenaForums <balena@discoursemail.com> va escriure:
@mpous No, all it shows is API key I have created (its notification I guess). I can grant you support access to my device if you’re okay with that.
I have also noticed that the EUI in my balenaCloud tag (B827EBFFFEC0C014) and the one in error:pkg/gatewayserver:gateway_eui_not_registered (gateway EUI B827EBFFFE959541 is not registered) are different from each other. Even though the EUI in TTS is the same as my balenaCloud tag.
Can you try to deploy this repo?
El dv., 25 de març 2022, 21:49, cem cetinkaya via balenaForums <balena@discoursemail.com> va escriure:
Yes, I can. But it shows two ways. One uses docker, the other one balena.io. Which way should I use? and do I need to delete my gateway and fleet in both balenacloud and TTS before starting? Last question is do I need to format my sd card as well?
Just deploy this project (balena flavour) on the same fleet! click the deploy with balena button
I will add an issue on my repo
Do you have only 1 device?
El dv., 25 de març 2022, 22:26, cem cetinkaya via balenaForums <balena@discoursemail.com> va escriure:
Okay, without deleting anything or any gateway I will deploy this project. Yes, I only have one device but this RAK2245 is second-hand, could not find a new one.
I have deployed the project and followed the instructions. There does not seem to be any difference except the status is now online (vpn only).
Is it online on the The Things Stack?
El dv., 25 de març 2022, 23:26, cem cetinkaya via balenaForums <balena@discoursemail.com> va escriure:
Unfortunately, it is still disconnected.
Cembora Çetinkaya <cembora26@gmail.com>, 25 Mar 2022 Cum, 22:16 tarihinde şunu yazdı:
Grant me support access and share over DM the id of your device on monday! This is weird.
El dv., 25 de març 2022, 23:45, cem cetinkaya via balenaForums <balena@discoursemail.com> va escriure:
Will grant support access and DM the ID on Monday .
Hello @cem26 I see you have CRC FAIL
messages on your logs. Maybe this is related that you have other LoRa nodes sending data to another LoRaWAN network not TTN.
On the other hand, try to reboot the gateway to see if you avoid the Time sync rejected
.
Hello @mpous. I just want to share what we discussed over dm to let others know. When he asked me to deploy the last GitHub repo, I misunderstood the instructions and could not deploy it properly. The following day, I realized my mistake and deployed the repo. After that, everything worked properly. Now I am able to send data to TTS from my gateway.
If we get back to the question. I rebooted the device but still have the Time sync rejected message (this does not prevent me from sending data to TTS though). Now the only problem I have is that the raspberry pi uses %100 of its CPU and this causes the device to heat up (up to 60 degrees celsius).
Lastly, I would like to thank Marc and the balena team a lot. They were keen to help me from the moment I first published my message here. In the following days (including Saturday night), Marc was still looking into my errors and suggest a solution. I am truly grateful for what you have done and your support.
Hello!
I am trying to setup a raspberry pi 4 with a RAK2245 pi Hat to work with TTN V3. As suggested by @mpous, I am using the new repo https://github.com/xoseperez/basicstation.
So far, I managed to deploy it using CUPS protocol. Still, I got two errors. One at the start of the service and a second one when attempting to connect to the CUPS-retrieved TC URI server.
The first error is parse error: Invalid numeric literal at EOF at line 1, column 12
, and I get it immediately after the service stars and retrieves the EUI key (see log). I have no idea if this is relevant at it seems to continue with no problems to the CUPS protocol.
About the second error, from log files (see below), It seems to successfully retrieves TC URI and TC Credentials. It also successfully writes atributes to the TTN gateway console. When it tries to connect to the retrieved TC URI address wss://nam1.cloud.thethings.network:8887
, it fails. So far I tried the following:
I triple checked the EUI key at the TTN console
I triple checked that the LNS API key at the TTN console is set as described here: https://www.thethingsindustries.com/docs/gateways/lora-basics-station/cups/
I tried configuring the LNS protocol manually in Balena, got the same TC URI connection error.
I tried using eu1
server instead of nam1
, got the same TC URI connection error.
I place below one screenshots from the TTN console and the log. Could you please help me solve this, please?
14.06.22 17:20:16 (-0500) Restarting service 'basicstation sha256:a76a088b1dccc08c11601bf6d9758f5e254cb95e496d9ef2cb9d365f07ee4778'
14.06.22 17:20:16 (-0500) basicstation GATEWAY_EUI: DCA632FFFEDF31F7
14.06.22 17:20:17 (-0500) basicstation parse error: Invalid numeric literal at EOF at line 1, column 12
14.06.22 17:20:17 (-0500) basicstation
14.06.22 17:20:17 (-0500) basicstation ------------------------------------------------------------------
14.06.22 17:20:17 (-0500) basicstation Protocol
14.06.22 17:20:17 (-0500) basicstation ------------------------------------------------------------------
14.06.22 17:20:17 (-0500) basicstation Mode: STATIC
14.06.22 17:20:17 (-0500) basicstation Protocol: CUPS
14.06.22 17:20:17 (-0500) basicstation CUPS Server: https://nam1.cloud.thethings.network:443
14.06.22 17:20:17 (-0500) basicstation Gateway EUI: DCA632FFFEDF31F7
14.06.22 17:20:17 (-0500) basicstation ------------------------------------------------------------------
14.06.22 17:20:17 (-0500) basicstation Radio
14.06.22 17:20:17 (-0500) basicstation ------------------------------------------------------------------
14.06.22 17:20:17 (-0500) basicstation Model: RAK2245
14.06.22 17:20:17 (-0500) basicstation Concentrator: SX1301
14.06.22 17:20:17 (-0500) basicstation Design: V2
14.06.22 17:20:17 (-0500) basicstation Radio Device: spi:/dev/spidev0.0
14.06.22 17:20:17 (-0500) basicstation Interface: SPI
14.06.22 17:20:17 (-0500) basicstation SPI Speed: 2000000
14.06.22 17:20:17 (-0500) basicstation Reset GPIO: 17
14.06.22 17:20:17 (-0500) basicstation Enable GPIO: 0
14.06.22 17:20:17 (-0500) basicstation ------------------------------------------------------------------
14.06.22 17:20:17 (-0500) basicstation
14.06.22 17:20:17 (-0500) basicstation Concentrator reset through GPIO17
14.06.22 17:20:18 (-0500) basicstation Killing process 36
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.030 [SYS:INFO] Logging : stderr (maxsize=10000000, rotate=3)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.031 [SYS:INFO] Station Ver : 2.0.6(rpi/stdn) 2022-05-31 17:06:34
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.031 [SYS:INFO] Package Ver : (null)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.032 [SYS:INFO] mbedTLS Ver : 2.28.0
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.032 [SYS:INFO] proto EUI : dca6:32ff:fedf:31f7 (station.conf)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.033 [SYS:INFO] prefix EUI : ::1 (builtin)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.033 [SYS:INFO] Station EUI : dca6:32ff:fedf:31f7
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.033 [SYS:INFO] Station home: ./ (builtin)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.033 [SYS:INFO] Station temp: /var/tmp/ (builtin)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.038 [RAL:DEBU] execvp argv[0]: </proc/self/exe>
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.038 [RAL:DEBU] argv[1]: <-S>
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.038 [RAL:DEBU] argv[2]: <(null)>
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.044 [S00:INFO] Logging : stderr (maxsize=10000000, rotate=3)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.044 [S00:INFO] Station Ver : 2.0.6(rpi/stdn) 2022-05-31 17:06:34
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.044 [S00:INFO] Package Ver : (null)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.044 [S00:INFO] mbedTLS Ver : 2.28.0
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.044 [S00:INFO] proto EUI : dca6:32ff:fedf:31f7 (station.conf)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.044 [S00:INFO] prefix EUI : ::1 (builtin)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.044 [S00:INFO] Station EUI : dca6:32ff:fedf:31f7
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.044 [S00:INFO] Station home: ./ (builtin)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.044 [S00:INFO] Station temp: /var/tmp/ (builtin)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.044 [S00:INFO] Station slave: 0
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.044 [S00:INFO] Slave LGW (0) - started.
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.037 [RAL:INFO] Master has started slave: pid=39 idx=0 (attempt 1)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.237 [TCE:INFO] Starting TC engine
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.256 [AIO:INFO] ./tc.trust:
14.06.22 17:20:18 (-0500) basicstation cert. version : 3
14.06.22 17:20:18 (-0500) basicstation serial number : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
14.06.22 17:20:18 (-0500) basicstation issuer name : C=US, O=Internet Security Research Group, CN=ISRG Root X1
14.06.22 17:20:18 (-0500) basicstation subject name : C=US, O=Internet Security Research Group, CN=ISRG Root X1
14.06.22 17:20:18 (-0500) basicstation issued on : 2015-06-04 11:04:38
14.06.22 17:20:18 (-0500) basicstation expires on : 2035-06-04 11:04:38
14.06.22 17:20:18 (-0500) basicstation signed using : RSA with SHA-256
14.06.22 17:20:18 (-0500) basicstation RSA key size : 4096 bits
14.06.22 17:20:18 (-0500) basicstation basic constraints : CA=true
14.06.22 17:20:18 (-0500) basicstation key usage : Key Cert Sign, CRL Sig2022-06-14 22:20:18.256 [TCE:INFO] Connecting to INFOS: wss://nam1.cloud.thethings.network:8887
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.281 [AIO:ERRO] [4] WS connect failed: NET - The connection to the given server / port failed
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.281 [AIO:DEBU] [4] WS connection shutdown...
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.282 [TCE:ERRO] TC connect failed - URI: wss://nam1.cloud.thethings.network:8887
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.282 [CUP:INFO] Starting a CUPS session in 0 seconds.
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.282 [TCE:INFO] INFOS reconnect backoff 0s (retry 0)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.282 [CUP:INFO] Starting a CUPS session now.
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.282 [CUP:INFO] Connecting to CUPS ... https://nam1.cloud.thethings.network:443 (try #1)
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.352 [AIO:INFO] ./cups.trust:
14.06.22 17:20:18 (-0500) basicstation cert. version : 3
14.06.22 17:20:18 (-0500) basicstation serial number : 04:00:00:00:00:01:15:4B:5A:C3:94
14.06.22 17:20:18 (-0500) basicstation issuer name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
14.06.22 17:20:18 (-0500) basicstation subject name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
14.06.22 17:20:18 (-0500) basicstation issued on : 1998-09-01 12:00:00
14.06.22 17:20:18 (-0500) basicstation expires on : 2028-01-28 12:00:00
14.06.22 17:20:18 (-0500) basicstation signed using : RSA with SHA1
14.06.22 17:20:18 (-0500) basicstation RSA key size : 2048 bits
14.06.22 17:20:18 (-0500) basicstation basic constraints : CA=true
14.06.22 17:20:18 (-0500) basicstation key usage : Key Cert Sign, CRL Sign
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.416 [AIO:INFO] ./tc.trust:
14.06.22 17:20:18 (-0500) basicstation cert. version : 3
14.06.22 17:20:18 (-0500) basicstation serial number : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
14.06.22 17:20:18 (-0500) basicstation issuer name : C=US, O=Internet Security Research Group, CN=ISRG Root X1
14.06.22 17:20:18 (-0500) basicstation subject name : C=US, O=Internet Security Research Group, CN=ISRG Root X1
14.06.22 17:20:18 (-0500) basicstation issued on : 2015-06-04 11:04:38
14.06.22 17:20:18 (-0500) basicstation expires on : 2035-06-04 11:04:38
14.06.22 17:20:18 (-0500) basicstation signed using : RSA with SHA-256
14.06.22 17:20:18 (-0500) basicstation RSA key size : 4096 bits
14.06.22 17:20:18 (-0500) basicstation basic constraints : CA=true
14.06.22 17:20:18 (-0500) basicstation key usage : Key Cert Sign, CRL Sig2022-06-14 22:20:18.416 [TCE:INFO] Connecting to INFOS: wss://nam1.cloud.thethings.network:8887
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.422 [AIO:ERRO] [5] WS connect failed: NET - The connection to the given server / port failed
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.422 [AIO:DEBU] [5] WS connection shutdown...
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.422 [TCE:ERRO] TC connect failed - URI: wss://nam1.cloud.thethings.network:8887
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.423 [CUP:VERB] Retrieving update-info from CUPS https://nam1.cloud.thethings.network:443...
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.430 [CUP:DEBU] CUPS Request: {"router":"dca6:32ff:fedf:31f7","cupsUri":"https://nam1.cloud.thethings.network:443","tcUri":"wss://nam1.cloud.thethings.network:8887","cupsCredCrc":3424366189,"tcCredCrc":810602245,"station":"2.0.6(rpi/stdn) 2022-05-31 17:06:10","model":"rpi","package":null,"keys":[]}
14.06.22 17:20:18 (-0500) basicstation 2022-06-14 22:20:18.431 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.312 [CUP:INFO] [Segment] TC URI: wss://nam1.cloud.thethings.network:8887
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.312 [CUP:INFO] [Segment] TC Credentials (1510 bytes)
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.312 [SYS:INFO] credComplete - trust_off= 0, trust_len=1391 30 82 05 6b 30 82 03 53
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.312 [SYS:INFO] credComplete - cert_off =1391, cert_len = 0 da de 18 27 00 00 00 00 41 75 74 68
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.312 [SYS:INFO] credComplete - key_off =1395, key_len = 115 00 00 00 00 41 75 74 68 6f 72 69 7a
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.312 [CUP:INFO] [Segment] TC Credentials update completed (1510 bytes)
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.337 [AIO:DEBU] [4] HTTP connection shutdown...
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.338 [CUP:INFO] CUPS provided TC updates (uri) - restarting TC engine
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.338 [TCE:INFO] Terminating TC engine
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.338 [CUP:INFO] Interaction with CUPS done - next regular check in 1d
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.338 [TCE:INFO] Starting TC engine
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.338 [AIO:INFO] ./tc.trust:
14.06.22 17:20:19 (-0500) basicstation cert. version : 3
14.06.22 17:20:19 (-0500) basicstation serial number : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
14.06.22 17:20:19 (-0500) basicstation issuer name : C=US, O=Internet Security Research Group, CN=ISRG Root X1
14.06.22 17:20:19 (-0500) basicstation subject name : C=US, O=Internet Security Research Group, CN=ISRG Root X1
14.06.22 17:20:19 (-0500) basicstation issued on : 2015-06-04 11:04:38
14.06.22 17:20:19 (-0500) basicstation expires on : 2035-06-04 11:04:38
14.06.22 17:20:19 (-0500) basicstation signed using : RSA with SHA-256
14.06.22 17:20:19 (-0500) basicstation RSA key size : 4096 bits
14.06.22 17:20:19 (-0500) basicstation basic constraints : CA=true
14.06.22 17:20:19 (-0500) basicstation key usage : Key Cert Sign, CRL Sig2022-06-14 22:20:19.339 [TCE:INFO] Connecting to INFOS: wss://nam1.cloud.thethings.network:8887
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.344 [AIO:ERRO] [4] WS connect failed: NET - The connection to the given server / port failed
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.345 [AIO:DEBU] [4] WS connection shutdown...
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.345 [TCE:ERRO] TC connect failed - URI: wss://nam1.cloud.thethings.network:8887
14.06.22 17:20:19 (-0500) basicstation 2022-06-14 22:20:19.345 [TCE:INFO] INFOS reconnect backoff 0s (retry 0)
I just tried 10 configurations, and all of them gave basically the same fail message:
[AIO:ERRO] [4] WS connect failed: NET - The connection to the given server / port failed
The following table shows the tested configurations. I attach log files below and in the following post.
Protocol | CUPS_KEY | TC_KEY | Model | Balena TTN_REGION | Selected TTN server in TTN Console | Frequency plan at TTN console | Require TLS in TTN console | Log file |
---|---|---|---|---|---|---|---|---|
CUPS | Given in Balena | Retrieved from CUPS | RAK2245 | nam1 | nam1 | US_902_928_FSB_2 | FALSE | 1.txt |
CUPS | Given in Balena | Retrieved from CUPS | SX1301 | nam1 | nam1 | US_902_928_FSB_2 | FALSE | 2.txt |
CUPS | Given in Balena | Retrieved from CUPS | SX1301 | eu1 | nam1 | US_902_928_FSB_2 | FALSE | 3.txt |
CUPS | Given in Balena | Retrieved from CUPS | RAK2245 | eu1 | nam1 | US_902_928_FSB_2 | FALSE | 4.txt |
CUPS | Given in Balena | Retrieved from CUPS | RAK2245 | nam1 | nam1 | US_902_928_FSB_2 | TRUE | 5.txt |
CUPS | Given in Balena | Retrieved from CUPS | RAK2245 | eu1 | eu1 | US_902_928_FSB_2 | TRUE | 6.txt |
CUPS | Given in Balena | Retrieved from CUPS | RAK2245 | eu1 | eu1 | US_902_928_FSB_2 | FALSE | 7.txt |
CUPS | Given in Balena | Given in Balena | RAK2245 | eu1 | eu1 | US_902_928_FSB_2 | FALSE | 8.txt |
LNS | Not given | Given in Balena | RAK2245 | eu1 | eu1 | US_902_928_FSB_2 | FALSE | 9.txt |
LNS | Not given | Given in Balena | RAK2245 | eu1 | eu1 | US_902_928_FSB_2 | TRUE | 10.txt |
1.txt (12.5 KB)
2.txt (9.5 KB)
3.txt (9.5 KB)
4.txt (9.5 KB)
5.txt (9.5 KB)