[ntp:hackers] MFS clock driver?

Folkert van Heusden folkert at vanheusden.com
Sun Feb 5 14:25:04 UTC 2006


Hi,

I recently bought a "precision clock" at Lindy.co.uk. Now it seems it is
not supported out of the box by NTPd. I did some investigations to see
if I could get it to work myself (but I failed). I found that the device
powers on (it is RS232 attached) and starts receiving the signal when I
do:
        bts = TIOCM_DTR|0x4000;
        ioctl(fd,TIOCMSET,&bts);
After that, I can read() a new character every second from /dev/ttyS0.
And yes, in the first 8 seconds or so I do get 2 characters per second
(as specified at for example http://en.wikipedia.org/wiki/MSF_time_signal
and http://www.npl.co.uk/time/msf.html#code).
An example of such a stream of bytes is:
00: 0
01: fc
01: f8
02: f0
02: f8
03: e0
03: f8
04: f0
05: f0
06: f0
07: f0
08: f0
09: e0
10: f8
11: f0
12: e0
13: f0
14: f0
15: e0
16: f0
17: f0
18: f0
19: f0
20: f0
21: e0
22: 0
23: 0
24: f0
25: f0
26: f0
27: f0
28: 0
29: f0
30: e0
31: f0
32: f0
33: 0
34: f0
35: 0

Here the first value indicates at what second I received that byte (the
second value).

I'll attach my testprogram to this e-mail.

Now my question is: is anyone willing to help me writing an
NTPd-refclock-driver?


Folkert van Heusden

-- 
www.vanheusden.com/multitail - multitail is tail on steroids. multiple
               windows, filtering, coloring, anything you can think of
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com


More information about the hackers mailing list