[ntp:questions] How to debug GPS PPS?

xyz-2041 xyz2041 at gmail.com
Mon Dec 28 08:57:42 UTC 2009

Plugged in the GPS unit's serial cable into a Windows
computer running WinOncore12 v1.0 (Build 37):


Seemed to work without any problems.  Generated
all sort of graphs and charts.  Let it run and it
told me exact latitude, longitude and height above
sea level.

Used an analog volt meter and from pin 5 (supposed
to be ground), I only noticed voltage on pins 2 and 3.
Pin 2 was going erratically negative once a second.
I believe that this must be received data as per
standards.  Pin 3 was +5 volts, but dropping to
-5 volts once per second.

I've changed my configs a bit, /var/log/ntp.log and
/var/log/ntpd.log don't show any errors.

However, "ntpq -c pe" still doesn't show any response:

 GPS_NMEA(0)     .GPS.            0 l    -   16    0    0.000
0.000   0.001
 PPS(0)          .GPS.            0 l    -   16    0    0.000
0.000   0.001
 GPS_ONCORE(0)   .GPS-.           0 l    -   16    0    0.000
0.000   0.001


ntpdc -c kerninfo
pll offset:           -0.00539973 s
pll frequency:        -46.079 ppm
maximum error:        0.097522 s
estimated error:      0.003708 s
status:               2201  pll ppsjitter nano
pll time constant:    8
precision:            1e-09 s
frequency tolerance:  496 ppm
pps frequency:        -9.224 ppm
pps stability:        0.000 ppm
pps jitter:           0 s
calibration interval: 4 s
calibration cycles:   0
jitter exceeded:      0
stability exceeded:   0
calibration errors:   0

Here is what I have done so far:

- Edit new kernel config file:

  cd /usr/src/sys/i386/conf/
  nano PPS-Generic

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Generic kernel configuration with PPS_SYNC option
include         GENERIC

ident           PPS-GENERIC

# Enable support for the kernel PLL to use an external PPS signal,
# under supervision of [x]ntpd(8)
# More info in ftp://ftp.udel.edu/pub/ntp/kernel.tar.Z
options         PPS_SYNC
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Build and compile the new kernel:

    cd /usr/src
    ls -lt /usr/src/sys/i386/conf
    make buildkernel    KERNCONF=PPS-GENERIC

  This should take 10 mins to 2 hours depending
  on the speed of your computer.

  Check to see that it was created:

    cd /usr/obj/usr/src/sys/PPS-GENERIC
    ls -lta | more

- Install the new kernel:

    cd /usr/src
    make installkernel KERNCONF=PPS-GENERIC

  Check that the new kernel is installed:

    cd /boot
    ls -lta

  These directories should be there:


  Go into each directory and notice
  the time stamps of the "kernel"

    cd /boot/kernel
    ls -lta | grep kernel

    -r-xr-xr-x  1 root  wheel  10204732 Dec 19 13:44 kernel
    -r-xr-xr-x  1 root  wheel  31172114 Dec 19 13:44 kernel.symbols

    cd /boot/kernel.old
    ls -lta | grep kernel

    -r-xr-xr-x  1 root  wheel  10201628 May  1  2009 kernel
    -r-xr-xr-x  1 root  wheel  31167198 May  1  2009 kernel.symbols


    shutdown -r now

- Check if new kernel running

   After rebooting and logging in:

    uname -a | grep PPS

  You should get a readout of the kernel
  name which should include "PPS"

- Create Oncore config file

  cd /etc
  nano ntp.oncore0

    MODE 1
    LON -75.7479
    LAT 39.6632
    HTGPS 67 FT
    DELAY 30 NS

- Create symbolic links:

    ln -s  /dev/cuad0  /dev/oncore.pps.0
    ln -s  /dev/cuad0  /dev/oncore.serial.0
    ln -s  /dev/cuad0  /dev/gps0
    ln -s  /dev/cuad0  /dev/pps0d

- Create /etc/devfs.conf links:

    link cuad0 pps0
    link cuad0 gps0
    link cuad0 oncore.pps.0
    link cuad0 oncore.serial.0

- Check them:

    ls -lta /dev | more

- Edit /etc/ntp.conf:

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# This is the configuration file for NTP
#  (Network Time Protocol).  More info at
#  www.NTP.org
# /etc/ntp.conf

# This computer will act as a stratum 2 time
#  server, by referencing the following 4 or
#  more stratum 1 time servers:

server ntp2.netwrx1.com       iburst     # WI
server otc1.psu.edu              iburst     # PA
server t2.timegps.net            iburst     # CA
server tick.usask.ca             iburst     # CAN

# GPS NMEA (numbers seconds only)
# server prefer minpoll 4 maxpoll 4
server minpoll 4 maxpoll 4

#flag3 Controls the kernel PPS discipline: 0 for disable (default), 1
for enable.
# fudge flag3 1
fudge flag3 0

server prefer minpoll 4 maxpoll 4

#flag3 Controls the kernel PPS discipline: 0 for disable (default), 1
for enable.
fudge flag3 1
fudge refid GPS

# GPS Oncore driver
fudge   refid GPS-Oncore

# Since the clock on most PCs drifts around
#  significantly, let's use a file to
#  keep track of that drift and compensate
#  for it:
driftfile /etc/ntp.drift

# This server will broadcast NTP timing signals
#  over the Local Area Network (LAN):

# Let's setup a log file for NTP:
logfile /var/log/ntp.log

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Does anyone have any idea what I might check next?

More information about the questions mailing list