SenseCAP M2 unable to connect to TTN using Basic Station

Hello all- Several attempts have been made to connect a new gateway as a Basic Station (LNS) following the procedures outlined in the Seeed PDF in conjunction with the procedures on TTN. Suggestions related to approaches to troubleshooting / rectifying would be appreciated. Thanks!

What comment have Seeed made ?

More information on what succeeds, what fails and potentially some logging would help in supporting.

Now you are basically telling us you read the manual and followed the steps but can’t drive a car to the freeway. We don’t know if you can’t get it started or can’t get there because the on-ramp is blocked by other traffic.

Fair ask Jac. Lora logs following a reboot of the M2 Gateway. Perhaps syntax issues with the Cert or API key? Thanks for reviewing.

Mon Dec 12 18:17:49 2022 user.notice root: mode: basic_station; lora_pkt_fwd exit !
Mon Dec 12 18:17:54 2022 user.notice root: basicstation: Start
Mon Dec 12 18:17:58 2022 daemon.info station[4146]: [SYS:INFO] Logging     : stderr (maxsize=10485760, rotate=3)
Mon Dec 12 18:17:58 2022 daemon.info station[4146]: [SYS:INFO] Station Ver : 2.0.6(corecell/std) 2022-10-13 13:08:29
Mon Dec 12 18:17:58 2022 daemon.info station[4146]: [SYS:INFO] Package Ver : (null)
Mon Dec 12 18:17:58 2022 daemon.info station[4146]: [SYS:INFO] mbedTLS Ver : 2.16.11
Mon Dec 12 18:17:58 2022 daemon.info station[4146]: [SYS:INFO] proto EUI   : ****:****:****:62	(station.conf)
Mon Dec 12 18:17:58 2022 daemon.info station[4146]: [SYS:INFO] prefix EUI  : ::1	(builtin)
Mon Dec 12 18:17:58 2022 daemon.info station[4146]: [SYS:INFO] Station EUI : ****:****:****:62
Mon Dec 12 18:17:58 2022 daemon.info station[4146]: [SYS:INFO] Station home: /var/etc/station/	(--home)
Mon Dec 12 18:17:58 2022 daemon.info station[4146]: [SYS:INFO] Station temp: /var/tmp/	(builtin)
Mon Dec 12 18:17:58 2022 daemon.info station[4146]: [SYS:WARN] Station in NO-CUPS mode
Mon Dec 12 18:17:58 2022 daemon.info station[4146]: [SYS:INFO] Start lora statistics
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: [TCE:INFO] Starting TC engine
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: [AIO:INFO] /var/etc/station/tc.trust:
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: cert. version     : 3
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: issued  on        : 2015-06-04 11:04:38
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: expires on        : 2035-06-04 11:04:38
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: signed using      : RSA with SHA-256
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: RSA key size      : 4096 bits
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: basic constraints : CA=true
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: key usage         : Key Cert Sign, CRL Sign
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: [AIO:ERRO] tc contains malformed auth token - expecting: {header: value{\r\n|\n}}*
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: [TCE:INFO] INFOS reconnect backoff 0s (retry 0)
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: [AIO:INFO] /var/etc/station/tc.trust:
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: cert. version     : 3
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: issued  on        : 2015-06-04 11:04:38
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: expires on        : 2035-06-04 11:04:38
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: signed using      : RSA with SHA-256
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: RSA key size      : 4096 bits
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: basic constraints : CA=true
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: key usage         : Key Cert Sign, CRL Sign
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: [AIO:ERRO] tc contains malformed auth token - expecting: {header: value{\r\n|\n}}*
Mon Dec 12 18:18:42 2022 daemon.info station[4146]: [TCE:INFO] INFOS reconnect backoff 10s (retry 1)
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: [AIO:INFO] /var/etc/station/tc.trust:
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: cert. version     : 3
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: issued  on        : 2015-06-04 11:04:38
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: expires on        : 2035-06-04 11:04:38
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: signed using      : RSA with SHA-256
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: RSA key size      : 4096 bits
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: basic constraints : CA=true
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: key usage         : Key Cert Sign, CRL Sign
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: [AIO:ERRO] tc contains malformed auth token - expecting: {header: value{\r\n|\n}}*
Mon Dec 12 18:18:52 2022 daemon.info station[4146]: [TCE:INFO] INFOS reconnect backoff 20s (retry 2)
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: [AIO:INFO] /var/etc/station/tc.trust:
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: cert. version     : 3
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: issued  on        : 2015-06-04 11:04:38
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: expires on        : 2035-06-04 11:04:38
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: signed using      : RSA with SHA-256
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: RSA key size      : 4096 bits
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: basic constraints : CA=true
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: key usage         : Key Cert Sign, CRL Sign
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: [AIO:ERRO] tc contains malformed auth token - expecting: {header: value{\r\n|\n}}*
Mon Dec 12 18:19:12 2022 daemon.info station[4146]: [TCE:INFO] INFOS reconnect backoff 30s (retry 3)
Mon Dec 12 18:19:41 2022 daemon.info station[4146]: {"state":1,"temperature":0,"rx_sum":0,"report_time":1670869138,"tx_sum":0}
Mon Dec 12 18:19:41 2022 daemon.info station[4146]: [SYS:INFO] lora info statistics: rx:0 (+0), tx:0 (+0)
Mon Dec 12 18:19:41 2022 daemon.info station[4146]: [SYS:INFO] ubus: ubus -S call sensecap lora '{"rx_sum":0,"tx_sum":0,"report_time":1670869138, "state":1}'
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: [AIO:INFO] /var/etc/station/tc.trust:
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: cert. version     : 3
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: issued  on        : 2015-06-04 11:04:38
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: expires on        : 2035-06-04 11:04:38
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: signed using      : RSA with SHA-256
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: RSA key size      : 4096 bits
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: basic constraints : CA=true
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: key usage         : Key Cert Sign, CRL Sign
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: [AIO:ERRO] tc contains malformed auth token - expecting: {header: value{\r\n|\n}}*
Mon Dec 12 18:19:42 2022 daemon.info station[4146]: [TCE:INFO] INFOS reconnect backoff 40s (retry 4)

M2 Gateway Dashboard. The cessation of Lora packets coincides with the reconfiguring of the gateway from packet-forwarding to BasicStation mode.

Copy & paste of key issue?

Possibly- what should the format of the cert and API key be - including hidden characters? Thanks

Examples of both would be helpful

A similar error was noted in this post; however it does not appear to have been resolved:

I was able to resolve the [AIO:ERRO] tc contains malformed auth token - expecting: {header: value{\r\n|\n}}* issue.

Page 9 of the Seeed procedure shows the API key being entered without whitespace following the colon.

Adding a space following the colon fixed the authentication problem. The working format using a faux API key -

Authorization: 1231234413091203u0980941092480914810481308013

I removed the whitespace a few times to verify resolution. Authentication would fail without the space. Hope this helps others.

2 Likes

Dashboard of Seeed SenseCap M2 gateway successfully connected to TTN as a LoRaWAN Basics Station (LNS mode) and passing Lora packets. Connectivity verified by the TTN dashboard.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.