This commit was generated by cvs2svn to track changes on a CVS vendor
[unix-history] / contrib / xntpd / README.FreeBSD
CommitLineData
bd43ea90
GW
1This version of NTP was converted to the BSD-style Makefile system by
2Garrett Wollman (wollman@freefall.cdrom.com); it is based on version
f064a358 33.3p (late beta) from the University of Delaware.
bd43ea90
GW
4
5Besides the Makefile changes, the DES code has been completely removed
6in order to make this code exportable. If you have a legal copy of
7`authdes.c', you can just add it to the lib/ directory and add `-DDES'
8to the AUTHDEFS in Makefile.inc.
9
fa1a6f22 10You can change CLOCKDEFS in the same file to add other reference clocks.
f555592b
PHK
11
12----------------------------------------------------
13Support for Conrad electronic's "DCF-77 Uhr, Mobil".
14----------------------------------------------------
15Conrad electronic in Germany,, Phone (+49) 962230111 (?), sells a gadget
16called "DCF77 Uhr, mobil", which is a DCF77 timecode receiver with a
17rs-232 interface. The price is around DM130.
18 9-pin interface is Order# 97 94 57 66
19 25-pin interface is Order# 97 94 81 66
20
21You must define
22 -DDCF77 -DPPS -DFREEBSD_CONRAD -DDEBUG
23when you compile xntpd. You can later remove -DDEBUG, if you feel like it.
24
25You must also have
26 options COM_BIDIR
27defined in your kernel, and finally the ttyport you intend to use must
28have special interrupt vector:
29 device sio1 at isa? port "IO_COM2" tty irq 3 vector siointrts
30 ^^^^^^^^^^^^
31connect the radio-clock to the tty port and link it to /dev/refclock-0:
32
33 cd /dev
34 sh MAKEDEV cua1
35 ln -s /dev/cua01 /dev/refclock-0
36
37make a directory to gather statistics in:
38 mkdir /var/tmp/ntp
39
40Create a /etc/ntp.conf along these lines:
41
42 # DCF77 without PPS
43 server 127.127.8.20
44 # DCF77 with PPS
45 #server 127.127.8.148 prefer
46
47 driftfile /var/tmp/ntp/ntp.drift
48 statsdir /var/tmp/ntp
49 statistics loopstats
50 statistics peerstats
51 statistics clockstats
52 filegen peerstats file peerstats type day enable
53 filegen loopstats file loopstats type day enable
54 filegen clockstats file clockstats type day enable
55
56Try to start it:
57 comcontrol ttyd1 bidir
58 tickadj -A
59 xntpd -d -d -d
60
61You should see the red LED flash on the receiver every second now. You
62may have to experiment a bit with the location, and possibly adjust the
63minute variable resistor inside to get a good signal. Be aware, that just
64because you see the light flash, is not the same as the signal being
65received by the computer. The chip doing the work in the reciver uses
66less than 1 micro-ampere, so even if RTS isn't pulled low, it will happily
67receive, but be unable to buffer the signal to the rs-232 levels needed.
68
69You can see what's going on in /var/log/messages, and query the
70daemon using xntpdc and ntpq, in particular the "clockvar" command
71of ntpq will tell about the clocks healt.
72
73I live in Slagelse, Denmark, which is ~1000 Km from Mainflingen, yet
74I have +/- 2 ms precision from this cheap gadget. If you have a very
75stable signal, you can use the 'pps' address instead to improve your
76timing.
77
78Have fun... Poul-Henning Kamp <phk@login.dkuug.dk>