[chrony-users] Time from gpsd via socket

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


I’m trying to setup a Pi to be a home NTP server, getting both time and PPS from GPS. I have the Adafruit Ultimate GPS hat. There are plenty of guides for this on the web, but they all seem to be for Debian 9, and “Raspberry Pi OS”, as Raspbian is now known, is now based on Debian 10, and things have changed.

gpsd is connected to /dev/ttyS0 (in Debian 9, it was called ttyAMA0) and /dev/pps0. “gpsmon” shows time, position, and PPS offset, so I believe it is setup correctly.

My chrony.conf is as follows:

server router.home iburst noselect
keyfile /etc/chrony/chrony.keys
driftfile /var/lib/chrony/chrony.drift
logdir /var/log/chrony
log refclocks
maxupdateskew 100.0
rtcsync
makestep 1 -1
allow
refclock SOCK /run/chrony.pps0.sock refid GPS

“chronyc sources” shows this:

210 Number of sources = 2
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
#* GPS                           0   4   377    16   -489ns[ -565ns] +/-  421ns
^? router.home                   2   8   377   210  -2535us[-2536us] +/-   39ms

Is this setup correctly? Originally, I was following this guide:
https://gpsd.gitlab.io/gpsd/gpsd-time-service-howto.html#_feeding_chrony_from_gpsd

And I had two “refclock” lines, one for “GPS” pointing at ttyS0, and one for “PPS” pointing at “pps0”, but I could not get this to work. The PPS line returned data, but the GPS line always had a “Reach” of 0.

In my configuration above, does the single “refclock” line return time *and* PPS? Or just PPS? How can I tell?

If I do need two refclocks for time and pps, how can I determine why the original “GPS” refclock wasn’t working?

Thanks.


--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/