Issue connecting LoRa Basics Station to TTN V3, sevice shows as "basicstation" instead of "main"

Hello all,

I am very new to lora and followed both a current tutorial (posted 2 weeks ago with the exact same setup I’m using) and following the balena tutorial below.
https://www.balena.io/blog/deploy-a-basics-station-lora-gateway-with-ttn-and-balena/

here is the YouTube tutorial below as well.
https://youtu.be/IOXqfySgLaE
I created a gateway, added the API key to the balena “Device Variables” and changed the region in “Device Variables” to reflect my region in the United States to “us” and it still shows as disconnected.



I recognize that there is a similar post to mine (not created by me) about getting the RAK Wireless RAK2245 in conjunction with a Raspberry Pi as a LoRa Gateway connected to TTN. (other post linked below)
Similar Post

I am focusing what I assume is a user error on my part in which my “service” is purple and says “basicstation” instead of the yellow “main” I see in everyone else’s tutorials/posts. Any suggestions on what I messed up and how I can resolve this issue?

logs (with EUI blocked out):
basicstation Using MODEL: SX1301
basicstation Server: wss://nam1.cloud.thethings.network:8887
basicstation Resetting gateway concentrator on GPIO 17
basicstation 2022-02-06 02:55:21.027 [SYS:INFO] findDefaultEui → protoEuiSrc /sys/class/net/eth0/address - protoEUI 202481590670519
basicstation 2022-02-06 02:55:21.030 [SYS:INFO] Logging : stderr (maxsize=10000000, rotate=3)
basicstation 2022-02-06 02:55:21.030 [SYS:INFO] Station Ver : 2.0.5(rpi/std) 2022-02-06 00:45:16
basicstation 2022-02-06 02:55:21.030 [SYS:INFO] Package Ver : 1.0.0
basicstation 2022-02-06 02:55:21.030 [SYS:INFO] proto EUI(x) : 0:b827:eb49:14b7 (/sys/class/net/eth0/address)
basicstation 2022-02-06 02:55:21.030 [SYS:INFO] prefix EUI : ::1 (builtin)
basicstation 2022-02-06 02:55:21.030 [SYS:INFO] Station EUI : XXXX:XXXX:XXXX:XXXX
basicstation 2022-02-06 02:55:21.030 [SYS:INFO] Station home: ./ (builtin)
basicstation 2022-02-06 02:55:21.030 [SYS:INFO] Station temp: /var/tmp/ (builtin)
basicstation 2022-02-06 02:55:21.030 [SYS:WARN] Station in NO-CUPS mode
basicstation 2022-02-06 02:55:21.234 [TCE:INFO] Starting TC engine
basicstation 2022-02-06 02:55:21.236 [any:INFO] ./tc.trust:
basicstation cert. version : 3
basicstation serial number : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
basicstation issuer name : O=Digital Signature Trust Co., CN=DST Root CA X3
basicstation subject name : O=Digital Signature Trust Co., CN=DST Root CA X3
basicstation issued on : 2000-09-30 21:12:19
basicstation expires on : 2021-09-30 14:01:15
basicstation signed using : RSA with SHA1
basicstation RSA key size : 2048 bits
basicstation basic constraints : CA=true
basicstation key usage : Key Cert Sign, CRL Sign
basicstation 2022-02-06 02:55:21.237 [AIO:INFO] tc has no cert configured - running server auth and client auth with token
basicstation 2022-02-06 02:55:21.325 [TCE:INFO] Connecting to INFOS: wss://nam1.cloud.thethings.network:8887
basicstation 2022-02-06 02:55:22.036 [TCE:INFO] Infos: XXXX:XXXX:XXXX:XXXX muxs-::0 wss://nam1.cloud.thethings.network:8887/traffic/eui-XXXXXXXXXXXXXXXX
basicstation 2022-02-06 02:55:22.036 [AIO:DEBU] [3] ws_close reason=1000
basicstation 2022-02-06 02:55:22.036 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
basicstation 2022-02-06 02:55:22.036 [AIO:DEBU] [3] WS connection shutdown…
basicstation 2022-02-06 02:55:22.038 [any:INFO] ./tc.trust:

1 Like

Hi, as far as I can see in the logs there is nothing wrong, so I’d suggest to recheck the API key.

I’m guessing you have a RAK2245 concentrator? The MODEL setting is SX1301 which is the chip inside the RAK2245 so that’s OK. But if you are using a different concentrator the this could be different. Also, I see you set the region to “nam1”. That’s OK. Initially you say you set it to “us” which is wrong.

So my suggestion is that you double check that the API key has “Link as Gateway to a Gateway Server for traffic exchange” permission (or recreate it).

2 Likes

Thank you, that worked and now I feel silly, one last question, is my service supposed to display a purple “basicstation” instead of the standard yellow “main”?

Mine

Everyone else’s

In the docker-compose file in the project the service is named “basicstation” so that is what is displayed, actually I prefer it that way. I guess balena dashboard assigns a random color to each service, maybe based on the name?

1 Like

Okay awesome. Just making sure I didn’t screw anything up and thank you again for your help!

2 Likes

@currydem welcome to the balena community! and glad that everything worked fine :slight_smile:

@xoseperez thanks for the support! you rock!

1 Like

I am using a RAK 2287 concentrator with a Pi HAT and a Raspberry Pi 4, but the gateway is not able to connect. These are my variables. Is there something I am doing wrong?

in the log

Could you please copy and paste the basicstation logs here @rojasyal ?

Thanks!

ERROR: DEVICE set to auto discover but no concentrator found! (INTERFACE set to SPI)

------------------------------------------------------------------

BasicStation ™ Packet Forwarder Container v2.8.4

(c) Xose Pérez 2022-2024

Based on:

* basicstation v2.0.6

* sx1302_hal v2.1.0

* picoGW_hal v0.2.3

------------------------------------------------------------------

Protocol

------------------------------------------------------------------

Mode: DYNAMIC

Protocol: LNS

LNS Server: wss://localhost:8887

Gateway EUI: D83ADDFFFEC47B10

EUI Source: eth0

Radio

------------------------------------------------------------------

Model: SX1302

Concentrator: SX1302

Design: CORECELL

Interface: SPI

Radio Device: /dev/spidev0.1

SPI Speed: 8000000

Reset GPIO: 17

Enable GPIO: 0

standalone-lorawan-gateway-balena_humble-frost-2024-09-18t07_01_57-06_00.txt (102.3 KB)

Add DEVICE /dev/spidev0.1 I GET the following

------------------------------------------------------------------

BasicStation ™ Packet Forwarder Container v2.8.4

(c) Xose Pérez 2022-2024

Based on:

* basicstation v2.0.6

* sx1302_hal v2.1.0

* picoGW_hal v0.2.3

------------------------------------------------------------------

Protocol

------------------------------------------------------------------

Mode: DYNAMIC

Protocol: LNS

LNS Server: wss://localhost:8887

Gateway EUI: D83ADDFFFEC47B10

EUI Source: eth0

Radio

------------------------------------------------------------------

Model: SX1302

Concentrator: SX1302

Design: CORECELL

Interface: SPI

Radio Device: /dev/spidev0.1

SPI Speed: 8000000

Reset GPIO: 17

Enable GPIO: 0

the getaway does not connect

Change the protocol in docker compose, now usb appears but they still do not connect to the lorawan server

BasicStation ™ Packet Forwarder Container v2.8.4
basicstation (c) Xose Pérez 2022-2024
basicstation
basicstation Based on:
basicstation * basicstation v2.0.6
basicstation * sx1302_hal v2.1.0
basicstation * picoGW_hal v0.2.3
basicstation ------------------------------------------------------------------
basicstation
basicstation Protocol
basicstation ------------------------------------------------------------------
basicstation Mode: DYNAMIC
basicstation Protocol: LNS
basicstation LNS Server: wss://localhost:8887
basicstation Gateway EUI: DDDDDDDDDDDDDDD
basicstation EUI Source: eth0
basicstation
basicstation Radio
basicstation ------------------------------------------------------------------
basicstation Model: SX1302
basicstation Concentrator: SX1302
basicstation Design: CORECELL
basicstation Interface: USB
basicstation Radio Device: /dev/ttyACM0
basicstation Chip ID: 000000000

@rojasyal did you try the right Gateway EUI?

What logs do you see interacting with the LNS?

1 Like

I had an error in Gateway EUI I also configured the INTERFACE variable “USB” and it worked

1 Like

Thanks for sharing your solution @rojasyal

1 Like