gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] Unexpected behavior


From: Nick Burkitt
Subject: Re: [gpsd-users] Unexpected behavior
Date: Thu, 21 Sep 2017 19:09:36 -0700

Hi Gary.

 

> > For some reason, I'm not getting email from the

> > list, hence the delay. :-/ But.

>

> Ouch.

I'm getting the digests now. Not sure what happened.

 

> > I'll take your word that the 10-second delays are not

> > significant.

>

> Uh, what 10 second delays?

 

The 10-second delays that follow the occurances of this warning:

gpsd:WARN: PPS TIOCMIWAIT returns unchanged state, ppsmonitor sleeps 10.

 

Like this:

 

address@hidden gpsd -D 2 -N -n /dev/ttyS0

gpsd:INFO: launching (Version 3.9)

gpsd:INFO: listening on port gpsd

gpsd:ERROR: unable to connect to the DBUS system bus

gpsd:INFO: NTPD ntpd_link_activate: 1

gpsd:INFO: stashing device /dev/ttyS0 at slot 0

gpsd:INFO: opening GPS data source type 2 at '/dev/ttyS0'

gpsd:INFO: speed 115200, 8N1

gpsd:INFO: speed 9600, 8O1

gpsd:INFO: KPPS checking /sys/devices/virtual/pps/pps0/path, /dev/ttyS0

gpsd:INFO: KPPS caps 1133

gpsd:WARN: KPPS kernel PPS will be used

gpsd:INFO: KPPS cycle: -13577253, duration: -13577253 @ 1504801908.118491036

gpsd:INFO: PPS cycle: -13577121, duration: -13577121 @ 1504801908.118623

gpsd:INFO: KPPS cycle: -13477257, duration:   99996 @ 1504801908.218487449

gpsd:INFO: KPPS cycle:  999985, duration:  899989 @ 1504801909.118475719

gpsd:INFO: KPPS cycle:  999987, duration:   99997 @ 1504801909.218473536

gpsd:INFO: speed 115200, 8N1

gpsd:INFO: gpsd_activate(): activated GPS (fd 5)

gpsd:INFO: device /dev/ttyS0 activated

gpsd:INFO: running with effective group ID 20

gpsd:INFO: running with effective user ID 65534

gpsd:INFO: startup at 2017-09-07T16:31:49.000Z (1504801909)

gpsd:INFO: /dev/ttyS0 identified as type Generic NMEA (0.004399 sec @ 115200bps)

gpsd:WARN: unknown sentence: "$GNTXT,01,01,01,PASH inv format*28\x0d\x0a"

gpsd:WARN: unknown sentence: "$GNTXT,01,01,01,PGRM inv format*2A\x0d\x0a"

gpsd:WARN: unknown sentence: "$GNTXT,01,01,01,PSRF inv format*35\x0d\x0a"

gpsd:WARN: unknown sentence: "$GNTXT,01,01,01,PFEC inv format*32\x0d\x0a"

gpsd:WARN: unknown sentence: "$GNTXT,01,01,01,PTNL inv format*24\x0d\x0a"

gpsd:INFO: KPPS cycle:  999984, duration:  899986 @ 1504801910.118459378

gpsd:INFO: KPPS cycle:  999984, duration:   99997 @ 1504801910.218456853

gpsd:WARN: unknown sentence: "$GNTXT,01,01,01,PFEC inv format*32\x0d\x0a"

gpsd:WARN: unknown sentence: "$GNTXT,01,01,01,PASH inv format*28\x0d\x0a"

gpsd:WARN: unknown sentence: "$GNTXT,01,01,01,PMTK inv format*20\x0d\x0a"

gpsd:INFO: KPPS cycle:  999990, duration:  899993 @ 1504801911.118449218

gpsd:INFO: KPPS cycle:  999988, duration:   99994 @ 1504801911.218444104

gpsd:INFO: KPPS cycle:  999987, duration:  899992 @ 1504801912.118435452

gpsd:INFO: KPPS cycle:  999994, duration:  100002 @ 1504801912.218437502

gpsd:INFO: KPPS cycle:  999985, duration:  899983 @ 1504801913.118419919

gpsd:WARN: PPS TIOCMIWAIT returns unchanged state, ppsmonitor sleeps 10

===============

10-second delay

===============

gpsd:INFO: KPPS cycle: 10999840, duration:       0 @ 1504801923.218276895 <== 11 second KPPS cycle

gpsd:INFO: KPPS cycle: 10999844, duration:  899987 @ 1504801924.118263110

gpsd:INFO: KPPS cycle:  999993, duration:  100005 @ 1504801924.218269096

gpsd:INFO: KPPS cycle:  999991, duration:  899985 @ 1504801925.118253627

gpsd:INFO: KPPS cycle:  999982, duration:   99996 @ 1504801925.218250340

gpsd:INFO: KPPS cycle:  999985, duration:  899988 @ 1504801926.118238127

gpsd:INFO: KPPS cycle:  999985, duration:   99996 @ 1504801926.218234810

gpsd:INFO: KPPS cycle:  999980, duration:  899983 @ 1504801927.118217500

gpsd:INFO: KPPS cycle:  999983, duration:   99999 @ 1504801927.218217300

gpsd:WARN: PPS TIOCMIWAIT returns unchanged state, ppsmonitor sleeps 10

===============

10-second delay

===============

gpsd:INFO: KPPS cycle: 10999855, duration:       0 @ 1504801938.118072112 <== 11 second KPPS cycle

gpsd:INFO: KPPS cycle: 10999852, duration:   99996 @ 1504801938.218068912

gpsd:INFO: KPPS cycle:  999986, duration:  899989 @ 1504801939.118057146

gpsd:INFO: KPPS cycle:  999989, duration:  100000 @ 1504801939.218057402

gpsd:INFO: KPPS cycle:  999987, duration:  899986 @ 1504801940.118043148

gpsd:INFO: KPPS cycle:  999981, duration:   99994 @ 1504801940.218037971

gpsd:INFO: KPPS cycle:  999988, duration:  899993 @ 1504801941.118030528

gpsd:INFO: KPPS cycle:  999994, duration:  100000 @ 1504801941.218031252

gpsd:INFO: KPPS cycle:  999986, duration:  899985 @ 1504801942.118016036

gpsd:WARN: PPS TIOCMIWAIT returns unchanged state, ppsmonitor sleeps 10

===============

10-second delay

===============

etc.

 

> Who said anything about user-space?  gpsd makes a system call to grab the PPS off the serial port the GPS is on.

TIOCMIWAIT is an tty ioctl call to wait for a modem status register change, no? That suggests that user code is looking for DCD transitions.

> Yup,  Nothing in there about gpsd, so your ntpd is NOT using your gpsd output.  What does your ntp.conf look like?

 

Here's what I've got:

/etc/ntp.conf:

includefile /etc/ntp-conf.d/ntp.conf

 

/etc/ntp-conf.d/ntp.conf

includefile use-gpsd-shm

includefile use-country-pool

includefile use-no-remote-configuration

includefile use-minimal-logging

 

/etc/ntp-conf.d/use-gpsd-shm:

refclock shm unit 0 refid GPS

refclock shm unit 1 prefer refid PPS

 

> Either your ntpd does not have the right driver built in, our your ntp.conf is not configureing it.

Well spotted! Reconfiguring my NTPsec build with --refclock=shm helped a lot. Here's what ntpmon thinks now:

 

     remote           refid      st t when poll reach   delay   offset   jitter

SHM(0)          .GPS.            0 l   51   64   17      0ns -83.57ms 1.6557ms

SHM(1)          .PPS.            0 l    -   64    0      0ns      0ns      0ns

*204.11.201.10   216.218.192.202  2 u    2   64  377 31.902ms 6.5744ms 1.1031ms

+52.6.160.3      209.51.161.238   2 u    1   64  377 78.611ms 11.640ms 771.59µs

-67.217.112.181  209.51.161.238   2 u   64   64  377 85.495ms 4.8833ms 2.8226ms

+216.229.0.49    128.138.141.172  2 u   62   64  377 62.993ms 2.4733ms 1.0888ms

ntpd ntpsec-0.9.7+1381 2017-09-19T09:55:20-0400Updated: 2017-09-21T23:41:19 (32)

lstint avgint rstr r m v  count rport remote address

      0      8    0 . 6 2    271 34886 ::1

      2     62   d0 . 4 4     34   123 52.6.160.3

      3     62   d0 . 4 4     34   123 204.11.201.10

     63     60   d0 . 4 4     34   123 216.229.0.49

     65     61   d0 . 4 4     33   123 67.217.112.181

 

At least it sees the GPS, so that's progress, but PPS is still playing hard-to-get.

 

I've satisfied myself that PPS interrupts (that is, 16550 UART modem status register interrupts) are occuring, at least when /dev/ttyS0 is open.

 

It's not clear at this point if the problem is related to gpsd, ntpd, or KPPS.

BTW, I’m using the stock Ubuntu (trusty) package for gpsd. Are there special build configurations I need to add there, too?

Thanks again for your help,

 

-Nick


reply via email to

[Prev in Thread] Current Thread [Next in Thread]