No valid GPS coordinates available yet

Issue: I cannot get valid GPS location when I run the lora_pkt_fwd gateway for a helium hotspot

Setup: https://store.rakwireless.com/products/rak-discover-kit-2

Server:

Raspberry Pi 4 Model B Rev 1.2
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"

Raspberry Pi reference 2020-08-20
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7252c154838ec5b4576f29c996ac8fe3750cae12, stage2

Linux raspberrypi 5.4.51-v8+ #1333 SMP PREEMPT Mon Aug 10 16:58:35 BST 2020 aarch64 GNU/Linux
Revision	: b03112
Serial		: 1000000063593f07
Model		: Raspberry Pi 4 Model B Rev 1.2

Details:

I purchased the Rak 2 discover kit and performed the following setup on it.

  1. Installed the Pi OS 64 bit lite image http://downloads.raspberrypi.org/raspios_lite_arm64/images/ on a 16GB flash card.

  2. Ran raspi-config to enable\disable the following:

- Select `Interfacing Options`
    - Select `SPI`
    - Select `Yes`
- Select `Interfacing Options`
    - Select `IC2`
    - Select `Yes`
- Select `Interfacing Options`
    - Select `Serial Communictioans`
    - Select `No` for shell access
    - Select `Yes` for serial port hardware
    - Select `Yes` to confirm
- Set hostname if desired
- Save changes and reboot by selecting `Finish`
  1. Installed and compiled the SX1302 LoRa Gateway project from source, using this repo:
  1. Ran the ./lora_pkt_fwd and see the following messages, even though my device is under clear sky. (note that the global_config.json is pointing to /dev/ttyS0):

gateway_1 | ### [GPS] ###
gateway_1 | # Valid time reference (age: 1 sec)
gateway_1 | # no valid GPS coordinates available yet

Debugging.

I originally tried /dev/ttyAMA0, but saw no data there. When I switched to use /dev/ttyS0, I would see some NMEA data if I cat’d the socket. However, as soon as I started the forwarder, it would start printing binary data on the socket. The only thing that would reset it back to what looked like NMEA data, was powering off the Pi and restarting it.

I also am not sure what pins I should use to reset the RAK2287. Currently I am using…

SX1302_RESET_PIN=17
SX1302_POWER_EN_PIN=2

Any help debugging is much appreciated.

Hi @dasein As this is not something that we support, I am not sure how much I can help, but I try. :slight_smile:
First, you need to use Default UART for GPS and this is ttyAMA0 in the global config.
For the reset script, the reset pin is correct, you need to change the power_en pin to 18.

You need to be sure that the UART is enabled in your config.txt, btw, can you share your config.txt?
Also what you get when trying to cat /dev/ttyAMA0 ?

There has never been any output on /dev/ttyAMA0 and the boot config for my raspberry pi is set to do enable_uart=1. The data on /dev/ttyS0 looks correct up until I run the ./lora_pkt_fwd software on the device. If I have some time, I will try and dig a little deeper…is there a way to validate the GPS data on /dev/ttyS0 using another method?

Hello, are you using class B? i solved the same problem that you have simply by starting the gateway process in super user mode

cd /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/

sudo systemctl stop ttn-gateway.service

sudo ./start.sh