gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [gpsd-users] 1PPS on the Pi - let's pool our knowledge.


From: Gary E. Miller
Subject: Re: [gpsd-dev] [gpsd-users] 1PPS on the Pi - let's pool our knowledge.
Date: Tue, 19 Apr 2016 11:43:04 -0700

Yo Eric!

On Tue, 19 Apr 2016 13:47:15 -0400 (EDT)
address@hidden (Eric S. Raymond) wrote:

> The next logical thing to add to the draft HOWTO is a description of
> how to configure the Pi+HAT so that 1PPS is visible to our test
> programs

Yup.  We've needed a dedicated  RasPi/GPS howto for a while.

> The sources on this are somewhat confusing. Our INSTALL file has these
> words, written I think by Gary Miller:

Yup, those are mostly mine.

> Most of the above is now redundant with the draft HOWTO I'm working
> on.

I'll have to take your word on it, until I see the draft.

> Evidently there are two steps: (1) Specifying the GPIO pin, and (2)
> ensuring that the pps-gpio module is loaded.

Uh, more than two.  And separate sections for the RasPi3/wheezy,
RasPi3/jessie, Raspi/wheezy and RasPi/jessie.

You missed the part about the kernel patch needed to see both edges of
the PPS.  You have a 50/50 chance you can't see the right edge, and
no good way of knowing you have the right edge.



> Since /dev/pps0 is referred to, I gather that doing this and rebooting
> should enable an RFC2783-style kernel PPS interface watching the GPIO
> pin.  One of the experts should explicitly confirm or correct me if
> I'm wrong about this, because it affects the explanation I'll write
> for the HOWTO.

Carefull, as the /dev/ppsX is NOT the /dev/ppsX from the ttyAMA0 or ttyS0.
This is the ppsx from the gpio pin by way of the flawed pps_gpio module.

This ppsX must be specified on the gpsd command line.


> gpsd and gpsmon can use an RFC2783-style PPS interface.

Are you sure about gpsmon?  Can gpsmon accept TWO devices on the CLI?
Like this:
        gpsmon /dev/ttyAMA0 /dev/pps

> GPSD's
> config/ppscheck cannot; instead it relies on a Linux-specific ioctl
> that watches handshake lines on the serial device.

But that is not needed anyway because you can do this:
         ppstest /dev/pps0

Which will show you the one present, and one missing, edge.

> Gary refers to GPIO pin 4.  His "dig deeper" source is David Taylor's,
> which says GPIO pin 18. Examining the traces on my Pi 3 causes me to
> suspect that it uses pin 4.  Did this vary by Pi model?  If so, we
> need to be quite clear about which pin it is on which Pi.

It certainly caries by Hat model.  My two hats use pin 4.

> 
>   $ sudo nano /boot/config.txt - Add dtoverlay=pps-gpio,gpiopin=18 on
> a new line.
> 
>    If you previously added bcm2708.pps_gpio_pin=18 to the end of
>    cmdline.txt, remove it.  Save and close.
> 
>   $ sudo nano /etc/modules – Add pps-gpio on a new line.
>    Save, close & reboot.

The first is for when the pps_gpio module is compiled in, I always compile
in my modules.  I do not like loadable modules.  

The second is for when pps_gpio is a loadable module.

> Gary's advice is not referred to a dated Raspbian version, and he
> doesn't mention adding pps-gpio to /etc/modules.

Because I compiled it in, with my kernel patch.

> I tried building contrib/ppscheck on the Pi 3 and running it
> on /dev/ttyAMA0 and saw no line transitions.

Because ttyAMA0 has no control lines, just TX/RX, so there will never
be any PPS on ttyAMA0.  I suspect ttyS0 also is just TX/RX, no control
lines.


> That might just mean the Raspbian package of gpsd is misconfgured.

That is a given.

> I haven't done a source build of gpsd on the Pi yet; that's on
> my to-do list.

No point continuing until you do.

> We need to assemble a correct description of all this for the HOWTO.
> I'm not content to bash together a recipe that only works once and
> by semi-accident.

Thank you, we have needed this or awhile.  Our biggest group of newbies
is RasPi/HAT folks.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

Attachment: pgp5y9aWFpTmX.pgp
Description: OpenPGP digital signature


reply via email to

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