[ntp:questions] double pps device

folkert folkert at vanheusden.com
Sat Nov 12 15:04:08 UTC 2016


Hi,

Hoping that this is the right list for this question.

Before I used my rpi-gpio-ntpd program. As I would like better latency
values, I'm going to try to use the kernel pps interface. This is all on
a raspberry pi.
Now I hit my head on the following.

When my system is running no ntpd and no gpsd, there is a /dev/pps0
device. This is strange. In fact, that's the one seeing timestamp updates in the
assert-file under /sys.
I verified that no program has /dev/ttyAMA0 open (serial port on the
rpi).
If I now start gpsd, then suddenly a /dev/pps1 appears. This device is
NOT the real pps device. Also the timestamp of the assert-file does not
change for pps1. gpsd is also opening that file. Result of course is that things
are not keeping track of correct time.

Do you have any idea what could be the cause? I updated cmdline.txt,
inittab, systemd, etc etc to not use the serial port and none is (apart
from gpsd) which I verified with lsof

root at timekast2:~# lsof -n | grep ttyAMA0
root at timekast2:~# lsof -n | grep pps
root at timekast2:~# ls -l /dev/pps*
crw------- 1 root root 243, 0 Nov 12 09:58 /dev/pps0
root at timekast2:~# cat /sys/class/pps/pps0/assert
1478958826.004420082#17468
root at timekast2:~# cat /sys/class/pps/pps1/assert
cat: /sys/class/pps/pps1/assert: No such file or directory


root at timekast1:~# /etc/init.d/gpsd start
[ ok ] Starting gpsd (via systemctl): gpsd.service.
root at timekast1:~# ps -deaf | grep gpsd
gpsd      3069     1  1 14:26 ?        00:00:38 /usr/sbin/gpsd -N -G -n /dev/ttyAMA0
root      3491  3377  0 14:59 pts/2    00:00:00 grep gpsd
root at timekast1:~# ls -l /dev/pps*
crw------- 1 root root 243, 0 Nov 12 09:58 /dev/pps0
crw------- 1 root root 243, 1 Nov 12 14:26 /dev/pps1
root at timekast1:~# lsof -n | grep gpsd | grep pps
gpsd      3069            gpsd    8u      CHR      243,1      0t0 15280 /dev/pps1
gpsd      3069 3072       gpsd    8u      CHR      243,1      0t0 15280 /dev/pps1
root at timekast1:~# cat /sys/class/pps/pps1/assert 
0.000000000#0
root at timekast1:~# 


Folkert van Heusden

-- 
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com


More information about the questions mailing list