aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/xntpd/README.FreeBSD
blob: 8fd237e1640ccf42c137fc1db16b1940578551e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
	$Id: README.FreeBSD,v 1.7 1994/04/21 21:10:20 wollman Exp $

This version of NTP was converted to the BSD-style Makefile system by
Garrett Wollman (wollman@freefall.cdrom.com); it is based on version
3.3s (late beta) from the University of Delaware.

Besides the Makefile changes, the DES code has been completely removed
in order to make this code exportable.  If you have a legal copy of
`authdes.c', you can just add it to the lib/ directory and add `-DDES'
to the AUTHDEFS in Makefile.inc.

You can change CLOCKDEFS in the same file to add other reference clocks.

This version of xntpd knows how to talk to the kernelized NTP PLL which is
present in versions of FreeBSD-current after 21 April 1994.  When this code
is more widely released, I'll provide the patches to Mills.

----------------------------------------------------
Support for Conrad electronic's "DCF-77 Uhr, Mobil".
----------------------------------------------------
Conrad electronic in Germany,, Phone (+49) 962230111 (?), sells a gadget
called "DCF77 Uhr, mobil", which is a DCF77 timecode receiver with a
rs-232 interface.  The price is around DM130.
	9-pin interface is Order# 97 94 57 66
	25-pin interface is Order# 97 94 81 66

You must define
	-DDCF77 -DPPS -DFREEBSD_CONRAD -DDEBUG
when you compile xntpd.  You can later remove -DDEBUG, if you feel like it.

You must also have
	options         COM_BIDIR
defined in your kernel, and finally the ttyport you intend to use must
have special interrupt vector:
	device sio1 at isa? port "IO_COM2" tty irq 3 vector siointrts
							 ^^^^^^^^^^^^
connect the radio-clock to the tty port and link it to /dev/refclock-0:

	cd /dev
	sh MAKEDEV cua1
	ln -s /dev/cua01 /dev/refclock-0

make a directory to gather statistics in:
	mkdir /var/tmp/ntp

Create a /etc/ntp.conf along these lines:

	# DCF77 without PPS
	server 127.127.8.20
	# DCF77 with PPS
	#server 127.127.8.148 prefer

	driftfile /var/tmp/ntp/ntp.drift
	statsdir /var/tmp/ntp
	statistics loopstats
	statistics peerstats
	statistics clockstats
	filegen peerstats file peerstats type day enable
	filegen loopstats file loopstats type day enable
	filegen clockstats file clockstats type day enable

Try to start it:
	comcontrol ttyd1 bidir
	tickadj -A
	xntpd -d -d -d

You should see the red LED flash on the receiver every second now.  You
may have to experiment a bit with the location, and possibly adjust the
minute variable resistor inside to get a good signal.  Be aware, that just
because you see the light flash, is not the same as the signal being
received by the computer.  The chip doing the work in the reciver uses
less than 1 micro-ampere, so even if RTS isn't pulled low, it will happily
receive, but be unable to buffer the signal to the rs-232 levels needed.

You can see what's going on in /var/log/messages, and query the
daemon using xntpdc and ntpq, in particular the "clockvar" command
of ntpq will tell about the clocks healt.

I live in Slagelse, Denmark, which is ~1000 Km from Mainflingen, yet
I have +/- 2 ms precision from this cheap gadget.  If you have a very
stable signal, you can use the 'pps' address instead to improve your
timing.

Have fun...  Poul-Henning Kamp <phk@login.dkuug.dk>