RAK2245 pi hat connection issus

Hi all,

I am a newbie of buiilding Lorawan gateway. I tried to use RAK2245 with Raspberry pi 3 to build a gateway.

I have followed the guides below, and did a search on the forums and I saw some others who had the same problem as me. I tried their solution. For example, I’ve tried to create the API key for several times, and make sure when I copied them it’s correct. But it still didn’t work.

Below are some guides I followed:
https://www.balena.io/blog/deploy-a-basics-station-lora-gateway-with-ttn-and-balena/

https://github.com/mpous/basicstation

Here is some information from logs:

I have tried for many days and still can’t solve this problem. Any suggestions would be greatly appreciated!

Hi @ays-ibs,

If I understand the part where the flow breaks is at The Things Stack Console where the device should show up - right? You are adding the key as TC_KEY to env variables.

I looked at issues where users ran into similar key issue. Can you take a look at the following comment: RAK2245 Pi Hat disconnected in TTN v.3 - #19 by cGf ?

Basically two things to take care of:

  • For RAK2245 you must have MODEL set as SX1301.
  • The key might have the format: <prefix>.<key>.<suffix> (separated by dots); take up the key portion with a fresh TTS gateway and see if that works.

If the above doesn’t help, grant us support access and we take a look at the device config. (Ref: Grant support access - Balena Documentation)

@ays_Ibs welcome to the community!

could you please confirm that the EUI that you see on the balenaCloud tags is different than the one you see on the logs?

Having said that, did you register your EUI on the The Things Stack and added the API key on the balenaCloud?

This is related with an issue on the repo i’m working on. Could you please try this repo meanwhile? GitHub - xoseperez/basicstation: Basics™ Station Packet Forward protocol using Docker

Thank you

Hi @nitish, thank for your reply. Yes, the model is SX1301. I also double checked the API Key, and it’s the correct format as you mendtioned. But still couldn’t connect to the TTN.

I have grant you support access. Thanks a lot.

Hi @mpous, thanks for sharing this repo. I have tired the instructions in this repo.

Yes, the EUI on the balenaCloud tags is different than the one on the logs. I’ve registered EUI on the things stack and added the API Key. But unfortuantly I couldn’t connect the gateway to the TTN, and I don’t know the reason, I’ve followed evey steps…

Thank you.

1 Like

Thanks @ays_Ibs this is a reported issue we are working on → Random Wi-Fi MAC address as EUI · Issue #51 · mpous/basicstation · GitHub

having said that did you try to deploy this other basicstation repository made by a developer from the balena community?

Hello @ays_Ibs did you try the repository that i recommended?

Hi @mpous , yes, I have tried. But unfortunately I couldn’t make it work. I also deleted the whole fleet on Balena cloud and redo it again, however I still got the random EUI you mentioned above. I was wondering is there any update of solving this issues?

Thank you very much.

Did you try GitHub - xoseperez/basicstation: Basics™ Station Packet Forward protocol using Docker ?

Hi Marc, @mpous,
I encounter the same problem and also tried the repo of xoseperez. I am not sure wether or not this is helpful, but just wanted to let you know. I carefully took all the steps required but to no avail.

Kind regards,
Ronald

Hello @ronb1963 welcome to the balena community!

What device are you running? and what concentrator? Thanks

Hi Marc,

I use a RAK2245 with a PI 3b
I think it is the SX1301 concentrator and so it is configured in the variables.

version: ‘2.1’
services:
basicstation:
image: ‘xoseperez/basicstation:latest’
container_name: basicstation
restart: unless-stopped
privileged: true
network_mode: host
environment:
MODEL: RAK5146
TC_KEY: NNSXS.SLOC764GN3…

In the docker image it says RAK5146, is that the problem?

Thank you

@ronb1963 change the MODEL variable to RAK2245. Actually i’m sure you can change this from balenaCloud on the Variables section.

Let us know if that works!

Hi Marc,

I have set the MODEL variable to RAK2245
Unfortunately that does not seem to make any difference. I added the log file to this post.

The target release for the docker image is [7ca4311]
(balena dashboard)

Any help would be greatly appreciated,
Ronald
basicstation_brains-lorawangw1-23.05.22_13_00_21_(+0200).txt (97.7 KB)

@ronb1963 In TTN v3 try granting all API rights when you create your API key.

Then, take the API back to balena with TC_KEY variable, but ALSO copy that API key like in the image in the LoRa Basics Station LNS Authentication Key field. I have no idea why TTN can’t just do this automatically, but if using Basicstation it is required.

1 Like

Hi Barry,

I have created a new API key and changed the TC_KEY and the GW_KEY variables and also the LoRa BasicStation LNS Authentication Key in the TTN v3 settings. The MODEL variable in BalenaCloud is set to RAK2245 because Marc indicated that, but I am not sure if that is correct. Unfortunately still no connection in TTN.

Thanks, Ronald

It would be helpful to see the logs from the moment basicstation starts up. Perhaps you can enable persistent logging on your device to capture them to disk and then share those here. Would only need the first minute or so after the container starts running.

From what you’ve posted it’s hard to see what is causing the problem. For example, I’ve seen basicstation connection failures because:

  1. The gateway EUI is not matching what is set in your LNS (ttn in this case)
  2. The TC_KEY is incorrect on the gateway
  3. The TC_KEY is correct on the gateway, but not configured properly in TTN
  4. Basicstation cannot open the hardware connection to the concentrator
  5. The TC_URI (or cups uri) is incorrect on the gateway

etc, etc.

1 Like

Thanks @barryjump you rock!