# Basics Station LoRa gateway on RPi + RAK2245 and balena

**URL:** <https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806>\
**Category:** RAK Gateways\
**Created:** [July 27, 2020, 1:14pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806 "2020-07-27T13:14:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gy4nt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gy4nt/32/42437_2.png) [@gy4nt](https://www.thethingsnetwork.org/forum/u/gy4nt)\
**Post date:** [July 27, 2020, 1:14pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/1 "2020-07-27T13:14:42Z")

</div>

Hello, i developed a LoRa Basics Station gateway running on a Raspberry Pi (3 / 4) with RAK2245 on [balena.io](http://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/](https://www.balena.io/blog/deploy-a-basics-station-lora-gateway-with-ttn-and-balena/)

Let me know what do you think!

Marc

---

<div class="post-metadata">

**Author:** ![Roberto69](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/roberto69/32/44922_2.png) [@Roberto69](https://www.thethingsnetwork.org/forum/u/Roberto69)\
**Post date:** [August 4, 2021, 12:21pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/2 "2021-08-04T12:21:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gy4nt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gy4nt/32/42437_2.png) [@gy4nt](https://www.thethingsnetwork.org/forum/u/gy4nt)\
**Post date:** [August 4, 2021, 1:39pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/3 "2021-08-04T13:39:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Roberto69](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/roberto69/32/44922_2.png) [@Roberto69](https://www.thethingsnetwork.org/forum/u/Roberto69)\
**Post date:** [August 4, 2021, 1:53pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/4 "2021-08-04T13:53:13Z")

</div>

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](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/2/5/25dd080e92c442ffe189120193042edc00b8f435.png)

---

<div class="post-metadata">

**Author:** ![gy4nt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gy4nt/32/42437_2.png) [@gy4nt](https://www.thethingsnetwork.org/forum/u/gy4nt)\
**Post date:** [August 4, 2021, 1:55pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/5 "2021-08-04T13:55:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Roberto69](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/roberto69/32/44922_2.png) [@Roberto69](https://www.thethingsnetwork.org/forum/u/Roberto69)\
**Post date:** [August 4, 2021, 1:59pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/6 "2021-08-04T13:59:18Z")

</div>

Sure, please take a look here: [Added RAK833 RPi HAT GW to V3 - remains in disconnected status - #7 by Roberto69](https://www.thethingsnetwork.org/forum/t/added-rak833-rpi-hat-gw-to-v3-remains-in-disconnected-status/49844/7)

Please let me know if you need more info.

---

<div class="post-metadata">

**Author:** ![gy4nt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gy4nt/32/42437_2.png) [@gy4nt](https://www.thethingsnetwork.org/forum/u/gy4nt)\
**Post date:** [August 4, 2021, 2:03pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/7 "2021-08-04T14:03:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [August 4, 2021, 2:09pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/8 "2021-08-04T14:09:00Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Roberto69](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/roberto69/32/44922_2.png) [@Roberto69](https://www.thethingsnetwork.org/forum/u/Roberto69)\
**Post date:** [August 4, 2021, 2:11pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/9 "2021-08-04T14:11:29Z")

</div>

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](https://github.com/IRNAS/ttn-irnas-gw)

---

<div class="post-metadata">

**Author:** ![gy4nt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gy4nt/32/42437_2.png) [@gy4nt](https://www.thethingsnetwork.org/forum/u/gy4nt)\
**Post date:** [August 4, 2021, 2:20pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/10 "2021-08-04T14:20:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![gy4nt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gy4nt/32/42437_2.png) [@gy4nt](https://www.thethingsnetwork.org/forum/u/gy4nt)\
**Post date:** [August 4, 2021, 2:21pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/11 "2021-08-04T14:21:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Roberto69](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/roberto69/32/44922_2.png) [@Roberto69](https://www.thethingsnetwork.org/forum/u/Roberto69)\
**Post date:** [August 4, 2021, 2:48pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/12 "2021-08-04T14:48:39Z")

</div>

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](https://www.thethingsnetwork.org/forum/uploads/short-url/iYPjPdn9kEe6cTgLOT1N2XVbV1f.txt) (42.6 KB)

---

<div class="post-metadata">

**Author:** ![Roberto69](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/roberto69/32/44922_2.png) [@Roberto69](https://www.thethingsnetwork.org/forum/u/Roberto69)\
**Post date:** [August 5, 2021, 9:53am UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/13 "2021-08-05T09:53:14Z")

</div>

@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](https://github.com/mpous/basicstation)) 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](https://github.com/mpous/basicstation) for Raspberry Pi 0 also. Sure, if it wouldn’t take you to much time.

---

<div class="post-metadata">

**Author:** ![Roberto69](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/roberto69/32/44922_2.png) [@Roberto69](https://www.thethingsnetwork.org/forum/u/Roberto69)\
**Post date:** [August 5, 2021, 3:11pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/14 "2021-08-05T15:11:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gy4nt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gy4nt/32/42437_2.png) [@gy4nt](https://www.thethingsnetwork.org/forum/u/gy4nt)\
**Post date:** [August 6, 2021, 2:15pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/15 "2021-08-06T14:15:14Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![Roberto69](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/roberto69/32/44922_2.png) [@Roberto69](https://www.thethingsnetwork.org/forum/u/Roberto69)\
**Post date:** [August 6, 2021, 2:31pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/16 "2021-08-06T14:31:08Z")

</div>

This question solved the problem 👍

---

<div class="post-metadata">

**Author:** ![Roberto69](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/roberto69/32/44922_2.png) [@Roberto69](https://www.thethingsnetwork.org/forum/u/Roberto69)\
**Post date:** [August 6, 2021, 2:48pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/17 "2021-08-06T14:48:13Z")

</div>

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 😉

---

<div class="post-metadata">

**Author:** ![gy4nt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gy4nt/32/42437_2.png) [@gy4nt](https://www.thethingsnetwork.org/forum/u/gy4nt)\
**Post date:** [August 6, 2021, 2:54pm UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/18 "2021-08-06T14:54:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Roberto69](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/roberto69/32/44922_2.png) [@Roberto69](https://www.thethingsnetwork.org/forum/u/Roberto69)\
**Post date:** [August 12, 2021, 4:58am UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/19 "2021-08-12T04:58:58Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [August 12, 2021, 8:08am UTC](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806/20 "2021-08-12T08:08:32Z")

</div>

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?

[Next page](https://www.thethingsnetwork.org/forum/t/basics-station-lora-gateway-on-rpi-rak2245-and-balena/38806.md?page=2)
