source: trunk/third/xntp/html/driver8.htm @ 16192

Revision 16192, 13.4 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r16191, which included commits to RCS files with non-trunk default branches.
Line 
1<HTML><HEAD><TITLE>
2Generic Reference Driver
3</TITLE></HEAD><BODY><H3>
4Generic Reference Driver
5</H3><HR>
6
7<H4>Synopsis</H4>
8
9Address: 127.127.8.<I>u</I>
10<BR>Reference ID: <TT>PARSE</TT>
11<BR>Driver ID: <TT>GENERIC</TT>
12<BR>Serial Port: <TT>/dev/refclock-<I>u</I></TT>; TTY mode according to
13clock type
14
15<H4>Description</H4>
16
17The timecode of these receivers is sampled via a STREAMS module in the
18kernel (The STREAMS module has been designed for use with SUN Systems
19under SunOS 4.1.x or Solaris 2.3 - 2.6. It can be linked directly into
20the kernel or loaded via the loadable driver mechanism). This STREAMS
21module can be adapted to be able to convert different time code formats.
22If the daemon is compiled without the STREAM definition synchronization
23will work without the Sun streams module, though accuracy is
24significantly degraded. This feature allows to use PARSE also on non Sun
25machines.
26
27<P>The actual receiver status is mapped into various synchronization
28states generally used by receivers. The STREAMS module is configured to
29interpret the time codes of DCF C51, PZF535, PZF509, GPS166, Trimble SV6
30GPS, ELV DCF7000, Schmid, Wharton 400A and low cost receivers (see list
31below).
32
33<P>The reference clock support in ntp contains the necessary
34configuration tables for those receivers. In addition to supporting
35several different clock types and 4 devices, the generation a a PPS
36signal is also provided as an configuration option. The PPS
37configuration option uses the receiver generated time stamps for feeding
38the PPS loopfilter control for much finer clock synchronization.
39
40<P>CAUTION: The PPS configuration option is different from the hardware
41PPS signal, which is also supported (see below), as it controls the way
42ntpd is synchronized to the reference clock, while the hardware PPS
43signal controls the way time offsets are determined.
44
45<P>The use of the PPS option requires receivers with an accuracy of
46better than 1ms.
47
48<P>Fudge factors
49
50<P>Only two fudge factors are utilized. The time1 fudge factor defines
51the phase offset of the synchronization character to the actual time. On
52the availability of PPS information the time2 fudge factor defines the
53skew between the PPS time stamp and the receiver timestamp of the PPS
54signal. This parameter is usually zero, as usually the PPS signal is
55believed in time and OS delays should be corrected in the machine
56specific section of the kernel driver. time2 needs only be set when the
57actual PPS signal is delayed for some reason. The flag1 enables input
58filtering. This a median filter with continuous sampling. The flag2
59selects averaging of the samples remaining after the filtering. Leap
60second-handling is controlled with the flag3. When set a leap second
61will be deleted on receipt of a leap second indication from the
62receiver. Otherwise the leap second will be added, (which is the
63default). flag3 should never be set. PPS handling is enabled by adding
64128 to the mode parameter in the server/peer command.
65
66<P>ntpq (8)
67<P>timecode variable
68
69<P>The ntpq program can read clock variables command list several
70variables.
71These hold the following information: refclock_time is the local time
72with
73the offset to UTC (format HHMM). The currently active receiver flags are
74listed in refclock_status. Additional feature flags of the receiver are
75optionally listed in parentheses. The actual time code is listed in
76timecode.
77A qualification of the decoded time code format is following in
78refclock_format. The last piece of information is the overall running
79time and the accumulated times for the clock event states in
80refclock_states. When PPS information is present additional variable are
81available. refclock_ppstime lists then the PPS timestamp and
82refclock_ppsskew lists the difference between RS232
83derived timestamp and the PPS timestamp.
84
85<P>Currently, eighteen clock types (devices /dev/refclock-0 -
86/dev/refclock-3) are supported by the PARSE driver.
87<BR>A note on the implementations:
88<UL><li>These implementations where mainly done <B><I>WITHOUT</I></B>
89actual access to the hardware. Thus not all implementations provide full
90support. The development was done with the help of many souls who had
91the hardware and where so kind to borrow me their time an patience
92during the development and debugging cycle. Thus for continued support
93and quality direct access to the receivers is a big help. Nevertheless i
94am not prepared to buy these reference clocks - donations to <A
95HREF="http://www4.informatik.uni-erlangen.de/~kardel">me</A>
96(<A HREF="mailto: kardel@acm.org">kardel@acm.org</A>) are welcome as
97long as they work within Europe 8-).
98
99<P>Verified implementations are:
100<UL>
101<LI>
102RAWDCF variants
103
104<p>These variants are tested for the decoding with my own homegrown
105receivers. Interfacing with specific commercial products may involve
106some fiddeling with cables. Especially commericial RAWDCF receivers have
107a seemingly unlimited number of ways to draw power from the RS232 port
108and to encode the DCF77 datastream. You are mainly on your own here
109unless i have a sample of the receiver.
110<LI>
111<A HREF="http://www.meinberg.de">Meinberg  clocks</A>
112
113<p>These implementations are verified by the Meinberg people themselves
114and i have access to one of these clocks.</UL>
115</UL>
116The pictures below refer to the respective clock and where taken from
117the vendors web pages. They are linked to the respective vendors.
118<UL>
119<LI>
120<B><TT>server 127.127.8.0-3 mode 0</TT></B>
121
122<p><B><TT><A HREF="http://www.meinberg.de">Meinberg </A>PZF535/<A
123HREF="http://www.meinberg.de/english/products/pzf509.htm">PZF509 receiver</A> (FM
124demodulation/TCXO / 50us)</TT></B>
125<BR>
126<LI>
127<B><TT>server 127.127.8.0-3 mode 1</TT></B>
128
129<p><B><TT><A HREF="http://www.meinberg.de">Meinberg </A> PZF535/<A
130HREF="http://www.meinberg.de/english/products/pzf509.htm">PZF509
131receiver</A> (FM demodulation/OCXO / 50us)</TT></B>
132<BR><A HREF="http://www.meinberg.de/english/products/pzf509.htm"><IMG
133SRC="pic/pzf509.jpg" ALT="BILD PZF509" HEIGHT=300 WIDTH=260
134ALIGN=TEXTTOP></A>
135<BR>
136<LI>
137<B><TT>server 127.127.8.0-3 mode 2</TT></B>
138
139<p><B><TT><A HREF="http://www.meinberg.de">Meinberg </A> DCF U/A
14031/<A HREF="http://www.meinberg.de/english/products/c51.htm">DCF C51 receiver</A>
141(AM demodulation / 4ms)</TT></B>
142<BR><A HREF="http://www.meinberg.de/english/products/c51.htm"><IMG
143SRC="pic/c51.jpg" ALT="BILD C51" HEIGHT=180 WIDTH=330 ALIGN=TEXTTOP></A>
144<BR>
145<LI>
146<B><TT>server 127.127.8.0-3 mode 3</TT></B>
147
148<p><B><TT><A HREF="http://www.elv.de">ELV</A> DCF7000 (sloppy AM
149demodulation
150/ 50ms)</TT></B>
151<BR>
152<LI>
153<B><TT>server 127.127.8.0-3 mode 4</TT></B>
154
155<p><B><TT>Walter Schmid DCF receiver Kit (AM demodulation /
1561ms)</TT></B>
157<BR>
158<LI>
159<B><TT>server 127.127.8.0-3 mode 5</TT></B>
160
161<p><B><TT>RAW DCF77 100/200ms pulses (Conrad DCF77 receiver module /
1625ms)</TT></B>
163<BR>
164<LI>
165<B><TT>server 127.127.8.0-3 mode 6</TT></B>
166
167<p><B><TT>RAW DCF77 100/200ms pulses (TimeBrick DCF77 receiver module
168/ 5ms)</TT></B>
169<BR>
170<LI>
171<B><TT>server 127.127.8.0-3 mode 7</TT></B>
172
173<p><B><TT><A HREF="http://www.meinberg.de">Meinberg </A> <A
174HREF="http://www.meinberg.de/english/products/gps167.htm">GPS166/GPS167
175receiver</A> (GPS / &lt;&lt;1us)</TT></B>
176<BR><A HREF="http://www.meinberg.de/english/products/gps167.htm"><IMG
177SRC="pic/gps167.jpg" ALT="BILD GPS167" HEIGHT=300 WIDTH=280
178ALIGN=TEXTTOP></A>
179<BR>
180<LI>
181<B><TT>server 127.127.8.0-3 mode 8</TT></B>
182<p><B><TT><A HREF="http://www.igel.de">IGEL</A> <A
183HREF="http://www.igel.de/eigelmn.htm">clock</A></TT></B>
184<BR><A HREF="http://www.igel.de/eigelmn.htm"><IMG SRC="pic/igclock.gif"
185HEIGHT=174 WIDTH=200></A>
186<BR>
187<LI>
188<B><TT>server 127.127.8.0-3 mode 9</TT></B>
189
190<p><B><TT><A HREF="http://www.trimble.com">Trimble</A> <A
191HREF="http://www.trimble.com/cgi/omprod.cgi/pd_om011.htm">SVeeSix
192GPS receiver</A>TAIP protocol (GPS / &lt;&lt;1us)</TT></B>
193<BR>
194<LI>
195<B><TT>server 127.127.8.0-3 mode 10</TT></B>
196
197<p><B><TT><A HREF="http://www.trimble.com">Trimble</A> <A
198HREF="http://www.trimble.com/cgi/omprod.cgi/pd_om011.htm">SVeeSix
199GPS receiver</A> TSIP protocol (GPS / &lt;&lt;1us) (no kernel support
200yet)</TT></B>
201<BR><A HREF="http://www.trimble.com/cgi/omprod.cgi/pd_om011.htm"><IMG
202SRC="pic/pd_om011.gif" ALT="SVeeSix-CM3" BORDER=0 HEIGHT=100 WIDTH=420
203ALIGN=TEXTTOP></A>
204<BR><A HREF="http://www.trimble.com/cgi/omprod.cgi/pd_om006.htm"><IMG
205SRC="pic/pd_om006.gif" ALT="Lassen-SK8" BORDER=0 HEIGHT=100
206WIDTH=420></A>
207<BR>
208<LI>
209<B><TT>server 127.127.8.0-3 mode 11</TT></B>
210
211<p><B><TT>Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master
212Clock
213support </TT></B>
214<BR>
215<LI>
216<B><TT>server 127.127.8.0-3 mode 12</TT></B>
217
218<p><B><TT><A HREF="http://www.hopf-time.com">HOPF</A> <A
219HREF="http://www.hopf-time.com/kart6021.htm">Funkuhr
2206021</A></TT></B>
221<BR><A HREF="http://www.hopf-time.com/engl/kart6021.htm"><IMG
222SRC="pic/fg6021.gif" ALT="DCF77-Interface Board" HEIGHT=207 WIDTH=238
223ALIGN=TEXTTOP></A>
224<BR>
225<LI>
226<B><TT>server 127.127.8.0-3 mode 13</TT></B>
227
228<p><B><TT>Diem's Computime Radio Clock</TT></B>
229<BR>
230<LI>
231<B><TT>server 127.127.8.0-3 mode 14</TT></B>
232
233<p><B><TT>RAWDCF receiver (DTR=high/RTS=low)</TT></B>
234
235<LI>
236<B><TT>server 127.127.8.0-3 mode 15</TT></B>
237
238<p><B><TT>WHARTON 400A Series Clocks with a 404.2 Serial
239Interface</TT></B>
240<LI>
241<B><TT>server 127.127.8.0-3 mode 16</TT></B>
242
243<p><B><TT>RAWDCF receiver (DTR=low/RTS=high)
244</TT></B>
245<LI>
246<B><TT>server 127.127.8.0-3 mode 17</TT></B>
247
248<p><B><TT>VARITEXT Receiver (MSF)
249</TT></B>
250</UL>
251<p>
252Actual data formats and set-up requirements of the various clocks can be
253found in <A HREF="parsedata.htm">NTP PARSE clock data formats</A>.
254
255<P>The reference clock support carefully monitors the state transitions
256of the receiver. All state changes and exceptional events such as loss
257of time code transmission are logged via the syslog facility. Every hour
258a summary of the accumulated times for the clock states is listed via
259syslog.
260
261<P>PPS support is only available when the receiver is completely
262synchronized. The receiver is believed to deliver correct time for an
263additional period of time after losing synchronizations, unless a
264disruption in time code transmission is detected (possible power loss).
265The trust period is dependent on the receiver oscillator and thus a
266function of clock type. This is one of the parameters in the clockinfo
267field of the reference clock implementation. This parameter cannot be
268configured by ntpdc.
269
270<P>In addition to the PPS loopfilter control a true PPS hardware signal
271can be applied on Sun Sparc stations via the CPU serial ports on the CD
272pin. This signal is automatically detected and will be used for offset
273calculation. The input signal must be the time mark for the following
274time code. (The edge sensitivity can be selected - look into the
275appropriate kernel/parsestreams.c for details). Meinberg receivers can
276be connected by feeding the PPS pulse of the receiver via a 1488 level
277converter to Pin 8 (CD) of a Sun serial zs-port. To select PPS support
278the STREAMS driver for PARSE must be loaded and the mode parameter ist
279the mode value of above plus 128. If 128 is not added to the mode value
280PPS will be detected to be available but it will not be used. For PPS to
281be used you MUST add 128 to the mode parameter.
282
283<P>For the Meinberg GPS166/GPS167 receiver is also a special firmware
284release available (Uni-Erlangen). This release should be used for proper
285operation.
286
287<P>The raw DCF77 pulses can be fed via a level converter directly into
288Pin 3 (Rx) of the Sun. The telegrams will be decoded an used for
289synchronization. AM DCF77 receivers are running as low as $25. The
290accuracy is dependent on the receiver and is somewhere between 2ms
291(expensive) to 10ms (cheap). Upon bad signal reception of DCF77
292synchronizations will cease as no backup oscillator is available as
293usually found in other reference clock receivers. So it is important to
294have a good place for the DCF77 antenna. For transmitter shutdowns you
295are out of luck unless you have other NTP servers with alternate time
296sources available.
297
298<H4>Monitor Data</H4>
299
300Clock states statistics are written hourly the the syslog service.
301Online information can be found by examining the clock variable via the
302ntpq cv command.
303
304<H4>Fudge Factors</H4>
305
306<DL>
307
308<DT><TT>time1 <I>time</I></TT></DT>
309<DD>Specifies the time offset calibration factor, in seconds and
310fraction, with default depending on clock type.</DD>
311
312<DT><TT>time2 <I>time</I></TT></DT>
313<DD>Specifies the offset if the PPS signal to the actual time. (PPS fine
314tuning).</DD>
315
316<DT><TT>stratum <I>number</I></TT></DT>
317<DD>Specifies the driver stratum, in decimal from 0 to 15, with default
3180.</DD>
319
320<DT><TT>refid <I>string</I></TT></DT>
321<DD>Specifies the driver reference identifier, an ASCII string from one
322to four characters, with default according to current clock type.</DD>
323
324<DT><TT>flag1 0 | 1</TT></DT>
325<DD>Not used by this driver.</DD>
326
327<DT><TT>flag2 0 | 1</TT></DT>
328<DD>Not used by this driver.</DD>
329
330<DT><TT>flag3 0 | 1</TT></DT>
331<DD>delete next leap second instead of adding it.</DD>
332
333<DT>
334<TT>flag4 0 | 1</TT></DT>
335<DD>Delete next leap second instead of adding it - flag will be re-
336defined soon - so don't use it. Statistics are provided by more common
337means (syslog, clock variable via ntpq)</DD>
338
339</DL>
340
341<H4>Making your own PARSE clocks</H4>
342
343The parse clock mechanismis deviated from the way other ntp reference
344clocks work. For a short description how to build parse reference clocks
345see <A HREF="parsenew.htm">making PARSE clocks</A>
346
347<P>Additional Information
348
349<P><A HREF="refclock.htm">Reference Clock Drivers</A>
350
351<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a
352href="mailto:mills@udel.edu"> David L. Mills &lt;mills@udel.edu&gt;</a>
353</address></body></html>
Note: See TracBrowser for help on using the repository browser.