[ntp:questions] Maximum time2 fudge value for NMEA refclock?

jimmyterrence jimmyterrence at gmail.com
Sun Jul 18 02:10:16 UTC 2010


On Jul 16, 10:14 pm, hal-use... at ip-64-139-1-69.sjc.megapath.net (Hal
Murray) wrote:
> >I created a symlink called gps0 to my serial port ttyS0, because it
> >told me that in the logs when I tried to start up ntpd without it.
>
> >Can somebody who uses the NMEA driver in linux tell me if there is
> >something else that I should have compiled in? gpsd works fine, but
> >every time I switch to the NMEA type 20 driver, it doesn't work. It
> >doesn't seem to write anything to the system logs, or clockstats
> >either.
>
> You also need a bit more magic.  There should be good documentation
> someplace, but I don't know where it is.  Try man ldattach
>
> I'm using this in /etc/sysconfig/ntpd on Fedora
>
> if [ ! -e /dev/gps12 ]; then  # GPS 18x LVC
>   ln -s /dev/ttyS0 /dev/gps12
>   setserial /dev/ttyS0 low_latency
>   ldattach 18 /dev/gps12
>   ln -s /dev/pps0 /dev/gpspps12
> fi
>
> --
> These are my opinions, not necessarily my employer's.  I hate spam.

I'm not sure about ldattach. What does it do that I need? I can see
that I need to automatically create a link for gps0, because I had to
do it manually before I started ntp with the NMEA driver. pps0 was
created automatically, I guess. It said it existed when I tried to
create it, anyway.

Here is the dump from /var/log/syslog

Jul 17 21:59:43 gps kernel: [118556.203061] new PPS source serial0 at
ID 0
Jul 17 21:59:43 gps kernel: [118556.203169] PPS source #0 "/dev/ttyS0"
added
Jul 17 22:01:04 gps ntpd[1099]: ntpd exiting on signal 15
Jul 17 22:01:06 gps ntpd[8248]: ntpd 4.2.6p1 at 1.2158-o Wed May 26
18:51:49 UTC 2010 (1)
Jul 17 22:01:06 gps ntpd[8249]: proto: precision = 2.514 usec
Jul 17 22:01:06 gps ntpd[8249]: Listen and drop on 0 v4wildcard
0.0.0.0 UDP 123
Jul 17 22:01:06 gps ntpd[8249]: Listen and drop on 1 v6wildcard :: UDP
123
Jul 17 22:01:06 gps ntpd[8249]: Listen normally on 2 lo 127.0.0.1 UDP
123
Jul 17 22:01:06 gps ntpd[8249]: Listen normally on 3 eth0 192.168.3.5
UDP 123
Jul 17 22:01:06 gps ntpd[8249]: Listen normally on 4 eth1 192.168.3.6
UDP 123
Jul 17 22:01:07 gps ntpd[8249]: Listen normally on 5 lo ::1 UDP 123
Jul 17 22:01:07 gps ntpd[8249]: Listen normally on 6 eth0
fe80::240:63ff:fed8:8908 UDP 123
Jul 17 22:01:07 gps ntpd[8249]: GPS_NMEA(0) serial /dev/gps0 open at
19200 bps

I'm assuming that the entries at 21:59:43 are when I created the link
for /dev/gps0,because when I restarted ntp again, it gave me

Jul 17 22:03:38 gps ntpd[8249]: ntpd exiting on signal 15
Jul 17 22:03:40 gps ntpd[8307]: ntpd 4.2.6p1 at 1.2158-o Wed May 26
18:51:49 UTC 2010 (1)
Jul 17 22:03:40 gps ntpd[8308]: proto: precision = 2.514 usec
Jul 17 22:03:40 gps ntpd[8308]: Listen and drop on 0 v4wildcard
0.0.0.0 UDP 123
Jul 17 22:03:40 gps ntpd[8308]: Listen and drop on 1 v6wildcard :: UDP
123
Jul 17 22:03:40 gps ntpd[8308]: Listen normally on 2 lo 127.0.0.1 UDP
123
Jul 17 22:03:40 gps ntpd[8308]: Listen normally on 3 eth0 192.168.3.5
UDP 123
Jul 17 22:03:40 gps ntpd[8308]: Listen normally on 4 eth1 192.168.3.6
UDP 123
Jul 17 22:03:40 gps ntpd[8308]: Listen normally on 5 lo ::1 UDP 123
Jul 17 22:03:40 gps ntpd[8308]: Listen normally on 6 eth0
fe80::240:63ff:fed8:8908 UDP 123
Jul 17 22:03:40 gps ntpd[8308]: GPS_NMEA(0) serial /dev/gps0 open at
19200 bps

This is the relevant section of ntp.conf

# LinuxPPS: GPS + PPS
server 127.127.20.0 minpoll 4 mode 32 prefer
fudge 127.127.20.0 flag1 1 flag2 0 flag3 1 flag4 1 time2 0.545

It is running at 19200 bps, the same as it was in gpsd.




More information about the questions mailing list