gpsd-users
[Top][All Lists]
Advanced

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

Adafruit USB and PPS


From: Neal Dillman
Subject: Adafruit USB and PPS
Date: Mon, 25 Nov 2019 21:14:08 +0000

Hello gpsd-ers,

 

I have what appears to be an unusual configuration that trying to make work:

 

 

There is no problem making the GPS work, but PPS is not working.  I understand that PPS over USB has limitations, but it will be much more accurate than without the PPS.  Bearing that in mind, I’ve tried several things, but no success.

 

The kernel seems to register line discipline correctly:

[    5.160413] pps_core: LinuxPPS API ver. 1 registered

[    5.160423] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <address@hidden>

[    5.193429] pps_ldisc: PPS line discipline registered

[    5.194848] pps pps0: new PPS source usbserial4

[    5.194979] pps pps0: source "/dev/ttyUSB4" added

 

Stock gpsd (v3.16) has issues trying PPS:

root@ATIS-Box:/home/pi/gpsd-3.19# gpsd -D 5 -N -n /dev/ttyUSB4 /dev/pps0

gpsd:INFO: launching (Version 3.16)

gpsd:IO: opening IPv4 socket

gpsd:IO: opening IPv6 socket

gpsd:INFO: listening on port gpsd

gpsd:PROG: NTP: shmat(0,0,0) succeeded, segment 0

gpsd:PROG: NTP: shmat(32769,0,0) succeeded, segment 1

gpsd:PROG: NTP: shmat(65538,0,0) succeeded, segment 2

gpsd:PROG: NTP: shmat(98307,0,0) succeeded, segment 3

gpsd:PROG: NTP: shmat(131076,0,0) succeeded, segment 4

gpsd:PROG: NTP: shmat(163845,0,0) succeeded, segment 5

gpsd:PROG: NTP: shmat(196614,0,0) succeeded, segment 6

gpsd:PROG: NTP: shmat(229383,0,0) succeeded, segment 7

gpsd:PROG: successfully connected to the DBUS system bus

gpsd:PROG: shmget(0x47505344, 8928, 0666) for SHM export succeeded

gpsd:PROG: shmat() for SHM export succeeded, segment 262152

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

gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook

gpsd:INFO: opening GPS data source type 3 at '/dev/ttyUSB4'

gpsd:INFO: speed 115200, 8N1

gpsd:INFO: gpsd_activate(2): activated GPS (fd 6)

gpsd:PROG: PPS:/dev/ttyUSB4 chrony socket /var/run/chrony.ttyUSB4.sock doesn't exist

gpsd:PROG: KPPS:/dev/ttyUSB4 checking /sys/devices/virtual/pps/pps0/path, /dev/ttyUSB4

gpsd:INFO: KPPS:/dev/ttyUSB4 RFC2783 path:/dev/pps0, fd is 7

gpsd:INFO: KPPS:/dev/ttyUSB4 pps_caps 0x1133

gpsd:INFO: KPPS:/dev/ttyUSB4 have PPS_CANWAIT

gpsd:INFO: KPPS:/dev/ttyUSB4 kernel PPS will be used

gpsd:PROG: PPS:/dev/ttyUSB4 thread launched

gpsd:INFO: PPS:/dev/ttyUSB4 ntpshm_link_activate: 1

gpsd:INFO: device /dev/ttyUSB4 activated

gpsd:INFO: stashing device /dev/pps0 at slot 1

gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook

gpsd:PROG: switch_driver(PPS) called...

gpsd:PROG: selecting PPS driver...

gpsd:PROG: PPS:/dev/pps0 chrony socket /var/run/chrony.pps0.sock doesn't exist

gpsd:INFO: KPPS:/dev/pps0 RFC2783 path:/dev/pps0, fd is 8

gpsd:INFO: KPPS:/dev/pps0 pps_caps 0x1133

gpsd:INFO: KPPS:/dev/pps0 have PPS_CANWAIT

gpsd:INFO: KPPS:/dev/pps0 kernel PPS will be used

gpsd:PROG: PPS:/dev/pps0 thread launched

gpsd:INFO: PPS:/dev/pps0 ntpshm_link_activate: 0

gpsd:INFO: device /dev/pps0 activated

gpsd:INFO: KPPS:/dev/pps0 gps_fd:-2 not a tty

gpsd:INFO: KPPS:/dev/pps0 gps_fd:-2 not a tty

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Interrupted system call

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Interrupted system call

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Interrupted system call

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Interrupted system call

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Interrupted system call

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Interrupted system call

gpsd:INFO: running with effective group ID 20

gpsd:INFO: running with effective user ID 113

gpsd:INFO: startup at 2019-11-25T21:12:10.000Z (1574716330)

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Connection timed out

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Connection timed out

gpsd:INFO: speed 4800, 8N1

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Connection timed out

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Connection timed out

gpsd:INFO: speed 9600, 8N1

gpsd:PROG: switching to match packet type 1: $GPGGA,211214.000,3838.9275,N,12129.2888,W,1,11,0.82,-2.0,M,-22.8,M,,*71\x0d\x0a

gpsd:PROG: switch_driver(NMEA0183) called...

gpsd:PROG: selecting NMEA0183 driver...

gpsd:INFO: /dev/ttyUSB4 identified as type NMEA0183, 9 sec @ 9600bps

gpsd:PROG: => Probing for Garmin NMEA

gpsd:IO: => GPS: $PGRMCE*0E\x0d\x0a

gpsd:IO: <= GPS: $GPGGA,211214.000,3838.9275,N,12129.2888,W,1,11,0.82,-2.0,M,-22.8,M,,*71

gpsd:WARN: can't use GGA time until after ZDA or RMC has supplied a year.

gpsd:PROG: GPGGA sentence timestamped 211214.00.

gpsd:PROG: GPGGA starts a reporting cycle.

gpsd:PROG: => Probing for SiRF

gpsd:IO: => GPS: $PSRF100,0,9600,8,1,0*0C\x0d\x0a

gpsd:IO: <= GPS: $GPGSA,A,3,25,03,11,26,23,01,14,31,22,32,16,,1.13,0.82,0.78*05

gpsd:PROG: GPGSA sets mode 3

gpsd:PROG: => Probing for FV-18

gpsd:IO: => GPS: $PFEC,GPint*58\x0d\x0a

gpsd:IO: <= GPS: $GPGSV,4,1,13,22,75,315,26,31,56,060,28,03,51,315,19,01,48,233,16*72

gpsd:PROG: Partial satellite data (1 of 4).

gpsd:PROG: => Probing for Trimble Copernicus

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Connection timed out

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Connection timed out

….

 

I recompiled gpsd (v3.19), and the results are similar:

root@ATIS-Box:/home/pi/gpsd-3.19# ./gpsd -D 5 -N -n /dev/ttyUSB4 /dev/pps0

gpsd:INFO: launching (Version 3.19)

gpsd:IO: opening IPv4 socket

gpsd:IO: opening IPv6 socket

gpsd:INFO: listening on port gpsd

gpsd:PROG: NTP: shmat(0,0,0) succeeded, segment 0

gpsd:PROG: NTP: shmat(32769,0,0) succeeded, segment 1

gpsd:PROG: NTP: shmat(65538,0,0) succeeded, segment 2

gpsd:PROG: NTP: shmat(98307,0,0) succeeded, segment 3

gpsd:PROG: NTP: shmat(131076,0,0) succeeded, segment 4

gpsd:PROG: NTP: shmat(163845,0,0) succeeded, segment 5

gpsd:PROG: NTP: shmat(196614,0,0) succeeded, segment 6

gpsd:PROG: NTP: shmat(229383,0,0) succeeded, segment 7

gpsd:ERROR: shmget(0x47505344, 20808, 0666) for SHM export failed: Invalid argument

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

gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook

gpsd:INFO: SER: opening GPS data source type 3 at '/dev/ttyUSB4'

gpsd:INFO: SER: speed 115200, 8N1

gpsd:PROG: Probing "Garmin USB binary" driver...

gpsd:PROG: Probe not found "Garmin USB binary" driver...

gpsd:PROG: Probing "GeoStar" driver...

gpsd:PROG: Sent GeoStar packet id 0xc1

gpsd:IO: SER: => GPS: 5053474700c100010000000050924746

gpsd:PROG: Probe not found "GeoStar" driver...

gpsd:PROG: Probing "Trimble TSIP" driver...

gpsd:INFO: SER: speed 9600, 8O1

gpsd:INFO: SER: speed 115200, 8N1

gpsd:PROG: Probe not found "Trimble TSIP" driver...

gpsd:PROG: Probing "iSync" driver...

gpsd:INFO: SER: speed 9600, 8N1

gpsd:IO: SER: => GPS: @@@@\x0d\x0aMAW0C0B\x0d\x0a

gpsd:INFO: SER: speed 115200, 8N1

gpsd:PROG: Probe not found "iSync" driver...

gpsd:PROG: no probe matched...

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

gpsd:PROG: PPS:/dev/ttyUSB4 chrony socket /var/run/chrony.ttyUSB4.sock doesn't exist

gpsd:PROG: KPPS:/dev/ttyUSB4 checking /sys/devices/virtual/pps/pps0/path, /dev/ttyUSB4

gpsd:INFO: KPPS:/dev/ttyUSB4 RFC2783 path:/dev/pps0, fd is 6

gpsd:INFO: KPPS:/dev/ttyUSB4 pps_caps 0x1133

gpsd:INFO: KPPS:/dev/ttyUSB4 have PPS_CANWAIT

gpsd:INFO: KPPS:/dev/ttyUSB4 kernel PPS will be used

gpsd:PROG: PPS:/dev/ttyUSB4 thread launched

gpsd:INFO: PPS:/dev/ttyUSB4 ntpshm_link_activate: 1

gpsd:INFO: device /dev/ttyUSB4 activated

gpsd:INFO: stashing device /dev/pps0 at slot 1

gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook

gpsd:PROG: switch_driver(PPS) called...

gpsd:PROG: selecting PPS driver...

gpsd:PROG: PPS:/dev/pps0 chrony socket /var/run/chrony.pps0.sock doesn't exist

gpsd:INFO: KPPS:/dev/pps0 RFC2783 path:/dev/pps0, fd is 7

gpsd:INFO: KPPS:/dev/pps0 pps_caps 0x1133

gpsd:INFO: KPPS:/dev/pps0 have PPS_CANWAIT

gpsd:INFO: KPPS:/dev/pps0 kernel PPS will be used

gpsd:PROG: PPS:/dev/pps0 thread launched

gpsd:PROG: KPPS:/dev/pps0 gps_fd:-2 not a tty, can not use TIOMCIWAIT

gpsd:INFO: PPS:/dev/pps0 ntpshm_link_activate: 0

gpsd:INFO: device /dev/pps0 activated

gpsd:INFO: KPPS:/dev/ttyUSB4 kernel PPS timeout unknown error

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout unknown error

gpsd:INFO: KPPS:/dev/ttyUSB4 kernel PPS timeout unknown error

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout unknown error

gpsd:INFO: KPPS:/dev/ttyUSB4 kernel PPS timeout unknown error

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout unknown error

gpsd:INFO: running with effective group ID 20

gpsd:INFO: running with effective user ID 65534

gpsd:INFO: startup at 2019-11-25T21:08:14.000Z (1574716094)

gpsd:INFO: KPPS:/dev/ttyUSB4 kernel PPS timeout unknown error

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout unknown error

gpsd:INFO: KPPS:/dev/ttyUSB4 kernel PPS timeout unknown error

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout unknown error

 

It seems like this should work, but I cannot seem to get the OS to see PPS [on the Ring Indicator].  I have looked up every tutorial, suggestion, and document on the topic I could find on the web, but no luck.  The end goal is to have the GPS and PPS running through NTPD.  Thanks in advance for any help, pointers, etc.

 

Regards,

Neal


reply via email to

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