RAK2245 PiHat diagnostics?

My 2245 PiHat arrived two weeks ago, and I have not yet been able to get it to make a connection to The Things Network server.

Are there diagnostic programs that would test the 2245 to ensure that it is working correctly? The /opt/ttn-gateway/lora_gateway/util* programs don’t provide board diagnostics (and spectral_scan refuses to run, which leads me to believe there’s a hardware or fpga version issue).

I’m new to LoRa, so this might be an installation problem. Briefly:

  • I’ve installed the 2245 on a Pi-3B+. I booted Buster on a USB-SSD drive in my first attempts in which I installed Chirpstack; I now boot Stretch from a µSD card that was imaged from RAK’s firmware repository.
  • I’ve installed Chirpstack on Raspbian Buster a couple of times with no success, so I gave that up and have been working on just the standard RAK image since then.
  • I’ve installed https://downloads.rakwireless.com/en/LoRa/RAK2245-Pi-HAT/Firmware/RAK2245%26RAK831_based_on_Raspbian_OS_for_RPI3_V4.1.0_20191202.zip a couple of times with no success, and that’s the system I’m focused on right now.
  • I used Version 1.0, May, 2019 of the installation guide for instructions.
  • I set my system up as a concentrator/gateway to the TTN network.
  • I configured for US frequencies on both the TTN network server and the gateway. I noted the ID reported by the RAK gateway-version and used it to provision the gateway on the TTN console.
  • The TTN network reports that it is connected to my gateway.
  • I created the application and device on the TTN console. Simulating packets up/down DO NOT get reported as traffic at the TTN console.
  • I have a Sparkfun SAMD21 Pro RF I’m using to send packets to the RAK gateway. Those packets are not seen by the TTN Console. I presume that they are not seen by the RAK hardware or software.
  • My friend, with the same RAK2245/SAMD21 setup, runs my SAMD21 code and successfully sends packets over his RAK2245 to my TTN network service, so I’m pretty sure the Arduino code is working correctly.
  • The lora_gateway journalctl logs report that the software is not connecting to the GPS. The TTN console has not updated the gateway’s location from GPS coordinates. I do see 1-sec packets coming from the GPS (cat /dev/ttyACM0), but the RAK application doesn’t see them.

From the startup logs:
*** Beacon Packet Forwarder for Lora Gateway ***
Version: 4.0.1
*** Lora concentrator HAL library version info ***
Version: 5.0.1;

Oddly, radio 0 has center frequency 904300000; radio 1 has center frequency 905000000. I think those are NOT the subband 1 frequencies TTN expects to use in the US, but that code DID work on my friends’ SAMD21 selecting subband 1, so I haven’t changed mine.

In fact, I’ve done no tinkering with parameters except through the gateway-config program supplied by RAK. This is a standard install following standard instructions.

So my conclusion is that I have faulty hardware. Are there diagnostics I can use to check that? Or does anyone have suggestions for other things I should look at?

I should have added that I have tried the various testing routines in the /opt/ttn-gateway directory, but I consistently get an error message like the one below:

/opt/ttn-gateway/lora_gateway/libloragw# ./test_loragw_hal -a 904.3 -b 905.0 -t 904.3 -r 1257 -k 0
Beginning of test for loragw_hal.c
*** Library version information ***
Version: 5.0.1;

ERROR: Version of calibration firmware not expected, actual:4 expected:2
*** Impossible to start concentrator ***

I’ve looked for the source of that error message. It appears to be related to SPI, and I wonder if there’s a problem with the SPI connection. I’ve checked, and this distribution DOES have the SPI speed set at 2MHz (as stated in a separate thread).

The register test DOES run but finds some mismatches between what the code expects and what it finds in the registers. Here’s the beginning of that:

/opt/ttn-gateway/lora_gateway/libloragw# ./test_loragw_reg
Beginning of test for loragw_reg.c
Start of register verification
+++MATCH+++ reg number 0 read: 0 (0) default: 0 (0)
+++MATCH+++ reg number 1 read: 0 (0) default: 0 (0)
+++MATCH+++ reg number 2 read: 103 (67) default: 103 (67)
+++MATCH+++ reg number 3 read: 0 (0) default: 0 (0)
###MISMATCH### reg number 4 read: 209 (d1) default: 0 (0)

So … maybe a starting point is to get these tests working correctly. Any ideas?

i have the same problem, sorry if i’m not helping but can you tell me where did you find the LoRa Server Image ?
thanks

Adlane, you can find it here:
https://downloads.rakwireless.com/en/LoRa/
under 2245-Pi-Hat/firmware.

The get started notes are in the same place, under “Application Notes”.

Following up on my original posting, I now have the RAK2245 Pi-Hat happily forwarding packets to the TTN network server. It turned out that the problem was in the library on my Sparkfun SAMD21 Pro RF in the Arduino IDE. The config.h file the IDE was using wasn’t the config.h I had edited to set to US915; when I found and fixed that, packets started flowing.

However, I still don’t have the GPS connecting. I’ll fiddle with it a bit more, but if anyone has GPS from the 2245 Pi-Hat updating the gateway location as seen by the TTN network console: is there anything special you had to do to get it working?

Hi, in TTN Gateway Console you have to use the PIN on the map. This is not automatically updated.

Thanks!

But I have a RAK 2245 PiHat on a Pi-3B+. The GPS on it seems to be working: if I “cat /dev/ttyACM0”, I get 1-sec strings that look something like this

$GPVTG,0,00,9GPGSA,A,.99,99.9LL,WV,0,00,9GPGSA,A,.99,99.9LL,V,N*64

Is it possible for my gateway to use that in any way? Or for loraserver to use it when I’m running the network/app server locally? My global_conf.json file says I have GPS and gives the /dev/ttyACM0 device address.

I’m running loraserver right now:

  • lora-gateway-bridge version 2.7.1

  • lora_pkt_fwd
    *** Beacon Packet Forwarder for Lora Gateway ***
    Version: 4.0.1
    *** Lora concentrator HAL library version info ***
    Version: 5.0.1;

  • /usr/bin/loraserver version 2.8.2

  • /usr/bin/lora-app-server version 2.6.1

Plan to move to Chirpserver shortly, if that would make a difference.

Hey David,

Did you get this working. I am having a similar issue?
Mine is a RAK2243 running on a Pi-4.

James

Good Morning, James (from a rainy morning in Vermont),

I did get it working. I haven’t done anything with LoRa for about 2 years (decided that 433MHz ISM was a better fit for what I’m interested in doing), so I don’t recall offhand exactly what the solution was.

HOWEVER, I made extensive notes at the time. I’ll get upstairs to the office shortly and go back to see what I did.

David

Good Morning Again, James,

Well, my memory is better than I thought, but I wanted to double-check my notes (below) from when I was doing that work.

My problem was with the RAK 2245 hardware. Now, I also reinstalled software a number of times trying to debug the problems, and I’ve included information about how I reinstalled in case you want to try that.

But ultimately the problem wasn’t resolved until I received the RAK 2245 replacement.

HOWEVER: it turned out that the problem was not the RAK 2245 HAT but rather JUST THE GPS ANTENNA!!! That is, when I received the replacement RAK (including the antennas), I used the replacement GPS antenna with MY OLD RAK HAT, and it immediately worked. Three months of frustration resolved down to a hardware problem with the antenna.

Unfortunately, that’s not likely to be all that helpful to you, except that it might suggest that you check your GPS antenna. In particular, I’d suggest checking that that little connector pin hasn’t been bent. And if you have other GPS antennas with similar connectors, try one of those.

I’m sorry that this is probably not all that helpful for your particular situation (unless something in my software reinstalls helps), but it was ultimately an antenna or connector hardware problem in my case.

My notes:

The RAK2245 PiHat is a popular Raspberry Pi add-on board used for LoRaWAN gateway applications. If you are experiencing issues with your RAK2245 PiHat and need to diagnose the problem, here are a few steps you can follow:

Check the physical connections: Ensure that the RAK2245 PiHat is securely connected to your Raspberry Pi. Verify that the board is properly seated on the GPIO pins and that all necessary cables and antennas are connected correctly.

Verify power supply: Make sure your Raspberry Pi and the RAK2245 PiHat are receiving sufficient power. Check the power source and ensure that it can provide the necessary current.

Verify software setup: Confirm that the required software and drivers are installed and configured correctly on your Raspberry Pi. This may include the LoRaWAN packet forwarder, LoRaWAN server configuration, and any other software specific to your application.

Check LoRaWAN gateway logs: Access the logs of your LoRaWAN gateway software and look for any error messages or warnings. These logs can provide valuable insights into the functioning of the RAK2245 PiHat and help identify any issues.

Test with different antennas and frequencies: Experiment with different antennas and frequencies to ensure that the problem is not related to signal interference or antenna mismatch.

Consult the RAK2245 PiHat documentation and support resources: Refer to the official documentation and support channels provided by RAKwireless for troubleshooting steps and guidance specific to the RAK2245 PiHat.