Re: [chrony-users] Setting up Chrony with PPS

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


On Thu, Feb 18, 2016 at 04:08:37PM -0800, Deven Hickingbotham wrote:
> I changed chrony.conf to include:
> 
> refclock SHM 0  precision 1e-1 offset -0.135 delay 0.5 refid NEMA
> refclock SHM 1 offset 0.00135 delay 0.1 refid PPS
> refclock SOCK /var/run/chrony.ttyAMA0.sock offset 0.00135 delay 0.0 refid
> SOCK
> 
> Now 10 minutes after restarting chronyc sources outputs:

> #x SHM0                     0    4     21    +18ms[  +18ms] +/- 3102us
> #? PPS                      0    4    10y     +0ns[   +0ns] +/-    0ns
> #? SOCK                     0    4    10y     +0ns[   +0ns] +/-    0ns

I think the problem is that gpsd doesn't know (and has no way of
knowing) that the PPS signal from the GPS is connected to a GPIO pin.
It would probably have to be on the same USB/serial port. If you start
gpsd in a terminal with debug messages enabled (e.g. adding -D 4 to
the options), you should see if there are any PPS messages and to what
chrony socket it's trying to connect.

The solution is to compile chrony with PPS support (using the
timepps.h header) and use the PPS refclock instead of SOCK. gpsd would
just provide the NMEA timing as a SHM refclock with noselect option,
to which the PPS refclock would be locked as shown in the example in
the chrony manual. This would also be a good opportunity to switch to
a more recent chrony release, 1.24 was actually the first release with
support for reference clocks and there were some bugs fixed since
then.

-- 
Miroslav Lichvar

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