Verifying GPS time synchronisation

Thanks a lot for all your effort and your extensive Feedback!

I followed the instructions, and it seems that the original GPS module (u-Blox) performs as you describe, and I therefore assume that time synchronisation is OK.
Unfortunately tests failed with our Emlid Reach M+ module, that has NMEA output on USB too.
It seems that the device is not ready fast enough, when the R-Shake (attached with it) is powered up. In our setup we make use of this unit anyway, so it’d have been great not using a second GPS device, draining the batteries even more…

Best regards,
Diego

…And this is how we finally managed to use the GPS signal from our EMLID Reach M+.
Thanks a lot to Tinu Lüthi, who actually realised it:

In the instructions below the $ sign indicates the commands to be
typed into a terminal/shell. Do not type the $-sign.

=============
the gpsd part
=============

make sure that the GPS is visible and feeding the gps daemon gpsd

check whether you get GPS signals (for me this is /dev/ttyACM0, but
it might also be /dev/ttyUSB0 or something else, check with dmesg)

$ cat /dev/ttyACM0     # (interrupt with CTRL-C)

------------------
Make a backup of the GPSD service:

$ sudo cp /lib/systemd/system/gpsd.service /systemd/system/gpsd.service.orig

Then edit the service

$ nano /lib/systemd/system/gpsd.service

and add the line

ExecStart=/usr/bin/gpsd -b -n /dev/gps0

------------------

*now you have to create a link from your GPS device to the alias /dev/gps0 *

$ sudo ln -s /dev/ttyACM0 /dev/gps0

then restart the gpsd daemon

$ sudo systemctl restart gpsd

and see whether you were successful using gpsmon

$ gpsmon

============
the ntp part
============

------------------
Make a backup of the NTP config:

$ sudo cp /etc/ntp.conf /etc/ntp.conf.orig

Now edit /etc/ntp.conf:

$ nano /etc/ntp.conf

Add or change the lines below:

server 127.127.46.0
fudge 127.127.46.0 time1 0.0 time2 0.0 refid myGPS

------------------

now check whether the myGPS is found and provides a good time signal

$ ntpq -pcrv

or monitor with it every 5 seconds with

$ watch -n 5 ntpq -p
1 Like

Thanks @IceShake! I edited the post to make sure code blocks were easily recognizable.

I found your post very helpful having just installed the GPS module and unsure whether it was working. Thanks - very useful commands to add to my list.

myshake@raspberryshake:/opt $ ntpq -p
remote refid st t when poll reach delay offset jitter

SHM(0) .GPS. 0 l 15 16 377 0.000 375.597 0.962
*SHM(1) .PPS. 0 l 14 16 377 0.000 0.188 0.280
+192.107.172.19 .GPS. 1 u 46 64 377 14.331 -1.591 1.541
+203-114-153-177 .PPS. 1 u 1 64 377 6.871 0.279 0.328
-time.mortis.net .GNSS. 1 u 23 64 377 13.580 4.757 0.501
myshake@raspberryshake:/opt $ sudo gpsd-mgr -t
Test Successful

2 Likes