RAK2004 Pi HAT Ver B

I’ve recently bought a RAK2287 concentrator with RAK2004 Pi HAT. I am assuming this came out of some development kit as the RAK2004 Pi HAT is not available separately.

I have been trying to get the concentrator to work, for instance by using the official RAK Wireless github project ‘rak_common_for_gateway’, the [GitHub - lorabasics/basicstation: LoRa Basics™ Station - The LoRaWAN Gateway Software], and [GitHub - xoseperez/basicstation: Basics™ Station Packet Forward protocol using Docker].

Although the exact issues differ per setup, in each case the software shutsdown after it gives some form of error on either resetting the concentrator or trying to apply some settings to it. I’ve tried using the test tools that are part of GitHub - Lora-net/sx1302_hal: SX1302/SX1303 Hardware Abstraction Layer and Tools (packet forwarder…), but am getting fails on all tests, suggesting I’m either using the wrong pins or have some other communication issue with the Pi Hat.

Does anyone have suggestions or pointers to get me to the next step?

[I had to remove some links because I’m not allowed more than 2 in one post]

Using GitHub - lorabasics/basicstation: LoRa Basics™ Station - The LoRaWAN Gateway Software, I tried running the Corecell example adapted to Actility. These are the first errors that show up:

ERROR: Failed to set SX1250_0 in STANDBY_RC mode
2023-04-20 13:08:13.340 [HAL:INFO] [lgw_com_open:84] Opening SPI communication interface
2023-04-20 13:08:13.340 [HAL:INFO] [lgw_spi_open:88] Setting SPI speed to 2000000
2023-04-20 13:08:13.340 [HAL:INFO] [lgw_connect:1192] chip version is 0x05 (v0.5)
2023-04-20 13:08:14.943 [HAL:ERRO] [lgw_start:906] failed to setup radio 0
2023-04-20 13:08:14.943 [RAL:ERRO] Concentrator start failed: lgw_start
2023-04-20 13:08:14.943 [RAL:ERRO] ral_config failed with status 0x08
2023-04-20 13:08:14.943 [any:ERRO] Closing connection to muxs - error in s2e_onMsg

It seems to start with ERROR: Failed to set SX1250_0 in STANDBY_RC mode, I’ve seen elsewhere on the forum as well. Any guidance?

1 Like

Hi… my (unqualified) guesses:

[1] These most likely came from a RAK/MNTD Blackspot/Goldspot miner.

[2] You may need very specific software and/or firmware, in order for it to work.

Also… have your antenna(s) installed first, so as to protect your RAK2287 from potential damage.

RAKWireless ‘Quick Start’ Guide:

Hello @cowcreekgeek ,

In case, you are using a concentrator from Miner you can contact us at [email protected] so we can provide you with the procedure for that.
Also, there are more issues that may lead to this error, and not only if the concentrator is from MNTD helium miner.

Best Regards,
Nikola Semov

I bought a handful of these RAK2287 and RAK2004 Pi hat combos for a work project and ran into the same “not working” issue. I know the RAK2004 Pi Hat isn’t available for purchase through RAK Wireless, but there are other sellers/distributors selling them and this isn’t the first time I ran across this in a forum so I thought I’d share the solution.

After probing the hat with a meter, I found that the reset pin is routed to pin 25 which is different from most of the other Pi Hats from RAK (usually routed to pin 17).

First, follow the instructions to install ‘rak_common_for_gateway’ and register the gateway with TTN.
I used the following link to do that:

Next, and most importantly, open the reset script in a text editor and change the reset pin number.

cd /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd
sudo nano reset_lgw.sh

Find the SX1302_RESET_PIN variable (should be the first line of code after the comments) and
change it to this:
SX1302_RESET_PIN=25

Save the file.
...and for anyone not familiar with nano, here's how to do that:
CRTL+X
Y
enter

Restart the service (another hint: sudo systemctl restart ttn-gateway.service). 

You should now see the gateway come to life!

…hopefully this helps anyone else that runs into this issue.