SOLVED: WARNING: [gps] could not get UTC time from GPS

Hi there

I just sat up a Sandbox Electronics LoRaGo PORT Gateway and everything works fine except:
It is with a RPi3 and I disabled the Bluetooth to make the GPS work.
So, if I do a cat /ttyAMA0 I can see the NMEA messages and I see time and coordinates.

I always get these messages in syslog or from the packet forwarder:
WARNING: [gps] could not get UTC time from GPS

I also keep seeing this:
Apr 6 01:52:56 B827EBFFFE032416 ttn-gateway[346]: ### [GPS] ###
Apr 6 01:52:56 B827EBFFFE032416 ttn-gateway[346]: # Invalid gps time reference (age: 1522972376 sec)
Apr 6 01:52:56 B827EBFFFE032416 ttn-gateway[346]: # no valid GPS coordinates available yet
Apr 6 01:52:56 B827EBFFFE032416 ttn-gateway[346]: ##### END #####
Any ideas?

Which packet forwarder are you using? What brand GPS? Did you modify the configuration to point the packet forwarder to the correct port? What speed is the GPS set to?
You could search the forum for messages relating to this subject, there are earlier threads from people with the same issue.

1 Like

Thank you kersing for your suggestions and questions:

I use the packet forwarder that came with the installation according to this page:
http://sandboxelectronics.com/?p=2696
with the installation like that:
git clone https://github.com/ttn-zh/ic880a-gateway.git ~/ic880a-gateway

The GPS is the one included on the board, it is a Unicorecom UM220-III N and I could not find any info on any command parameters to influence the NMEA sentences or baud-rate or whatever.
It just runs happily along…

What do you mean by correct port? The dev?
Yes, should be OK, it is /dev/ttyAMA0 and I can see the NMEAs comming in with cat /dev/ttyAMA0
Baud rate, I do not know. How can I actually check it? I did also not notice settings in global or local settings.conf

I tried to search the forum and Google for the issue and found some references to similar problems (none with the same gateway though) and none of them had any solution that might really fit to my problem.

Sometimes people did not deactivate bluetooth on the RPi3 so getting no data at all.
But as I get data, it is more complicated to find.

I had hoped that somebody uses the same gateway and has (or got) it working.

1 Like

It is hard coded in the gateway library sources so you need to to check the source, probably 9600bps (check lora_gateway/libloragw/src/loragw_gps.c)

OK, GPS sends NMEA with 9600 and loragw_gps.c is set to 9600 baud.
I managed to start test_loragw_gps (after recompiling because it did not use ttyAMA0)

I receive the following messages:
~~ RMC NMEA sentence, triggering synchronization attempt ~~
No valid reference UTC time available, synchronization impossible.

Finally I found it:
I finally noticed, despite the receiver had coordinates returned that obviously almost all the time, the RMC was marked as not valid (the N right before the checksum) altough it was at a large window (not to the north) where e.g. ublox GPSs usually work fine.
Would have been nice to see a message like: GPS has no position fix.

So, I learned now that this GPS is very picky about the location and needs to truly see the sky :slight_smile:

Thank you again for helping me seeing into this and:
Can I mark the topic solved somehow?

3 Likes