[ntp:questions] NetBSD GPS/PPS using 4.2.6p3

A C agcarver+ntp at acarver.net
Sat Aug 20 19:47:17 UTC 2011


Hi everyone,

I read through most of the archives on various discussions on PPS from a 
GPS and tried the suggestions listed there but none have seemed to work 
in my case.

I am using a Globalsat ET212 GPS SiRF III based receiver module which 
was originally used in cellular phone station equipment.  It is 
configured to emit only $GPRMC at 4800 baud.  It has a PPS output 
connected to DCD.

The system is a Sun IPX running NetBSD compiled with PPS_SYNC enabled. 
The receiver is attached to /dev/ttyb with symlinks of /dev/gps1, 
/dev/pps1, and /dev/gpspps1.  I downloaded the code for 4.2.6p3.  I've 
used the program pps-api.c in the util directory of the ntp tarball to 
verify that DCD is working.  The results show that the kernel PPS is 
available:

# ../util/pps-api /dev/gps1
0.000000000 0.000000000 0 0 0.000000000
1313869152.080535506 0.000000000 1 0 -1313869152.080535412
1313869152.080535506 1313869152.960557409 1 1 0.880021903
1313869153.040540311 1313869152.960557409 2 1 -0.079982902
1313869153.040540311 1313869153.920562214 2 2 0.880021903
1313869154.000540116 1313869153.920562214 3 2 -0.079977902
1313869154.000540116 1313869154.880552020 3 3 0.880011904
1313869154.960541921 1313869154.880552020 4 3 -0.079989901
1313869154.960541921 1313869155.840593822 4 4 0.880051901
1313869155.920541727 1313869155.840593822 5 4 -0.079947905
1313869155.920541727 1313869156.800565630 5 5 0.880023903
1313869156.880537532 1313869156.800565630 6 5 -0.079971902

However, ntpd itself doesn't seem to be using the kernel code even 
though the NMEA refclock driver is configured for it (at least I hope 
it's configured):

server  127.127.20.1  minpoll 4 mode 1 prefer iburst
fudge   127.127.20.1  time2 0.245 flag1 0 flag2 0 flag3 1 refid GPS

(Note I worked out time2 by syncing to network clocks with time2 set to 
zero, letting the clock stabilize and then using the offset reported.)


I recompiled my kernel with a message inside the DCD/PPS code which is 
supposed to trigger each time the PPS event happens.  I see this message 
when pps-api is running.  I do NOT see this message ever when ntpd is 
running.

I've also run ntpd in debug mode and sometime after it starts I see ntpd 
claim to enable kernel PPS and then that's immediately followed with the 
message "kern PPS no signal".  Again, the debugging code in the kernel 
PPS routines do not show ntpd is connected to those routines at all even 
though the pps-api test code did.

The NMEA portion of ntpd does manage to acquire data from the GPS and 
participate as one of the servers (with two pool servers being the other 
configured servers).  But there is never any PPS signal.

I also tried using the PPS refclock (with all the NMEA refclock flags 
set to zero) but it never shows the clock being reached (all delays, 
offsets, and jitter are zero, reach is always zero) and the kernel PPS 
debugging code shows no activity.

I can provide ktraces if needed to compare pps-api and ntpd if that will 
help but I'm at a loss to understand why this isn't working at all and 
why ntpd seems to be ignoring the kernel PPS code.

Thanks



More information about the questions mailing list