[ntp:questions] How to debug GPS PPS?

Thomas Laus lausts at acm.org
Mon Feb 15 15:03:27 UTC 2010


On 2010-02-15, David Lord <snews at lordynet.org> wrote:
>> 
>> Changed back to the Oncore:
>> 
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> # GPS Oncore driver
>> # server 127.127.30.0  prefer
>> server 127.127.30.0
>> fudge  127.127.30.0   refid GPSo
>> 
>> # PPS driver:
>> server 127.127.22.0   prefer
>> fudge  127.127.22.0   refid PPS
>> 
>> # Generic NMEA GPS Receiver:
>> # server 127.127.20.0
>> # fudge  127.127.20.0   time1 0.752 refid NMEA
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 
>> Pin 1 = PPS                       (Light is blinking once per second
>> for about 200 ms)
>> Pin 2 = Data: GPS -> PC    (Light blinks once per second--after pin 1--
>> for about 300-400 ms)
>> Pin 3 = Data: PC   -> GPS
>> Pin 5 = Ground
>> 
>> 
>> Installed:
>> 
>>  pkg_info | grep gpsd
>> gpsd-2.90           Daemon that monitors one or more GPSes attached to
>> a host c
>> 
>> 
>> # ls -lta /dev | grep cua
>> crw-rw----   1 uucp      dialer      0,  41 Feb 15 00:33 cuad0
>> lrwxr-xr-x   1 root      wheel            5 Feb 14 15:42 gps0 -> cuad0
>> lrwxr-xr-x   1 root      wheel            5 Feb 14 15:42 oncore.pps.0 -
>>> cuad0
>> lrwxr-xr-x   1 root      wheel            5 Feb 14 15:42 oncore.serial.
>> 0 -> cuad0
>> lrwxr-xr-x   1 root      wheel            5 Feb 14 15:42 pps0 -> cuad0
>> lrwxr-xr-x   1 root      wheel            5 Feb 14 15:42 refclock-0 ->
>> cuad0
>> crw-rw----   1 uucp      dialer      0,  42 Feb 14 15:42 cuad0.init
>> crw-rw----   1 uucp      dialer      0,  43 Feb 14 15:42 cuad0.lock
>> 
>> 
>> gpsd outputs nothing at all:
>
The PPS and data lights blinking show that your Oncore is working.  One
thing to keep in mind is that the serial baudrate changes from 9600 when
defaulted in Motorola binary to 4800 when defaulted in the NMEA mode.
Is gpsd looking for Motorola binary protocol or NMEA sentences?  The HEX
output that you are seeing when you look at /dev/cuad0 tells me that
your Oncore is sending Motorola binary.

>> 
>> # /usr/local/sbin/gpsd /dev/cuad0
>> #
>> 
>> 
>> # /usr/local/bin/gpscat -s 9600N1 /dev/cuad0
>> 
>> Get some HEX output once per second:
>> 
>> \x08'\xa2\x03\x08#\xa2\x06\x00\x00 \x08\x081\xa2\x17\x00\x00\x00\x1c
>> \x00\x00\x00\x08*
>> @@Ea\x02\x0f\x07\xda\x004+\x00\x02\xea\xb1\x08\xce,\xbf\xec>
>> \x0f0\x00\x00N\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01
>>
The \0x08'\.... is not in my book.  The \@@Ea\xa2\x03\.... line is a position
status message in Motorola binary.  It is sending month, day, year,
hours, minutes, seconds, fractional seconds.  The rest of the line is
supposed to show your position (latitude followed by longitude).  Your
message seems to be showing zero's.  I would guess that your receiver has
not yet found itself.  The Oncore driver executes a receiver self test
when started and then looks for a position and a valid almanac.  It will
put the receiver in the 'site survey' mode for about 2 hours to get an
idea of your antenna current position.  The receiver will wait for a
valid almanac before starting the site survey.  If your /ntp/oncore file
has a mode statement and the results of a previous site survey, the
receiver only requires a valid almanac before ntp uses it for a
reference.  This could take 30 minutes if there isn't one in your
receiver.  The latest development version of the ntp software is a lot
more verbose than the released version.  All of the Oncore startup
events are now sent to the syslog.  You can see when the self test is
complete and when it grabs the almanac and completes the self survey.
Reg Clements has done a good job in making the Oncore driver send more
reports for receiver problem troubleshooting.

Tom



-- 
Public Keys:
PGP KeyID = 0x5F22FDC1
GnuPG KeyID = 0x620836CF




More information about the questions mailing list