Basics Station LoRa gateway on RPi + RAK2245 and balena

Hello, i developed a LoRa Basics Station gateway running on a Raspberry Pi (3 / 4) with RAK2245 on balena.io. You can install it using the button Deploy with Balena.

I tested the project and it can work on TTN and TTI.

See the documentation here https://www.balena.io/blog/deploy-a-basics-station-lora-gateway-with-ttn-and-balena/

Let me know what do you think!

Marc

5 Likes

Marc, this is absolutely great! But is this works with RAK831 also?

1 Like

Thank you @Roberto69

I personally haven’t tested the RAK831 but if this is an SPI sx1301 model, it should work. Check what is the RESET_PIN of the concentrator and modify the balenaCloud Device Variables if needed.

Let me know if it works for you

Hello Marc.

What drives me crazy is, I have one RAK831&RPiB3+ working and three not working. Setting are all the same. RESET pin is:
image

That’s odd, could you please share logs here of the ones not working? Thanks @Roberto69

Sure, please take a look here: Added RAK833 RPi HAT GW to V3 - remains in disconnected status - #7 by Roberto69

Please let me know if you need more info.

Looks like there is a hardware issue more related with the SPI communication between the Pi and the hat. What RAK831 and Pi Hat are you using? Could you please share?

Thanks

SPI speed with some of the RAK (and other) conc cards running on RPi’s can be a known issue and recommendation in that case is dial down the SPI clock speed (using RaspiConfig?) (Use forum search - it was a ‘thing’ a year or two back IIRC)

1 Like

It could be. If I connect the same RAK831 to RPi 0 hat, it works. So RAK831 definitely works. But all those combinations worked well on v2 with packet forwarder.
In one working case and three not-working cases I’m using this RPi 3B+ hat with RAK831: GitHub - IRNAS/ttn-irnas-gw: LoraWAN gateway with RAK831/iC880A and Raspberry Pi Zero W for TheThingsNetwork

Let me clarify @Roberto69

It works with basicstation repo on pi zero + pi hat + RAK831 but it doesn’t work on Pi3+ + pi hat + RAK831 with the same configuration on RESET_PIN and others?

1 Like

And could you please share all the logs (from the start of the service) here?

Marc, I will check again and write down. Did you mean log in this form?tts_gw_intima-gw-5000-01-04.08.21_16_47_21_(+0200).txt (42.6 KB)

@gy4nt so far it seems it is stupid error. After upgrade from packet forwarder in v2 to basic station (your Balena image GitHub - mpous/basicstation: LoRa Basics™ Station - The LoRaWAN Gateway Software) in v3, two RPi hats doesn’t work anymore. Is it possible basic station drains more current than packet forwarder? I know it is stupid but anyway - I have no other reasonable explanation … one RAK831&RPi3B+ works even after migration, but occasionaly receiving error in Balena “undervoltage”. Before migration I’ve never seen this error. The other two doesn’t start. If I use RAK2245 (without a RPi hat) it starts without any problem.
I’ve tested two RAK831 on Rpi 0 with packet forwarder in v2 and it works. It seems my RPi hats with PoE are on the limit. If I powering over PoE, undervoltage is present most of the times, but if I powering directly with 5V PSU, there is no undervoltage warning. Despite using 5V PSU, two concentrators doesn’t start with two RPi hats.
I have to find out new RPi hat, test it and then I can make final conclusion.
It would be fine if you’ll make GitHub - mpous/basicstation: LoRa Basics™ Station - The LoRaWAN Gateway Software for Raspberry Pi 0 also. Sure, if it wouldn’t take you to much time.

1 Like

I agree. From HW perspective is clear, but I’ve never managed to put RAK831 in work with this settings. As long as I know, settings are:
SPI_SPEED (down to 2000000; I’ve changed to lower also, but the only results is, console couldn’t show all messages)
BALENA_HOST_CONFIG_core_freq 250
BALENA_HOST_CONFIG_dtoverlay pi3-miniuart-bt

Is it possible, problems with SPI communication arise when using basic station? My RAK831 with the same RPi hat started every time with packer forwarder, but now with basic station not

@Roberto69 one question, did you register to TTS the gateway with EUI b827ebfffed3c6ee? Could you please do it and see if it still give the same error?

This question solved the problem :+1:

Hi @gy4nt, thank you for your help. The problem was in RPi3B+/RAK831 hat. I have no idea why worked before migration and after migration no more. In next days I will test with Dupont wires instead of using hat.
Yes, EUI b827ebfffed3c6ee belongs to my test RPi3B+. My final conclusion is, every RAK and RPi works, as long as they are not connected with hats. Even RPi0 works with every RAK831 in v2, but it uses different hat. Not to mention, RAK2245 has no problems as it is connected directly to RPi.

At the end even RPi0 works, but in v2. Balena image for basic station and RPi0 in v3 will be appreciated. Open question remains, why these problems arise after migration. In case you would like to check more circumstances, please let me know. Still have two GWs on the table :wink:

@Roberto69 register the gateways and introduce the TC_URI and they should work!

@gy4nt, RPi3 + RAK2245 works fine. When I change RAK2245 with RAK831, concentrator not starts.

My question is, is there any limit or problem if I want to change concentrator and keep RPi and all the settings and parameters (including TC_URI) the same? Can I exchange concentrators without any changes?

Main reason for a conc card not starting is usually incorrect reset pin…don’t have a 2245 or the time to go read doc and check…a job for you!..but my 1st stop would be see if there is a difference in pin mapping for the conc reset line then if so adjust in s/w config…

2nd most common problem on a Pi is probably the bus speed as I posted above…did you check/adjust that? I seem to recall some RAK designs introduced a level shifter (not needed per some posts?) that then slowed interface down drastically forcing e.g. SPI changes…

Another update just read back up posts and see you did try change but was that set for 2245 or the 831?

1 Like