[Thumbgps-devel] USB handshake signals and Linux

Eric S. Raymond esr at thyrsus.com
Thu Mar 15 13:57:17 EDT 2012


Ron Frazier (NTP) <timekeepingntplist at c3energy.com>:
> I have a question about GPSD.  I have nothing against it, but why is
> it necessary to use it at all?  I have NTPD running on both Windows
> and Linux, and reading my GPS.  GSPD isn't available on Windows as
> far as I know.  What does using GPSD get me that running without it
> does not?

For timing purposes the GPS emits two things we're interested in: time
report sentences and 1PPS state changes on the DCD or RI line (since
it's a USB interface that would actually be USB events emulating those
changes).

Something has to interpret those. GPSD can already do that and is well
tested.  If we drop GPSD, then we have to write our own dedicated
service daemon or in-kernel support.  That would be seriously
complicated and involve a lot of headachy debugging.

Also, we'd then probably be stuck with supporting only a single device type.
By the time you've upgraded a non-GPSD service daeomon so it can handle either
NMEA or (say) SiRF binary, you'll have rewritten most of GPSD.

The way the time-delivery pipeline works under Linux is that GPSD uses the
GPS take to write on a shared-memory segment that NTPD reads.  The GPSD
code that handles 1PPS interpretation and the handoff to shared memory
is complicated and nasty, without question the most obscure part of the
GPSD codebase.  Trust me when I tell you that you do *not* want to try 
to duplicate this - debugging it is a stone bitch.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>



More information about the Thumbgps-devel mailing list