[ntp:questions] Using Trimble TSIP under Linux
agcarver+ntp at acarver.net
Mon Oct 29 19:48:48 UTC 2012
On 10/29/2012 08:50, David Taylor wrote:
> On 29/10/2012 15:09, John Hasler wrote:
>> David Taylor writes:
>>> if I try and compile with the flags for automatic start-up the make
>>> fails due a missing file: sys/capability.h. Happens with both 4.2.6p5
>>> and 4.2.7p314.
>> Install the linux-headers package appropriate to your kernel.
> Thanks, John. Fixed with:
> $ sudo apt-get install libcap-dev
> I do find it confusing that some headers are there, but not others.
> Perhaps part of making the Raspberry Pi a minimal system? At least NTP
> is now coming up after a reboot, and with PPS!
> I took your advice about altering the init.d script, but it's obviously
> a little more complicated than that as when you try and stop NTP it
> can't find the process. For the moment I'm not worrying about that. It
> still leaves the issue of why it doesn't connect to gpsd or, if it is
> connecting, why it sees no valid timestamps. While I run cgps NTP sees
> data from gpsd, but not otherwise.
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.
More information about the questions