Re: [chrony-users] Synchronizing clock with GPS with PPS

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Just as a side note here, I am on /dev/ttyAMA1 because the Raspberry Pi 4 has additional UARTs that can be configured with other device tree overlays.

> On Sep 15, 2020, at 9:02 PM, Hal Murray <hmurray@xxxxxxxxxxxxxxx> wrote:
> 
>> But then I do not use something like a Rasberry.
> 
> On a Pi, the built in serial port is /dev/ttyAMA0
> It doesn't have any pins for the modem control signals.
> At least with the typical setup.
> 
> On a Pi and similar SoC chips, there are not enough pins for all the potential 
> uses.  There is a layer of muxing between the pins and the built in I/O 
> devices.  The normal setup assigns lots of pins to GPIO.  With some work, you 
> could probably activate the modem control signals.  I think device-tree is the 
> buzz word.
> 
> On a Pi, the usual way is to turn one of the GPIO pins into a PPS.  gpsd 
> normally sets up a /dev/pps<n> to go with a serial port.  There should be a 
> way to tell GPSD to use /dev/pps0 rather than set up a new one.  I don't know 
> how to do that, but that's what you should be looking for what scanning the 
> gpsd documentation.

From the brief flamewar that seems to have ensued from my asking the question, such a feature would be implemented over the maintainer’s dead body… A simple symlink of /dev/pps1 to the one you want it to use seems to work, though it is a clearly a hack.

> 
> If gpsd is setting up /dev/pps1, it won't work.  That internal signal doesn't 
> go anywhere.
> 
> -------------
> 
> My notes from setting up a Pi, non gpsd:
> 
> # PPS via gpio
> #  https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.satsignal.eu%2Fntp%2FRaspberry-Pi-NTP.html%23easy&amp;data=02%7C01%7Crgovostes%40whoi.edu%7C39146838a40e4910e20208d859dc39b0%7Cd44c5cc6d18c46cc8abd4fdf5b6e5944%7C0%7C0%7C637358150270275800&amp;sdata=yKWT9t33FvblBfKuufUPTCIL8aoqVxFvDmpS%2F6jqTeE%3D&amp;reserved=0
>  vi /boot/cmdline.txt
>    remove the chunk(s) with ttyAMA0
>  vi /boot/config.txt
>    add new line: dtoverlay=pps-gpio,gpiopin=18
>    pin 4 on Adafruit GPS HAT
>  vi /etc/modules
>    add new line: pps-gpio
>  vi /etc/inittab
>    run raspi-config Interfacing-Options/Serial
>    comment out getty line for ttyAMA0 (at bottom)
> 
> The GPIO pin numbering is different from the chip/hardware pin numbering.
> 
> When this gets sorted out, somebody should write a HOWTO for using chrony and 
> gpsd on a Pi.
> 
> 
> -- 
> These are my opinions.  I hate spam.
> 
> 
> 
> 
> -- 
> To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
> with "unsubscribe" in the subject.
> For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
> with "help" in the subject.
> Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.
> 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/