Things indoor gateway not connecting to ttn

Hi,

We installed a new gateway and connected it to wifi however it does not connect to ttn. I installed a serial cable to receive the debug messages (see below).

Any help would be much appreciated.

1970-01-01 00:01:12.340 [CUP:INFO] Stopping TC in favor of CUPS
1970-01-01 00:01:12.342 [CUP:INFO] Starting a CUPS session in 0 seconds.
1970-01-01 00:01:12.352 [CUP:INFO] Starting a CUPS session now.
1970-01-01 00:01:12.355 [CUP:INFO] Connecting to CUPS … https://eu1.cloud.thethings.network:443 (try #1)
1970-01-01 00:01:12.370 [any:INFO] /s2/cups.trust:
cert. version : 3
serial number : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued on : 2015-06-04 11:04:38
expires on : 2035-06-04 11:04:38
signed using : RSA with SHA-256
RSA key size : 4096 bits
basic constraints : CA=true
key usage : Key Cert Sign, CRL1970-01-01 00:01:12.408 [AIO:INFO] cups has no cert configured - running server auth and client auth with token
1970-01-01 00:01:13.183 [CUP:VERB] Retrieving update-info from CUPS https://eu1.cloud.thethings.network:443
1970-01-01 00:01:15.111 [any:VERB] Failed to retrieve TCURI from CUPS: (401) Unauthorized
1970-01-01 00:01:15.114 [AIO:DEBU] [2] HTTP connection shutdown…
1970-01-01 00:01:15.125 [SYS:INFO] sys_inState - Ignoring state transition: 5
1970-01-01 00:01:15.127 [CUP:INFO] Interaction with CUPS failed - retrying in 1m
1970-01-01 00:01:15.129 [TCE:INFO] Starting TC engine
1970-01-01 00:01:15.145 [any:INFO] /s2/tc.trust:
cert. version : 3
serial number : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
issuer name : O=Digital Signature Trust Co., CN=DST Root CA X3
subject name : O=Digital Signature Trust Co., CN=DST Root CA X3
issued on : 2000-09-30 21:12:19
expires on : 2021-09-30 14:01:15
signed using : RSA with SHA1
RSA key size : 2048 bits
basic constraints : CA=true
key usage : Key Cert Sign, CRL Sign
1970-01-01 00:01:15.181 [AIO:INFO] tc has no cert configured - running server auth and client auth with token
1970-01-01 00:01:15.251 [TCE:INFO] Connecting to INFOS: wss://lns.eu.thethings.network:443
1970-01-01 00:01:17.093 [SYS:DEBU] Free Heap: 22088 (min=20336) wifi=5 mh=7 cups=-4 tc=1
1970-01-01 00:01:17.417 [TCE:INFO] Infos: 58a0:cbff:fe80:3384 muxs-::0 wss://lns.eu.thethings.network:443/traffic/eui-58A0CBFFFE803384
1970-01-01 00:01:17.422 [AIO:DEBU] [2] ws_close reason=1000
1970-01-01 00:01:17.427 [AIO:DEBU] ssl_tls.c:3739 MBEDTLS[1]: mbedtls_ssl_read_record_layer() returned -30848 (-0x7880)
1970-01-01 00:01:17.434 [AIO:DEBU] ssl_tls.c:6842 MBEDTLS[1]: mbedtls_ssl_read_record() returned -30848 (-0x7880)
1970-01-01 00:01:17.444 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
1970-01-01 00:01:17.454 [AIO:DEBU] [2] WS connection shutdown…
1970-01-01 00:01:17.478 [any:INFO] /s2/tc.trust:

Have you used the claim procedure or have you mistakenly registered the gateway?

Yes, I have used the claim procedure.

Ok after claiming, did you modify the keys created on the gateway?

Yes done that and updated the LoRa Basic Station LNS Authentication Key with the newly generated Key

You don’t need to and that’s my point. Claiming sets everything up for you automatically.

1 Like

As I suspected when I saw this last night.

Is there a better emoji than Rolling on the Floor Laughing?

I notice timestamps of 1970-1-1 with a certificate issue date of 2015-06-04 11:04:38.
Is there perhaps a problem because the certicificate is not considered valid yet?

I assume this can be solved by means of providing time to the TTIG.
Is perhaps NTP access blocked in a firewall, or something like that?

@kightltd: Can you do the following

  1. Claim the gateway again with the same ID and EUI (we support that). This time don’t change any of the API Keys/credentials once the gateway is connected.
  2. Disconnect the gateway power supply and connect again. That should update the configuration and it should connect.

I assume this can be solved by means of providing time to the TTIG.
Is perhaps NTP access blocked in a firewall, or something like that?

The server sends the current time to the gateway once it’s connected. TTIGs don’t have access to NTP.

1 Like

Hi KrishnaIyerEaswaran2,

I only did it after waiting more than a day and it was still not working. There was no keys setup automatically so I generated them this morning to try to get around this issue. How can this issue get resolved?. As I can’t delete the gateway and try to reclaim or register it.

Thanks in advance

Kind regards

Johan

As I mentioned above, you can simply claim the gateway again with the same ID and EUI. You don’t have to delete it.

Unable to reclaim:
Gateway with EUI 58A0CBFFFE803384 already exists and is not authorized for claiming

Please check the docs: The Things Indoor Gateway | The Things Stack for LoRaWAN

Hi,

That did the trick. After reclaiming the keys were generated automatically.

Thanks for the help.

1 Like