|
From: | Pete Nevill |
Subject: | Re: [gpsd-users] PPS to gpsd from Pi GPIO pin |
Date: | Thu, 10 Mar 2016 08:29:09 +0000 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
Hi Jon,Thanks for the suggestion although I am sure I have already tried it once (will do again).... I have now also attached the TX and RX direct to the Pi GPIO pins and now when I start gpsd from the command line with the following:
sudo gpsd -G -N -D9 -F /var/run/gpsd.sock /dev/ttyAMA0 /dev/pps0 I get the this output (only posted the pps relevent stuff) gpsd:INFO: stashing device /dev/ttyAMA0 at slot 0 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:ERROR: /dev/pps0: device activation failed. gpsd:ERROR: /dev/pps0: activation failed, freeing device As such no pps offset showing up with gpsmon.As far as I know nothing else was using that device. I even tried changing the permissions for /dev/pps0 with only the same result...
Does not look like a bug, just a conflict/permission issue as far as I can tell ...
Pete. On 10/03/2016 04:04, Jon Brase wrote:
On Wed, 09 Mar 2016 05:10:23 -0600, Pete Nevill <address@hidden> wrote:Hi. I wonder if anyone can help? I have a question about getting PPS to gpsd from a gps via GPIO pins using a Raspberry PI.I have an Ultimate GPS Breakout V3 board https://www.adafruit.com/products/746I have connected the PPS pin directly to my Pi via GPIO pin 18. I have added the following line to /boot/config.txt dtoverlay=pps-gpio,gpiopin=18 When I boot the pi I get the following: [ 9.859705] pps_core: LinuxPPS API ver. 1 registered[ 9.863843] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <address@hidden>[ 10.052295] pps pps0: new PPS source pps.-1 [ 10.054528] pps pps0: Registered IRQ 412 as PPS source [ 14.209399] pps_ldisc: PPS line discipline registered Looking good so far... Do a quick test to see if we have any ticks! sudo ppstest /dev/pps0 trying PPS source "/dev/pps0" found PPS source "/dev/pps0" ok, found 1 source(s), now start fetching data...source 0 - assert 1457520369.538064030, sequence: 180812 - clear 0.000000000, sequence: 0 source 0 - assert 1457520370.538051840, sequence: 180813 - clear 0.000000000, sequence: 0 source 0 - assert 1457520371.538039843, sequence: 180814 - clear 0.000000000, sequence: 0Yes... we are cooking.I connected the TX and RX (of the break out) to a serial to USB adapter like this https://www.adafruit.com/products/954You have to hook up the PPS output to a GPIO pin anyways, so why not hook the TX and RX lines to the UART GPIO pins on the Pi? This is what I've been doing, and what every tutorial I've seen recommends doing.Another way would be to somehow pass the PPS via the USB but its not obvious how I would do this and I actually want to take the USB out of the equation, connect the break-out board direct to the Pi GPIO pins to reduce the latency.Any suggestion or am I asking too much?I recently submitted a similar question here, and was told that adding /dev/pps0 to the GPSD command line should do it. However, I'm having some trouble with GPSD encountering errors trying to open /dev/pps0. Could you try changing your DEVICES= line to DEVICES="/dev/ttyUSB0 /dev/pps0", and let us know what results you get? If everything works for you, we can try comparing your setup to mine to see what's causing my issue, if you get the same error, then we have a larger sample size for the issue.
[Prev in Thread] | Current Thread | [Next in Thread] |