[ntp:questions] ldattach makes ttySx buffered !?
wbreyha at gmx.net
Mon May 3 18:33:16 UTC 2010
On 2010-05-02 17:46, unruh wrote:
> However it is not clear that this is what is causing the OP's
> problems.It may be, or there may be aproblem with the serial port
The problem with the buffer is that ntpd reads the buffered timestamps all
at once and calculates the current time with them. This results in a huge
(seconds to minutes) offset to the past if the time between ldattach and
ntpd was started is very large or if you stop ntpd without stopping
ldattach and restarting it later.
Currently I patched refclock_nmea to "eat" all input from serial interface
until the buffer is empty before it continues with clock init.
So, if ldattach works "as designed" maybe ntpd should always empty the
buffer like my patched version.
But since I'm not able deside whos "fault" it is I postet the problem here;-)
I can provide my patch if anybody wants it.
Wolfgang Breyha <wbreyha at gmx.net> | http://www.blafasel.at/
Vienna University Computer Center | Austria
More information about the questions