[ntp:questions] What is the NTP recovery time from 16s step in GPS server?

David Taylor david-taylor at blueyonder.co.uk.invalid
Wed Oct 31 15:52:18 UTC 2012


On 30/10/2012 20:51, Rob wrote:
[]
> The log level is set by a startup option of gpsd.
>
> You now probably run "gpsd -n /dev/ttyS0" from some startup script.
> (e.g. /etc/init.d/gpsd)
>
> First stop the running server using: /etc/init.d/gpsd stop
>
> Then run gpsd from a shell using: gpsd -N -D 2 -n /dev/ttyS0
>
> -N will tell it not to go into the background, -D sets the loglevel.
> Level 2 should show the LOG_INF message we are looking for, but you
> can set a higher level to zoom in to the problem.
>
> ^C out of it when you have seen enough.  then you can start the
> background server again using /etc/init.d/gpsd start

Rob,

I'm now more confused than ever!  I tried your command to run gpsd after 
the receiver had got satellite information, and I could see one line 
with 16.000 which looked like the offset.  I also saw a couple of error 
lines:

gpsd:INFO: startup at 2012-10-31T12:12:34.000Z (1351685554)
gpsd:INFO: KPPS checking /sys/devices/virtual/pps/pps0/path,
gpsd:INFO: KPPS checking /sys/devices/virtual/pps/pps1/path, /dev/ttyACM0
gpsd:INFO: KPPS cannot open /dev/pps1: Permission denied
gpsd:ERROR: PPS ioctl(TIOCMIWAIT) failed: 22 Invalid argument
gpsd:INFO: /dev/ttyACM0 identified as type Trimble TSIP (0.517231 sec @ 
9600bps)
gpsd:INFO: IO Options 1e 02 00 08
gpsd:WARN: Received packet of type 28 cannot be parsed

However now the gpsd can't connect to the serial (USB) device whatever I 
try.  I do see the device /dev/ttyACM0 listed in /dev, but I don't get a 
/dev/gps0.  If I try and stop gpsd, I can connect to /dev/ttyACM0 with 
minicom, but I don't see the data flow I see in Windows with puTTY. 
This is what I see:

gpsd:INFO: opening GPS data source type 2 at '/dev/ttyACM0'
gpsd:ERROR: device open failed: Input/output error - retrying read-only
gpsd:ERROR: read-only device open failed: Input/output error
gpsd:ERROR: initial GPS device /dev/ttyACM0 open failed

I tried plugging a USB keyboard into the same USB port, and that seems 
to work correctly, so I'm thinking it's a software rather than a 
hardware issue.  I've checked the GPS receiver over USB on another PC 
and it functions exactly as expected.  Any hints as to what I might have 
broken running:

   $ gpsd -N -D 2 -n /dev/ttyACM0
or:
   $ sudo gpsd -N -D 2 -n /dev/ttyACM0

I'll attach extracts the logs with apologies for the length....

_____________________________________________________
Test in working conditions:

pi at raspberrypi ~ $ sudo /etc/init.d/gpsd stop
pi at raspberrypi ~ $ gpsd -N -D 2 -n /dev/ttyACM0
gpsd:INFO: launching (Version 3.6)
gpsd:ERROR: can't create IPv6 socket
gpsd:INFO: listening on port gpsd
gpsd:INFO: NTPD ntpd_link_activate: 1
gpsd:INFO: stashing device /dev/ttyACM0 at slot 0
gpsd:INFO: opening GPS data source type 2 at '/dev/ttyACM0'
gpsd:INFO: speed 9600, 8N1
gpsd:INFO: speed 9600, 8O1
gpsd:INFO: speed 9600, 8N1
gpsd:INFO: gpsd_activate(): activated GPS (fd 5)
gpsd:INFO: device /dev/ttyACM0 activated
gpsd:INFO: running with effective group ID 1000
gpsd:INFO: running with effective user ID 1000
gpsd:INFO: startup at 2012-10-31T12:12:34.000Z (1351685554)
gpsd:INFO: KPPS checking /sys/devices/virtual/pps/pps0/path,
gpsd:INFO: KPPS checking /sys/devices/virtual/pps/pps1/path, /dev/ttyACM0
gpsd:INFO: KPPS cannot open /dev/pps1: Permission denied
gpsd:ERROR: PPS ioctl(TIOCMIWAIT) failed: 22 Invalid argument
gpsd:INFO: /dev/ttyACM0 identified as type Trimble TSIP (0.517231 sec @ 
9600bps)
gpsd:INFO: IO Options 1e 02 00 08
gpsd:WARN: Received packet of type 28 cannot be parsed
gpsd:INFO: Satellite Tracking Status: Ch  0 PRN   3 Res 0 Acq 1 Eph  1 
SNR 42.0 LMT 303171.0000 El 82.0 Az 199.0
gpsd:INFO: Satellite Tracking Status: Ch  1 PRN   6 Res 0 Acq 1 Eph  1 
SNR 37.0 LMT 303171.0000 El 70.0 Az 127.0
gpsd:INFO: Satellite Tracking Status: Ch  2 PRN  19 Res 0 Acq 1 Eph  1 
SNR 40.0 LMT 303171.0000 El 61.0 Az 279.0
gpsd:INFO: Satellite Tracking Status: Ch  3 PRN  22 Res 0 Acq 1 Eph  1 
SNR 31.0 LMT 303171.0000 El 43.0 Az 132.0
gpsd:INFO: Satellite Tracking Status: Ch  4 PRN  18 Res 0 Acq 1 Eph  1 
SNR 32.0 LMT 303171.0000 El 41.0 Az  75.0
gpsd:INFO: Satellite Tracking Status: Ch  5 PRN  16 Res 0 Acq 1 Eph  1 
SNR 38.0 LMT 303171.0000 El 40.0 Az 181.0
gpsd:INFO: Satellite Tracking Status: Ch  6 PRN   7 Res 0 Acq 1 Eph  1 
SNR 36.0 LMT 303171.0000 El 21.0 Az 284.0
gpsd:INFO: Satellite Tracking Status: Ch  7 PRN   8 Res 0 Acq 1 Eph  1 
SNR 32.0 LMT 303171.0000 El 20.0 Az 323.0
gpsd:INFO: Satellite Tracking Status: Ch  8 PRN  21 Res 0 Acq 1 Eph  1 
SNR 20.0 LMT 303171.0000 El 20.0 Az  65.0
gpsd:INFO: Satellite Tracking Status: Ch  9 PRN  30 Res 0 Acq 1 Eph  1 
SNR 20.0 LMT 303171.0000 El 10.0 Az 170.0
gpsd:INFO: Satellite Tracking Status: Ch 10 PRN  11 Res 0 Acq 0 Eph  0 
SNR  0.0 LMT 303171.0000 El 16.0 Az 249.0
gpsd:INFO: Satellite Tracking Status: Ch 11 PRN  15 Res 0 Acq 0 Eph  0 
SNR  0.0 LMT 303171.0000 El 11.0 Az  34.0
gpsd:INFO: Satellite Tracking Status: Ch 12 PRN  26 Res 0 Acq 0 Eph  0 
SNR  0.0 LMT 303171.0000 El  7.0 Az 359.0
gpsd:INFO: Satellite Tracking Status: Ch 13 PRN   1 Res 0 Acq 0 Eph  0 
SNR  0.0 LMT 303171.0000 El  2.0 Az 238.0
gpsd:INFO: Machine ID 00 02 02
gpsd:INFO: Software version: 0.3 090427 2.7 080813
gpsd:INFO: GPS Time 303171.000000 1712 16.000000
gpsd:WARN: Received packet of type 2c cannot be parsed
gpsd:WARN: Received packet of type 22 cannot be parsed
gpsd:WARN: Received packet of type 28 cannot be parsed
gpsd:INFO: Fix info 01 05 1712 303171.000000
gpsd:INFO: Current Datum 0 0.000000 0.000000 0.000000 6378137.000000 
0.006694
gpsd:INFO: Satellite Tracking Status: Ch  0 PRN   3 Res 0 Acq 1 Eph  1 
SNR 41.0 LMT 303176.0000 El 82.0 Az 199.0
gpsd:INFO: Satellite Tracking Status: Ch  1 PRN   6 Res 0 Acq 1 Eph  1 
SNR 35.0 LMT 303176.0000 El 70.0 Az 127.0

_____________________________________________________
After a reboot where gpsd can't get to ACM0:

pi at raspberrypi ~ $ gpsd -N -D 2 -n /dev/ttyACM0
gpsd:INFO: launching (Version 3.6)
gpsd:ERROR: can't create IPv6 socket
gpsd:INFO: listening on port gpsd
gpsd:INFO: NTPD ntpd_link_activate: 1
gpsd:INFO: stashing device /dev/ttyACM0 at slot 0
gpsd:INFO: opening GPS data source type 2 at '/dev/ttyACM0'
gpsd:ERROR: device open failed: Input/output error - retrying read-only
gpsd:ERROR: read-only device open failed: Input/output error
gpsd:ERROR: initial GPS device /dev/ttyACM0 open failed
gpsd:INFO: running with effective group ID 1000
gpsd:INFO: running with effective user ID 1000
gpsd:INFO: startup at 2012-10-31T13:40:22.000Z (1351690822)
^Cgpsd:WARN: received terminating signal 2.
gpsd:WARN: exiting.
pi at raspberrypi ~ $

I do home someone can help...
-- 
Thanks,
David
Web: http://www.satsignal.eu



More information about the questions mailing list