I have now managed, with the patient help from Bill U., to get my Linux NTP system running using the PPS signal from a Garmin 18x LVC. I thought I would share what I had to do to make it all work.
***** References: http://time.qnan.org/ http://time.qnan.org/shmpps.tar http://www.david-taylor.myby.co.uk/ntp/FreeBSD-GPS-PPS.htm http://fixunix.com/ntp/67883-freebsd-garmin-gps-18-lvc.html ***** What's it running on - Dell Optiplex 740 running Fedora Core 8 - ntpd 4.2.4p2 - Garmin 18x LVC, powered off USB port, communicating on /dev/ttyS0 ***** - I built the circuit as shown on the time.qnan.org site. - I tried to use gpsd but that didn't work. I got NMEA to work but not PPS. - I tried shmpps but it didn't work either, so I started digging deeper. - Bill U. sent me a change to add to the shm_spl2.c file which would tell me if the driver was "seeing" data from my GPS. Nope. - I checked my circuit board over and over, no problems seen there. - I finally checked the cable that I had between the circuit board and the NTP server - crap, there was no connection between PIN 1! Turns out only seven of the nine pins had connections through my cable. Weird.... - I made my own cable with crimp on terminators and some ribbon cable. - Check it out, PPS data! ***** NOTABLES: - Don't blindly trust your cable! Just because it works for some things doesn't mean it will work for you here. As Bill noted, lots of serial cables are made with only pins 2 and 3 in mind to be concerned about.... - Watch your syslog file! It will tell you interesting things like "ntpd can't find /dev/gps0" - so you get to add a symbolic link between /dev/ttyXX to /dev/gps0. - If you have NMEA output from the GPS in your ntp.conf file (127.127.20.0), expect it to have "reach 0" reported when you finally get PPS (127.127.28.0) working. You can have NMEA or PPS from your serial input, you just can't have both at the same time from the same GPS on the same port. - With that said, be sure to have a remotely well clocked device to do an initial synch to before starting the shmpps driver. (See start.sh and shmpps scripts in ths shmpps tar file.) - See my circuit board here: http://www.toosan.com/shared/gps ***** CONTENTS of ntp.conf driftfile /var/lib/ntp/drift statistics clockstats loopstats peerstats statsdir /var/log/ntp/ filegen peerstats file peers type day link enable filegen loopstats file loops type day link enable server 127.127.20.0 server ntp.wendysi.com iburst server 127.127.28.0 minpoll 4 prefer fudge 127.127.28.0 refid PPS flag3 1 ***** OUTPUT FROM ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== GPS_NMEA(0) .GPS. 0 l - 64 0 0.000 0.000 0.001 10.255.213.232 10.255.231.148 2 u 63 64 377 0.173 2.336 0.398 *SHM(0) .PPS. 0 l 6 16 377 0.000 0.005 0.002 ***** DEBUG output from shm_spl2 (shmpps) range:4-11 sys:1233259966/999984 ref:1233259967/0 prec: -17 range:0-7 sys:1233259980/999983 ref:1233259981/0 prec: -17 range:2-9 sys:1233259994/999984 ref:1233259995/0 prec: -16 range:3-10 sys:1233260008/999983 ref:1233260009/0 prec: -16 _______________________________________________ questions mailing list questions@lists.ntp.org https://lists.ntp.org/mailman/listinfo/questions