[ntp:questions] Kernel PPS with Debian

jimmyterrence jimmyterrence at gmail.com
Thu Nov 3 01:16:04 UTC 2011


I've been trying to get kernel PPS working with ntp using Debian
Wheezy. I recompiled the kernel using the Debian kernel sources, and
now I have PPS support compiled right into the kernel. I have a Garmin
GPS 18xLVC, running at 4800 bps with a 40ms PPS pulse. This unit works
just fine at 19200 bps and set at 200ms for the pulse length using
gpsd, so I know the GPS unit itself is okay. Also, I can see the pps
messages in /var/log/syslog:

Nov  2 21:06:44 tick kernel: [ 1208.864217] pps pps0: capture assert
seq #1207
Nov  2 21:06:45 tick kernel: [ 1209.864189] pps pps0: PPS event at
1320282405.493324724
Nov  2 21:06:45 tick kernel: [ 1209.864204] pps pps0: capture assert
seq #1208

I created /dev/gps0 as a symlink to /dev/ttyS0, and when I start ntp
in debug mode, I get this as the output:

refclock_transmit: at 1105 127.127.20.0
refclock_receive: at 1105 127.127.20.0
refclock_sample: n 16 offset 0.029515 disp 0.000000 jitter 0.001547
clock_filter: n 8 off 0.029515 del 0.000000 dsp 0.001694 jit 0.024056
select: combine offset 0.029514746 jitter 0.024056471
clock_update: at 1105 sample 1105 associd 31537
local_clock: offset 0.029514745 jit 0.009313592 freq 150.028 stab
3.928 poll 4
nmea: gpsread 70 $GPRMC,011013,A,4348.5599,N,07921.6287,W,
000.0,047.2,031111,010.7,W*7D
nmea: timecode 70 $GPRMC,011013,A,4348.5599,N,07921.6287,W,
000.0,047.2,031111,010.7,W*7D
nmea: gpsread 70 $GPRMC,011014,A,4348.5599,N,07921.6287,W,
000.0,047.2,031111,010.7,W*7A
nmea: timecode 70 $GPRMC,011014,A,4348.5599,N,07921.6287,W,
000.0,047.2,031111,010.7,W*7A
nmea: gpsread 70 $GPRMC,011015,A,4348.5600,N,07921.6287,W,
000.0,047.2,031111,010.7,W*78

It only ever notices the NMEA output in ntp, and I can tell that
because the jitter is always terrible:

     remote refid st t when poll reach delay offset jitter
========================================
*GPS_NMEA(0) .GPS.  0 l  7 16 377 0.000 23.791  16.842

It doesn't seem to matter how long I let ntp run, it never seems to
see the PPS signal.

Right now, my ntp.conf entry is the following:

server 127.127.20.0 minpoll 4 maxpoll 4 mode 0 prefer
fudge 127.127.20.0 flag1 1 flag2 0 time2 0.600

I've tried ntp-4.2.6.p3 (came with Debian Wheezy) 4.2.6p4 and 4.2.6p5-
RC1 from ntp.org

What do I need to do to get ntp to notice the PPS signal? What am I
missing?

Thank you,

Court



More information about the questions mailing list