I realize I’m 4 years late to this convo, but I hope I can at least provide some information that can help others.
According to the NTP docs in regards to the Generic NMEA 20 driver:
https://www.ntp.org/documentation/drivers/driver20/
The 20 driver is specifically looking for GPS sentences from
/dev/gpsu
It’s also looking for a PPS signal specifically from
/dev/gpsppsu
In both cases, u = a number usually starting from 0 for each GPS/PPS signal that is available.
So you need to make sure that the GPS serial output is available @ /dev/gpsu, and the PPS is @ /dev/gpsppsu. This can be done via symlinks. In my case, once I identified what the OS had named the original serial port and PPS port to, I simply symlinked them to what the ntpd 20 driver is expecting.
For the serial port on my setup:
ln -s /dev/ttyAMA0 /dev/gps0
And for the PPS port:
ln -s /dev/pps0 /dev/gpspps0
I then entered in the /etc/ntp.conf file:
server 127.127.20.0 prefer mode 24
fudge 127.127.20.0 flag1 1
The first line is set to server and prefer as this is the time being received that you want to use with your ntpd server. The 2nd line uses fudge as this indicates it’s the PPS signal to use to correct when the actual GPS time in the first line started, it’s not a time source, its a correction source.
127.127.20.u indicates to use the local system ntpd 20 driver to read and process the GPS sentence(s), and the local system PPS signal. The u is whatever you had set the /dev/gps vales to. So in my case, since I used /dev/gps0 and /dev/gpspps0, then I end up with 127.127.20.0.
The “mode 24” on the first line was set in my case because I wanted to ensure the serial port was being accessed @ 9600bps, and that $GPZDA
sentences was being processed for the time as I had configured my GPS receiver to only output those sentences. 9600bps = mode 16, $GPZDA
= mode 8, add those decimal values together and you get mode 24. Hopefully this example allows you to understand how the ntpd 20 driver interprets the mode switch, as it took me some time to figure that out the chart.
The “flag1 1” on the second line is needed for the serial GPS to be diciplined to an accurate time. Without it, ntpd doesn’t know when the second in the first line actually started and would tend to ignore it in favor of another source, even with the prefer switch having been added to the first line.