gpsd-users
[Top][All Lists]
Advanced

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

[gpsd-users] Raspberry Pi, GPIO PPS and NTP


From: Chris Hastie
Subject: [gpsd-users] Raspberry Pi, GPIO PPS and NTP
Date: Wed, 8 Jun 2016 18:03:33 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.24) Gecko/20100411 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666

Hi

I'm wrestling with getting the most out of a Raspberry Pi, Adafruit GPS
HAT and gpsd at the minute. The first problem was that stock gpsd from
the raspberian jessie repositories just didn't seem to do PPS, but I've
now compiled 3.16 from source and things are going a bit better. I have
a link from /dev/gps0 → /dev/ttyAMA0 and starting gpsd with

gpsd -n /dev/gps0 /dev/pps0

seems to work fine in that PPS is recognised, and data arrives in SHM
unit 2.

I would like to be able to use ntp's gpsd-ng json driver (type 46). This
requires the device name to be in the form /dev/gps*, hence the link. At
the moment, however, if gpsd is started only with the argument /dev/gps0
PPS fails to start. And even if started with the two arguments as above,
if a client specifies /dev/gps0, as ntp does, no PPS data is returned.
Is there some way that I can associate /dev/pps0 with /dev/gps0? Looking
at the log messages and even the code it looks like something to do with
/sys/devices/virtual/pps/pps0/path might help, but I haven't been able
to get anything into that file. I've tried updating my udev rules:

KERNEL=="ttyAMA0", SYMLINK+="gps0"
KERNEL=="pps0", OWNER="root", GROUP="tty", MODE="0660",
ATTR{path}="/dev/gps0" SYMLINK+="gpspps0"

but this seems to have no effect, and running udevadm test shows this:

ATTR '/sys/devices/virtual/pps/pps0/path' writing '/dev/gps0'
/etc/udev/rules.d/10-pps.rules:2
error opening ATTR{/sys/devices/virtual/pps/pps0/path} for writing:
Permission denied

This is unsurprising since the file is read only, but I can't see anyway
of ensuring it is created with any root access.

cheers

Chris



reply via email to

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