Yesterday I came across this interesting video of Eric S. Raymond giving a talk. About 40 minutes in He talks of a fascinating project to develop and have produced a USB GPS dongle with PPS (Pulse per second) support to provide a decent Timing reference for use with NTP.
Eric ‘ESR’ Raymond presenting to the Philadelphia Area Java Users’ Group from April 18, 2012
This then lead me to a couple of blog posts by ESR
This caused me to take another look at GPSD in the context of feeding NTP and also prompted me to try a USB – serial adapter with one of my PPS enabled GPS units.
The results were really good and it was simple to set-up on fedora 16. To get it working it’s just a matter of ensuring GPSD starts up and adding 4 lines to the ntp.conf
server 127.127.28.0 minpoll 4 maxpoll 4
fudge 127.127.28.0 time1 0.420 refid GPS
server 127.127.28.1 minpoll 4 maxpoll 4 prefer
fudge 127.127.28.1 refid PPS
This got me thinking about a cheap little GPS dongle that I had on my desk. according to dmesg it uses the prolific pl-2303hx USB to serial bridge controller and this chip does support the DSR line.
Time to take it apart..
All the fun stuff is under the antenna and the tin can.
To find the PPS output of the GPS module I needed to fit a temporary antenna connection since once the can is removed so is the on-board antenna.
With this done it’s time to locate the PPS output with a scope. It turned out to be on my module, the second pin from the left on the USB side of the GPS module.
The DSR pin was located from the PL-2303HX data-sheet, It turned out that this board had a little 4k7 resistor in place to pull this line high. This would have to be removed and as a bonus this left me with a nice place to connect the blue wire.
At this point I tested again and saw that GPSD was feeding good looking PPS data to ntpd.
Time to put it back together
The end result is that the GPS stick still provides navigation data and now has a high quality PPS output as well.