gpsd-dev
[Top][All Lists]
Advanced

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

[gpsd-dev] Raspberry Pi progress


From: Eric S. Raymond
Subject: [gpsd-dev] Raspberry Pi progress
Date: Wed, 20 Apr 2016 10:56:57 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

I can now see 1PPS with ppstest on the Pi.  I have fully documented
the procedure I used to get there in the draft HOWTO.  I'll enclose
the current (0.2) draft with this message.

Steps not yet done:  (1) GPSD can't yet see the PPS, (2) No instructions
on configuring NTPsec yet.

Gary E. Miller <address@hidden>:
> Yup.  We've needed a dedicated  RasPi/GPS howto for a while.

That now about 85% exists.  The only missing piece is beating GPSD on the Pi
into seeing the PPS signal.  Can I delegate that to you while I work on
NTPsec configuration?

> > 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.

All I had to do was declare the logical pin in /boot/config.txt and
force the pps-gpio module to load. ppstest worked immediately after
that.

Policy decision: I'm not going to try to be exhaustive about old
Raspbian versions. Instead, the build will say to upgrade your
installation to Raspbian current as part of the build.

> 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.

I don't know what this means in practice.  I gather this introduces an error
or inaccuracy into time reporting, but I don't know what kind of error
or how large it is.  The HOWTO should be clear about this and what the
fix for it might be.

> > 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.

Running

gpsd -N -n -D 5 /dev/ttyAMA0 /dev/pps0

doesn't show PPS events, even though ppstest does.  Is there something
else I need to do?

> > 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

Now that I look, it can't.  But I routinely see PPS bars in gpsmon on
snark.  Are you telling me this only works when GPSD is using
TIOCMIWAIT rather than the RFC2783 interface?  Because if that's so,
it's a bug in our stuff that needs fixing.

> > 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.

I see that on the Pi, right now.

> > 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.

Right, I understand this better now and have fully documented it in
the draft.

> > 
> >   $ 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.

Right.  That's the simple case.  We are *not* going to assume the HOWTO
readers are building their own kernels on the Pi.  If they are, they'll
know eniugh to skip the /etc/modules step.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

Attachment: signature.asc
Description: Digital signature


reply via email to

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