gpsd-dev
[Top][All Lists]
Advanced

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

[gpsd-dev] PPS not showing in gpsmon/gpsd on RPi 3


From: Eric S. Raymond
Subject: [gpsd-dev] PPS not showing in gpsmon/gpsd on RPi 3
Date: Sat, 23 Apr 2016 06:28:14 -0400 (EDT)

(Resend, I typed some addresses.)

I'm still working on the SemPiTernal HOWTO for building a tiny
NTPsec timeserver out of a Raspberry Pi. It's turning into quite an epic.

I now have a relatively simple, easily replicable recipe for getting
to the point where you can see 1PPS using ppstest from the pps-tools
suite and see GPS data using cat or gpsmon.

But I am troubled by the fact that on the Raspberry Pi 3, neither gpsmon
nor gpsd can see 1PPS. (I can see them on a stock x86 Ubuntu, I'm
running gpsmon with the rep head version now to check.)  For these reasons:

(1) I want to be able to say in the HOWTO "Now run gpsmon /dev/ttyAMA0
in order to see combined serial and 1PPS data".  Even though the final
recipe will probly not use gpsd, I think this would be an important
confidence builder - the exact point at which the person following the
instructions *knows* that the hardware is fully qualified and
all the data NTPsec will be working with is visible in userland.

(2) I'm concerned that the failure may reflect bugs in GPSD that I
don't fully understand.  Particularly worrying is the possibility
of some subtle OS- or platform-dependent problem in our PPS handling
that's going to bite GPSD (or even possibly NTPsec) in the ass, later on. 

So I think I need to fix this.

I think Gary reported that 1PPS is visible to gpsd on a Pi 2.  Gary, 
can you confirm this?

Here's what shows up in the log on a Pi 3.

gpsd:PROG: PPS:/dev/ttyAMA0 chrony socket /tmp/chrony.ttyAMA0.sock doesn't exist
gpsd:PROG: KPPS:/dev/ttyAMA0 checking /sys/devices/virtual/pps/pps0/path, 
gpsd:PROG: KPPS:/dev/ttyAMA0 checking /sys/devices/virtual/pps/pps1/path, 
/dev/ttyAMA0
gpsd:INFO: KPPS:/dev/ttyAMA0 cannot open /dev/pps1: Permission denied
gpsd:WARN: KPPS:/dev/ttyAMA0 kernel PPS unavailable, PPS accuracy will suffer
gpsd:PROG: PPS:/dev/ttyAMA0 thread launched
gpsd:INFO: PPS:/dev/ttyAMA0 ntpshm_link_activate: 1
gpsd:PROG: switch_driver(PPS) called...
gpsd:PROG: selecting PPS driver...
gpsd:PROG: PPS:/dev/pps0 chrony socket /tmp/chrony.pps0.sock doesn't exist
gpsd:INFO: KPPS:/dev/pps0 cannot open /dev/pps0: Permission denied
gpsd:WARN: KPPS:/dev/pps0 kernel PPS unavailable, PPS accuracy will suffer
gpsd:PROG: PPS:/dev/pps0 thread launched
gpsd:INFO: PPS:/dev/pps0 ntpshm_link_activate: 0
gpsd:INFO: KPPS:/dev/pps0 gps_fd:-2 not a tty
gpsd:WARN: PPS:/dev/pps0 die: no TIOMCIWAIT, nor RFC2783 CANWAIT
gpsd:PROG: PPS:/dev/pps0 gpsd_ppsmonitor exited.
gpsd:PROG: PPS:/dev/ttyAMA0 chrony socket /tmp/chrony.ttyAMA0.sock doesn't exist
gpsd:PROG: KPPS:/dev/ttyAMA0 checking /sys/devices/virtual/pps/pps0/path, 
gpsd:PROG: KPPS:/dev/ttyAMA0 checking /sys/devices/virtual/pps/pps1/path, 
/dev/ttyA
gpsd:INFO: KPPS:/dev/ttyAMA0 cannot open /dev/pps1: Permission denied
gpsd:WARN: KPPS:/dev/ttyAMA0 kernel PPS unavailable, PPS accuracy will suffer
gpsd:PROG: PPS:/dev/ttyAMA0 thread launched
gpsd:INFO: PPS:/dev/ttyAMA0 ntpshm_link_activate: 1
gpsd:PROG: switch_driver(PPS) called...
gpsd:PROG: selecting PPS driver...
gpsd:PROG: PPS:/dev/pps0 chrony socket /tmp/chrony.pps0.sock doesn't exist
gpsd:INFO: KPPS:/dev/pps0 cannot open /dev/pps0: Permission denied
gpsd:WARN: KPPS:/dev/pps0 kernel PPS unavailable, PPS accuracy will suffer
gpsd:PROG: PPS:/dev/pps0 thread launched
gpsd:INFO: PPS:/dev/pps0 ntpshm_link_activate: 0
gpsd:INFO: KPPS:/dev/pps0 gps_fd:-2 not a tty
gpsd:WARN: PPS:/dev/pps0 die: no TIOMCIWAIT, nor RFC2783 CANWAIT
gpsd:PROG: PPS:/dev/pps0 gpsd_ppsmonitor exited.

Something odd is going on here.

address@hidden:~/gpsd $ ls -l /dev/pps*
crw-r--r-- 1 root root 245, 0 Apr 23 08:09 /dev/pps0

I manually changed this device to be world-readable.  There is no /dev/pps1.
Yet the thread code is looking at the nonexistent /dev/pps1 first,
throwing a spurious permission error, then looking at /dev/pps0 and
throwing a permission error again.

Just to add to the fun,

address@hidden:~/software/gpsd$ ls -l /dev/pps0
crw------- 1 root root 248, 0 Apr 20 15:55 /dev/pps0

the read bit doesn't need to be on where PPS is (apparently) working.

I smell a bug.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

"This country, with its institutions, belongs to the people who inhabit it. 
Whenever they shall grow weary of the existing government, they can exercise
their constitutional right of amending it or their revolutionary right to 
dismember it or overthrow it."  -- Abraham Lincoln, 4 April 1861



reply via email to

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