[LinuxPPS] how to tell if LinuxPPS and GPS are updating ntp (and system time)

Bernhard Schiffner bernhard at schiffner-limbach.de
Sat Nov 21 11:40:00 CET 2009


On Friday 20 November 2009 22:38:16 Allan Ievers wrote:
> Hello,
> 
> I'm having trouble telling if I have LinuxPPS set up properly.
(I'am going to answer only certain aspects of your questions.)

PPS itself:
1.)
cat /sys/class/pps/*/{assert,clear}
gives an useable answer as you've shown yourself.

2.) /dev/pps* is rw-able for its clients (lsof /dev/pps*)

...
> We pass the following signals from the Fury GPSD0 to the RS232 serial port:
> 
> - "NMEA time stamp" (to pin 3)
> - "PPS" (to pin 1, DCD)
It's ok.
Dont forget pin 5 for ground :-)
(But there are bigger quetstions, see below.)

> I am having trouble understanding if ntp is really using the pps signal and
> the gps information.
+=1
ntpd does a "magic" selection of sources. The result is shown in ntpq -c pe
*     selected source
+     positive considered, but not selected
X     considered falseticker
SPACE someting wrong or in progress
...
These signs are explained in the middle of decode.html. IMHO very hidden 
there, no link from ntpq to this location.
 
> We use the NTP driver 20 (mode 2, to read the "GPGGA" output) to get
> both time stamp and PPS. My ntp.conf section is posted a little farther on
> in this mail.
> 
> 
> Here's output from the ntpd (ntpd -g -d):
> 
...
> newpeer: 127.0.0.1->127.127.20.0 mode 3 vers 4 poll 4 10 flags 0x10a1 0x1
>  ttl 0 key 00000000 addto_syslog: refclock_nmea: time_pps_kcbind failed:
>  Operation not supported local_clock: time 0 offset 0.000000 freq 60.643
(Ask Rodolfo for this, after you didi an other check as see below.)

...
 
> trying PPS source "/dev/pps0"
> found PPS source "/dev/pps0"
> ok, found 1 source(s), now start fetching data...
> source 0 - assert 1258747579.664897474,
...
Your ntpq showed that ntpd has the opinion to be in sync with an other source 
within a couple of ms (= 0.00* s)
So if you do a readout of a pps-source as above you should see someting like
source 0 - assert 1258747579.00000000 +/- 0.00* s
even if the pps isn't selected by ntpd.
To be 0,664 second off means something is really wrong.
a) other sources are wrong
b) you selected the wrong slope (assert / clear is denoted by flag2 of pps)

...

> # PPS stuff
> # Driver 20
> server  127.127.20.0 prefer minpoll 4
> fudge   127.127.20.0 stratum 1 flag1 0 flag2 0 flag3 1 time1 0.0
Perhaps flag 2 1 for select clear slope ?
Keep care of flag 3! IMHO 1 is wrong here because pps internals are _not_ 
stored in the linux kernel.
ntp-doc's driver20.html states to use a /dev/gpsppsu for pps.
Perhaps it's necessary to apply a link here (ln -s /dev/pps0 /dev/gpspps0).

> The questions are:  how can I tell
(Do you mean here readout or command to ?)
 
> 1) that ntp is using the GPS time stamp
> 2) that PPS is being used to synchronize that time stamp
> 3) that ntp is updating the system time using the GPS time (i.e., time
>  stamp + PPS)"
(readout sign of first column of ntpq -c pe)

> 
> Thanks,
> 
> Allan
> 
Bernhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ml.enneenne.com/pipermail/linuxpps/attachments/20091121/8ca4557e/attachment-0001.html 


More information about the LinuxPPS mailing list