gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] RFC 2783


From: Frank Nicholas
Subject: Re: [gpsd-dev] RFC 2783
Date: Tue, 10 Mar 2015 15:22:46 -0400


On Tue, Mar 10, 2015 at 3:05 PM, Gary E. Miller <address@hidden> wrote:
Yo Frank!

On Tue, 10 Mar 2015 14:57:04 -0400
Frank Nicholas <address@hidden> wrote:

> I have this adafruit GPS (https://www.adafruit.com/product/746), and
> had it connected to a RaspberryPi for a year or two.  I used NTPd
> directly.  Nifty piece of hardware and is extremely reliable.  It has
> an external antenna connector that I'm using.  It came with a battery
> holder that I never used.  It locks quick, even with a long off, cold
> start.

I went with the 2324 since it plugs directly into the RasPi.  Otherwise
they look similar.

I think they have the same GPS module.  The one you purchased is a newer version and has a RTC built-in.  
 

How did you get the GPIO on pin 4 to drive your /dev/pps0?


There was a custom kernel module called "pps-gpio" that did the magic.  Note that this dates back to mid 2012, and now I think this stuff is in current kernels, when configured for RaspBerry Pi.  From kernel 3.18.7: 

   │    <M> PPS support                                                   

  │    [ ]   PPS debugging messages                                      

  │          *** PPS clients support ***                                 

  │    < >   Kernel timer client (Testing client, use for debug)         

  │    <M>   PPS line discipline                                         

  │    <M>   PPS client using GPIO                                       


   CONFIG_PPS_CLIENT_GPIO:                                                 │  

                                                                          │  

  If you say yes here you get support for a PPS source using              │  

  GPIO. To be useful you must also register a platform device             │  

  specifying the GPIO pin and other options, usually in your board        │  

  setup.                                                                  │  


I still have "/etc" tar'd up if you're interested in a copy of my old system for the NTP config.  I use the config files for reference...
 
> The adafruit GPS is currently attached to my BSD based pfSense router
> as an NTP server (no GPSd).  I'll probably move it back to a Pi and
> put one of the USB GPS's I just received on the pfSense box (less
> wires in that area).  I'll then have 2 x PPS enabled GPS NTP servers
> at home.  Any advantages to 2 x on the same LAN?  What should I look
> for to dial them in, or should I just let NTP on the clients figure
> it out?

Well, you do reboot things now and again, so you'll always have good time.

Having two PPS lets you measure network latency, bufferbloat and
asymmetry.

I have been experimenting with linuxptp lately.  By having a PPS
at both ends I have noticed some serious (> 1 Sec!) offsets in the master
and slave PTP.  Users without the dual PPS have been optimizing jitter
aond let offset go totally whacky.


In Eric's writeup "Introduction to Time Service", he lists the 1PPS via USB as having a deviation of up to 1ms vs. 1PPS via Serial at only up to 5uSec.  The USB GPS's I have will have THAT much latency on the PPS?  That's a factor of 200, USB vs. Serial!  If so, I may shy away from using the PPS on the USB GPS and get another unit from adafruit...
 
Plus you can brag to all your friends!

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588
>
> On Tue, Mar 10, 2015 at 2:45 PM, Gary E. Miller <address@hidden>
> wrote:
>
> > Yo Eric!
> >
> > I have been looking at the ntpd RFC 2783 enabled drivers hoping to
> > learn something from them.  I found the opposite.  gpsd does a much
> > better job with RFC 2783 than ntpd.  Except for one thing ntpd does
> > better.
> >
> > Gpsd auomatically configures the GPS serial port for PPS, then
> > automatically detects the resulting /dev/ppsX device. gpsd then
> > passes PPS data to ntpd for all offsets from system clock to PPS
> > clock.
> >
> > ntpd does none of that.  In the configuration file you tell ntpd
> > which of /dev/pps[0-3] to use.  Before ntpd will use the PPS input
> > the ntpd time and system time must be within +/- 400 mSec.  That
> > may be hard to do for a GPS and gpsd does not require that.
> >
> > We are getting a lot of pull from the embedded community to support
> > manually configuring the /dev/ppsX.  For example, there are many
> > GPS for RasPi that put PPS on GPIO pin 4.  Adafruit claims to have
> > sold 10,000 plus GPS for RasPi configure this way.  There is no way
> > for the kernel or for gpsd to know the association between GPIO 4
> > and the serial GPS.
> >
> > For those Adafruit, and other, users we need a way to specify a
> > /dev/ppsX manually.  This also solves the problem on other OS that
> > do not allow Linux like determination of serial device to PPS device
> > mapping.
> >
> > How about something like this:
> >
> >         gpsd -n /dev/ttyUSB0 -p /dev/pps0
> >
> > Ideas?
> >
> > I have an adafruit on order so I can test:
> >
> > http://www.adafruit.com/products/2324
> >
> > RGDS
> > GARY
> > ---------------------------------------------------------------------------
> > Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR
> > 97701 address@hidden  Tel:+1(541)382-8588
> >
> >





reply via email to

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