The poor GPS signal only provided intermittent time data. The oscillator on the router drifts - as expected - when is isn’t disciplined by the PPS signal.
I bought an active GPS antenna and now have a reliable PPS signal from the GPS. NTP reference clock has stabilized with offset of less than 2μs and a jitter of around 4 μs. NTP clients on the LAN are within 1 ms with a jitter of around 0.5 ms.
One addition to the ntpd.conf file above. Increase mindist, the minimum distance used by the selection and anticlockhop algorithm, with the line
tos mindist 0.02
This allows for the variation in the serial port NMEA data used by the GPS reference clock. The default is 0.001. A value of 0.01 to 0.02 works for me.
For long term use as a stand alone server I need to add and maintain a leap second file.
To summarize, the GL-MT300N-V2 is working very well as a Stratum 1 NTP server provided the attached GPS unit has a reliable signal. The complexity was similar to the RaspberryPi Zero W:
- hardware mods are similar - attach 5 wires
- needed to compile a kernel for the MT300N to add pps gpio to device tree, whereas RPi uses a device tree overlay
- needed to recompile ntpd for RPi as it isn’t configured with PPS reference clock 22, while stock ntpd for openwrt is
- ethernet interface on MT300N has less delay and less jitter than wifi interface on RPi
2 Likes