Re: [chrony-users] gpsd, pps and chrony

[ Thread Index | Date Index | More Archives ]

> Well you suggest that I only need something like that ?
> refclock SHM 1 poll 4 refid PPS

Yes, that should work fine, as long as a recent gpsd version is used.
I think versions before 2.90 didn't pair the NMEA and PPS samples and
needed chrony/ntp to sync first to the NMEA source and only then it
would start sending the PPS samples.

Ok thanks for the confirmation.

I repost my last message because I made a mistake and it was not posted on the list.

On 21 March 2011 12:58, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
On Wed, Mar 16, 2011 at 11:36:06AM +0100, Damien R wrote:
> So with the following configuration file for chrony:
> refclock SHM 0 poll 4 refid GPS
> refclock SHM 1 poll 4 refid PPS
> chrony cannot synchronize ("Selceted source GPS, Can't synchronize: no
> majority"), but if I comment the 1st or the 2nd line chrony is able to
> synchronize with the uncommented source.

I think the problem is that the sources' error intervals
(offset +- dispersion + delay / 2) don't overlap which means they are
both marked as falsetickers and no majority is found. This is a common
problem with NMEA, the messages come with large delays, sometimes
hundreds of milliseconds.

If you want to keep both sources, you'll need to use the offset and/or
delay refclock options to shift and/or widen the error interval for
the NMEA source, so it contains the PPS interval which probably is only
few microseconds wide. The chronyc sourcestats output is useful to
determine the correct values. If you want to keep the NMEA source only
for monitoring, you can use the noselect option, so it will be ignored
in the source selection algorithm.

You are right the problem is exactly what you said. So to make it working with my configuration, I use the following settings:
refclock SHM 0 offset 0.0140 delay 0.1 refid GPS
refclock PPS /dev/pps0 lock GPS

You can replace refclock PPS with the refclock below:
refclock SHM 1 poll 4 refid PPS lock GPS

If I have understand it correctly, chrony selects/prefers refclock that have the minimum delay.
Note: Tests were done with the git version of chrony and gpsd 2.95.

Damien R.

Mail converted by MHonArc 2.6.19+