[ntp:questions] nmea and initial large offset

Andy Helten andy.helten at dot21rts.com
Wed May 5 13:44:21 UTC 2010


Kalle Pokki wrote:
> On Tue, May 4, 2010 at 16:03, Rini van Zetten <rini at arvoo.nl> wrote:
>   
>> I'm trying to setup an embedded system with ntpd and a gps device as reference clock.
>>
>> Everyhing went fine when the clock is not too far away when i start ntpd.
>> But when the clock offset is big (1-1-1970 for example), the ntpd refuses to use the gps reference clock.
>>
>> Using the "-g" option does not make any difference.
>>
>> I'm using ntpd 4.2.6p1
>>
>> Does anybody know how to setup this ? (i have no lan connection, so an initial ntpdate is no option)
>>     
>
> The system clock needs to be within 4 hours of the correct time for
> NTP to synchronize to a reference clock. It seems this is not
> considered a bug by the NTP developers although the behaviour is a
> major blocker to use NTP with a reference clock in embedded not
> constantly supervised environments. If the RTC time is lost, there is
> no way for the system to synchronize to a reference clock anymore.
>
> See https://bugs.ntp.org/417 for a discussion. There have been patches
> to overcome this, but they have not been accepted.
>
> The most annoying thing is that there are no warning messages
> anywhere. The time from the reference clock is just discarded
> silently.

Yes, this is exactly right.  We worked around this problem in our system 
by grabbing the time from the refclock, setting system time with the 
refclock time, quick sync NTP, and then finally start the NTP daemon.




More information about the questions mailing list