gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Using gpio-based kernelpps with gpsd


From: Robert Calhoun
Subject: Re: [gpsd-users] Using gpio-based kernelpps with gpsd
Date: Thu, 16 Jul 2015 16:35:37 +0000
User-agent: Microsoft-MacOutlook/14.4.3.140616

Thank you, Gary! Running gpsd itself works. It still tries first to find
the time pulse on the serial port but then it takes the gpio-based pps
passed as an arg:

D4-11-D6-00-01-7F (PROD):/etc/default $ gpsd -n -N -D3 /dev/ttyS3 /dev/pps0
gpsd:INFO: launching (Version 3.15)
gpsd:INFO: listening on port gpsd
gpsd:INFO: stashing device /dev/ttyS3 at slot 0
gpsd:INFO: opening GPS data source type 2 at '/dev/ttyS3'
gpsd:INFO: speed 57600, 8N1
gpsd:INFO: gpsd_activate(2): activated GPS (fd 4)
gpsd:INFO: KPPS:/dev/ttyS3 cannot set PPS line discipline Invalid argument
gpsd:WARN: KPPS:/dev/ttyS3 kernel PPS unavailable, PPS accuracy will suffer
gpsd:INFO: PPS:/dev/ttyS3 ntpshm_link_activate: 1
gpsd:INFO: device /dev/ttyS3 activated
gpsd:INFO: stashing device /dev/pps0 at slot 1
gpsd:INFO: KPPS:/dev/pps0 RFC2783 path:/dev/pps0, fd is 5
gpsd:INFO: KPPS:/dev/pps0 pps_caps 0x1153
gpsd:INFO: KPPS:/dev/pps0 have PPS_CANWAIT
gpsd:INFO: KPPS:/dev/pps0 kernel PPS will be used
gpsd:INFO: PPS:/dev/pps0 ntpshm_link_activate: 0
gpsd:INFO: device /dev/pps0 activated



gpsd seemed happy with the kpps signal but I could not get chronyd to
accept
KPPS data via gpsd's SHM1 interface.

I ended up using chronyd's build-in PPS driver, but the debug logging in
gpsd was very helpful in verifying that I'd written the driver correctly.
Thanks Eric and team!
 
# Here are the refclock configs from chrony.conf:
refclock SHM 0 offset 0.0 delay 0.2 refid GPSD
refclock PPS /dev/pps0 lock GPSD refid KPPS


The end result:

chronyc> sources -v

MS Name/IP address         Stratum Poll Reach LastRx Last sample
===========================================================================
====
#- GPSD                          0   4   377    11    +77ms[  +77ms] +/-
101ms
#* KPPS                          0   4   377     8  +4549ns[+7908ns] +/-
3666ns
^- ntp-sansome.mocana.com        3   6    77    12    -13ms[  -13ms] +/-
113ms
^- nisttime.carsoncity.k12.m     1   6    77    20  +3175us[+3178us] +/-
22ms
^- natasha.netwurx.net           2   6    77    29  +4393us[+4396us] +/-
52ms
chronyc> 



Rob


On 7/14/15 1:59 AM, "Gary E. Miller" <address@hidden> wrote:

>Yo Robert!
>
>On Tue, 14 Jul 2015 02:45:53 +0000
>Robert Calhoun <address@hidden> wrote:
>
>> Is there a way to tell gpsd directly what pps device to use in gpsd
>> 3.15?
>
>gpsd automagically configures the proper pps device on linux, usually.
>
>If that fails, you can just put the pps device on the command line
>like this:
>       gpsd --n /dev/ttyS0 /dev/pps0
>
>> But best as I can tell from how gpsmon calls it,
>> pps_thread->devicename is always going to be a serial device
>> like /dev/ttyS0, not a pps device, so we're never going to get a
>> match on the code above.
>
>I can't say how gpsmon does it in direct mode.  Actually not much
>point to pps in gpsmon direcct mode anyway.
>
>> I have added the path of my serial device to
>> the .path property of the pps driver based on the RFC 2783 discussion
>> but I don't think that gets read anywhere in the current code. Am I
>> missing something or should I start modifying ppsthread.c?
>
>It is a new, an thus not very well documented or understood feature,
>but it should work fine for you, if you need it.  I know for a fact you
>do NOT need this on the RasPi.  Look in the gpsd INSTALL file for RasPi
>hints.
>
>RGDS
>GARY
>--------------------------------------------------------------------------
>-
>Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
>       address@hidden  Tel:+1(541)382-8588




reply via email to

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