Stratum 1 Reference

Submitted by Thomas Nilsson on

Not complete

It all started with an article in "Linux Format LX282" where there was a tutorial on how to setup a Stratum 0 Reference, "Setting atomic-clock precise time on your Pi". The article describes a way to get accurate time on a Raspberry Pi. Unfortunately the chosen solution, using PPS-client doesn't provide server capabilities. For this to work either a ntpd, ntpsec or chrony server is needed. But interestingly enough all these different solution uses the same GPS with PPS-capabilities, namely a "Adafruit Ultimate GPS HAT for Raspberry Pi".

There are many different problem popping up which are not always documented in the available descriptions on the net. Below is a list of articles where I have found useful information:

  1. https://gpsd.io/gpsd-time-service-howto.html
  2. https://www.ntpsec.org/white-papers/stratum-1-microserver-howto/
  3. http://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html

Also the manual for the different servers contain a lot of useful information.

For the GPS I have used the gpsd server in order to get the NMEA signal and the PPS signal from it.

The Raspberry Pi I am using is a RP4, mostly because that is what I had available. After a lot of testing I figured out that the easiest and best working SW for my configuration was the chrony server.

FAQ for chrony

The idea was to have the NTP-server connected to the Internet and use the GPS as a fall-back when losing the Internet or as a stand alone NTP-server. However it was found that the switch over and functionallity to get this to work was not so easy to setup. Also the ntpd daemon didn't have all the functionality that I needed.

So I instead went for the solution to only rely on the GPS as the sole source.