# RAK2245 PIHAT on Pi4 gateway won't connect

**URL:** <https://www.thethingsnetwork.org/forum/t/rak2245-pihat-on-pi4-gateway-wont-connect/58480>\
**Category:** Raspberry Pi Gateways\
**Created:** [August 16, 2022, 11:50am UTC](https://www.thethingsnetwork.org/forum/t/rak2245-pihat-on-pi4-gateway-wont-connect/58480 "2022-08-16T11:50:19Z")\
**Posts on this page:** 1\
**Showing post:** 34

<div class="post-metadata">

**Author:** ![tzalex](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/t/f475e1/32.png) [@tzalex](https://www.thethingsnetwork.org/forum/u/tzalex)\
**Post date:** [April 3, 2024, 4:16pm UTC](https://www.thethingsnetwork.org/forum/t/rak2245-pihat-on-pi4-gateway-wont-connect/58480/34 "2024-04-03T16:16:44Z")

</div>

## Progress Update - not solved yet.

I tried different GPIO options taking into considerations the pinouts by editing in `rak_common_for_gateway/lora/start.sh` the `SX1301_RESET_BCM_PIN`. Due to [@Jeff-UK answer](https://www.thethingsnetwork.org/forum/t/rak2245-pihat-on-pi4-gateway-wont-connect/58480/29) the default pin GPIO17 should be alright, but I have also tried [setting it to 22](https://forum.rakwireless.com/t/rak2247-spi-pi-supply-failed-to-start-concentrator-follow-up/4679) since for another user it worked. Still no progress.

Tried to slow SPI speed as recommended in [this post](https://www.thethingsnetwork.org/forum/t/rak2245-gateway-with-balena-main-failed-to-start-the-concentrator/28747/4) + Jeff-UK’s recommendation - Using `raspi-config` I can only enable/disable the SPI interface. `raspi-config` edits the `/boot/config.txt` , but even if I edit it directly, the `config.txt` file on a Raspberry Pi does not include options for configuring the SPI speed.

By searching some more, I found out that SPI clock speed is usually configured at runtime within the application or the driver that is communicating with the SPI device.

On the other hand the post that I found didn’t specify where I can update this value so I found another post that mentioned a **run.py** file, which does not exist in the `rak_common_for_gateway` repo, and looking into it a bit more it was about a different RAK board, not 2245. So I gave up on that approach too.

As a last attempt I tried doing this with

```bash
sudo echo 2000000 > `/sys/class/spidev/spidev0.0/device/of_node/spi-max-frequency`

```

but it didn’t work: _Permission denied_ - must be a kernel restriction.

⚠ However, printing the value that is already in the spi max frequency yields a `sY@` , which is not a number value, making me think that **there could still be a problem with the SPI**.

As an alternative to the all those steps above, I followed [this guide](https://www.hackster.io/bluetiger9/lorawan-gateway-with-rak2245-pi-hat-and-raspberry-pi-4-3d2407), trying to install the [latest firmware](https://downloads.rakwireless.com/#LoRa/RAK2245-Pi-HAT/) from the RAK wireless website (instead of installing Raspian OS Lite + rak\_common\_for\_gateway). I still I wasn’t able to even login to the board because [no RAK\_WIRELESS\_XXXX access point would show up in the Wi-Fi](https://www.hackster.io/bluetiger9/lorawan-gateway-with-rak2245-pi-hat-and-raspberry-pi-4-3d2407#:~:text=After%20booting%2C%20the%20device%20will%20create%20a%20Wifi%20access%20point%20named%20Rakwireless_XXX%3A).

❓Any idea how could I proceed? Feels like a dead end.

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/rak2245-pihat-on-pi4-gateway-wont-connect/58480)._
