[ntp:questions] Problem troubleshooting gps/pps on freebsd 8.1

Mr Dave Baxter g8kbv at uko2.co.uk
Thu Dec 16 09:13:02 UTC 2010


In article <AANLkTi=+PBuFs6rY3RRq+-2DNxpNPXSCwuCG-Rq42xe-
@mail.gmail.com>, hart at ntp.org says...
> 
> On Thu, Dec 16, 2010 at 04:02 AM, Peter S <pst at telia.com> wrote:
> > The gps is connected to the serial port and the pps signal to dcd. I
> > run ntpd 4.2.6p2 and freebsd 8.1.
> >
> > I can simply not get the nmea reference clock to work and I don't know
> > how to troubleshoot it.
> >
> > Running ntpd -d I see this so I guess ntpd sees the gps:
> >
> > nmea: gpsread 70 $GPRMC,033730,A,5926.7899,N,01758.1371,E,
> > 000.3,339.3,161210,004.0,E*72
> > nmea: gpsread 66 $GPGGA,033730,5926.7899,N,01758.1371,E,
> > 1,05,2.4,32.4,M,23.3,M,,*7A
> 
> You may be suffering from a refclock_nmea bug where multiple sentences
> were processed including stuffing an offset in the clock filter, when
> only one should go that far.  Either configure the GPS to send only
> one of GPRMC or GPGGA (both of which ntpd understands) or refer to
> html/driver/driver20.html for the mode to use in ntp.conf to instruct
> it to process only one or the other of the sentences you're seeing
> each second.
> 
> I mention last because so few seem willing to upgrade ntpd when a
> workaround will do, you could also upgrade to 4.2.6p3-RC11 or a recent
> ntp-dev (4.2.7) which have this NMEA bug fixed.
> 
> Cheers,
> Dave Hart

Hi..

I have successfully done that with FreeBSD V8.0, and following the 
instructions "To the letter" it works fine, all on an old Gateway small 
format desktop PC.  The GPS (Garmin GPS16LVS) is powered by the 
reduntant mouse port too.

You do have to configure the GPS RX to only spit out 1 posibly 2 
sentences (I went for GPRMC only.)   What GPS RX are you using?   Have 
you made sure with a 'scope for example, that the PPS signal is getting 
to the DCD pin, and is still enough volts, and wide enough to trigger it 
(he does suggest using a pulse of 200ms, but it's the leading edge 
that's used, not the entire pulse as such.)

Some COM ports are a little reluctant to work relaibly with just a 0..5V 
signal, so it may need a buffer.

One thing I did notice...   Your ref clock server addresses 127.127.20.0  
Is that right?   Should be 127.127.20.1 ???

Assuming you got the symlink OK.
link  cuau0 gps1

>From that blog page...  It does say:-

It has the special IP address 127.127.20.x where x is the number of the 
GPS unit in /dev/gpsx.

And illustrates that with:-

server  127.127.20.1    mode 0  minpoll 4 maxpoll 4   prefer
fudge   127.127.20.1    flag1 1  flag3 1 refid GPS


Doing all that "*Exactly*" as he describes does work.  I know, if I can 
make it work, the instructions must be OK! :-)

Unless something is significantly different between FreeBSD V8.0 and 8.1

And of course, you did recompile the Kernel, to support PPS?  It has to 
be asked...

Best Regards.

Dave B.




More information about the questions mailing list