chrony should already be installed)
Connect your GPS and determine its device name. If it is a USB GPS, the easiest way to do that is to do an
/dev, then plug in the device, and do another
ls and see what changes. The device name will likely be
OPTIONS line in
You can test to make sure you have a GPS connection with the
Next is to set chrony to use the GPS. I was not able to get it to use the socket file (I still have no idea why it would not work), so I ended up using the shared memory method. I added the line:
refclock SHM 0 refid GPS precision 1e-1 offset 0.00065 trust
The offset value I got by watching the time the GPS provided against the time coming from pool.ntp.org servers and seeing how far off it is on average. Since there is a small delay introduced by the USB–>Serial connection, this makes sense.
My GPS does not have the PPS (pulse per second) signal on it, so I could not test that method of communicating with the GPS.
Restart chronyd and gpsd, and then you can check that chrony is using with the command
chronyc sources -v