My ADSB Receiver Box – GPS Precision Time – Upgrade 1

Getting an NTP with PPS (“ATOM”) support

Unfortunately, the version of NTP supplied with the Raspberry Pi Linux does not support PPS. These are the steps to download, compile and install NTP. You can choose between a release and a development version.  The lines below are shown for release version ntp-4.2.8p9, but you will need to alter the version number to suit the version you wish to compile.

$ mkdir ntp                          # make a convenient working directory, if you don't already have one
$ cd ntp                             # enter that directory
$ sudo apt-get install libcap-dev    # once-off, required to prevent later file not found error
$ sudo apt-get install libssl-dev    # once-off, you may not need this, but reports suggest you might to build keygen
$ wget https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p9.tar.gz
$ tar xvfz ntp-4.2.8p9.tar.gz
$ cd ntp-4.2.8p9
$ ./configure --enable-linuxcaps     # takes some minutes
$ make -j5                           # takes some minutes
(use "make -j5" for faster execution on the four-core Raspberry Pi 2/3.)
$ sudo make install                  # puts ntp* in /usr/local/bin/ntp*, takes some seconds
$ sudo service ntp stop
$ sudo cp /usr/local/bin/ntp* /usr/bin/  && sudo cp /usr/local/sbin/ntp* /usr/sbin/
$ sudo service ntp start

Optional check for version and basic function
$ ntpq -crv -pn

Before we can alter the ntp service configuration we need to overcome a problem on Raspberry Pi’s Debian OS. In fact, when you edit /etc/ntp.conf to use PPS and GPS time the DHCP or DHCP3 service will stealthy replace your ntp configuration by its own. So after reboot the ntp service will most like not use PPS and GPS as configured. This is why we disabled the DHCP behavior with overwriting the ntp configuration. Edit /etc/dhcp/dhclient.conf:

From:
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        dhcp6.name-servers, dhcp6.domain-search,
        netbios-name-servers, netbios-scope, interface-mtu,
        rfc3442-classless-static-routes, ntp-servers;
To:
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        dhcp6.name-servers, dhcp6.domain-search,
        netbios-name-servers, netbios-scope, interface-mtu,
        rfc3442-classless-static-routes;

Remove the DHCP service hook and the stealthy created ntp configuration:

$ sudo rm /etc/dhcp/dhclient-exit-hooks.d/ntp
$ sudo rm /var/lib/ntp/ntp.conf.dhcp

Reboot.

One thought on “My ADSB Receiver Box – GPS Precision Time – Upgrade 1

  1. The author has an excellent writing skill to present the theme of the article in an extremely well manner. I have thoroughly enjoyed the article and
    I will recommend all my friends to go through it at least once.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments will be moderated! Spam deleted immediately!
Before you submit form:
Human test by Not Captcha