[ntp:questions] Using Trimble TSIP under Linux

David Taylor david-taylor at blueyonder.co.uk.invalid
Tue Oct 30 08:07:14 UTC 2012

On 29/10/2012 19:48, A C wrote:
> Your auto-start of gpsd isn't working because you probably lost the -n
> option in the init.d script.  The -n option forces gpsd to open the
> serial connection to the receiver and begin processing data.  If you do
> not have -n then gpsd will not open the serial port until something
> connects (in your case cgps).
> The misunderstanding is that ntpd is somehow  "connecting" to gpsd.  It
> is not, it is using shared memory (SHM) between its process and gpsd's
> process to collect data.  This isn't a connection, it's the kernel
> memory management system allowing two programs to access a common spot
> in RAM.  It's that shared memory segment that gpsd writes into and ntpd
> reads from.  Beyond data showing up one doesn't know the other exists.
> So, since this isn't a "connection" as far as gpsd is concerned, it
> won't activate the serial port until a real (i.e. TCP/IP) connection is
> made hence the need for the -n option.

Thanks for that, A C.  I found a file /etc/defaults/gpsd where I could 
add the -n option for its startup, and that has now allowed NTP to see 
the GPS timestamps.

Yes, I understand how the shared memory works (we have them in Windows 
and even in VMS IIRC), but I didn't appreciate that gpsd wouldn't 
connect to a GPS until it had a client running, when the -n option 
wasn't present.  There's a lot to learn!

I've updated my Web page with this information (and somehow managed to 
page the page excessively wide, can't quite see why at the moment!).
Web: http://www.satsignal.eu

More information about the questions mailing list