driver8.html   [plain text]


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<title>Generic Reference Driver</title>
		<link href="scripts/style.css" type="text/css" rel="stylesheet">
	</head>

	<body>
		<h3>Generic Reference Driver</h3>
		<hr>
		<h4>Synopsis</h4>
		Address: 127.127.8.<i>u</i><br>
		Reference ID: <tt>PARSE</tt><br>
		Driver ID: <tt>GENERIC</tt><br>
		Serial Port: <tt>/dev/refclock-<i>u</i></tt>; TTY mode according to clock type
		<h4>Description</h4>
		The PARSE driver supports 17 different clockes types/configurations. PARSE is actually a multi clock driver.<br>
		<br>
		<p>The actual receiver status is mapped into various synchronization states generally used by receivers. The driver is configured to interpret the time codes of DCF C51, PZF535, PZF509, GPS16x, Trimble SV6 GPS, ELV DCF7000, Schmid, Wharton 400A and low cost receivers (see list below).</p>
		<p>The reference clock support in ntp contains the necessary configuration tables for those receivers. In addition to supporting several different clock types and 4 devices, the generation a a PPS signal is also provided as an configuration option. The PPS configuration option uses the receiver generated time stamps for feeding the PPS loopfilter control for much finer clock synchronization.</p>
		<p>CAUTION: The PPS configuration option is different from the hardware PPS signal, which is also supported (see below), as it controls the way ntpd is synchronized to the reference clock, while the hardware PPS signal controls the way time offsets are determined.</p>
		<p>The use of the PPS option requires receivers with an accuracy of better than 1ms.</p>
		<h4>ntpq (8)</h4>
		<h5>timecode variable</h5>
		<p>The ntpq program can read clock variables command list several variables. These hold the following information: refclock_time is the local time with the offset to UTC (format HHMM). The currently active receiver flags are listed in refclock_status. Additional feature flags of the receiver are optionally listed in parentheses. The actual time code is listed in timecode. A qualification of the decoded time code format is following in refclock_format. The last piece of information is the overall running time and the accumulated times for the clock event states in refclock_states. When PPS information is present additional variable are available. refclock_ppstime lists then the PPS timestamp and refclock_ppsskew lists the difference between RS232 derived timestamp and the PPS timestamp.</p>
		<p>Currently, eighteen clock types (devices /dev/refclock-0 - /dev/refclock-3) are supported by the PARSE driver.<br>
			A note on the implementations:</p>
		<ul>
			<li>These implementations where mainly done <b><i>WITHOUT</i></b> actual access to the hardware. Thus not all implementations provide full support. The development was done with the help of many kind souls who had the hardware and where so kind to borrow me their time an patience during the development and debugging cycle. Thus for continued support and quality direct access to the receivers is a big help. Nevertheless i am not prepared to buy these reference clocks - donations to <a href="http://www4.informatik.uni-erlangen.de/%7ekardel">me</a> (<a href="mailto:kardel <AT> acm.org">kardel 
					<AT>
					ntp.org</a>) are welcome as long as they work within Europe 8-).
				<p>Verified implementations are:</p>
				<ul>
					<li>RAWDCF variants
						<p>These variants are tested for the decoding with my own homegrown receivers. Interfacing with specific commercial products may involve some fiddeling with cables. Especially commericial RAWDCF receivers have a seemingly unlimited number of ways to draw power from the RS232 port and to encode the DCF77 datastream. You are mainly on your own here unless i have a sample of the receiver.</p>
					<li><a href="http://www.meinberg.de">Meinberg clocks</a>
						<p>These implementations are verified by the Meinberg people themselves and i have access to one of these clocks.</p>
				</ul>
		</ul>
		<p>The pictures below refer to the respective clock and where taken from the vendors web pages. They are linked to the respective vendors.</p>
		<ul>
			<li><b><tt>server 127.127.8.0-3 mode 0</tt></b>
				<p><b><tt><a href="http://www.meinberg.de">Meinberg </a>PZF535/<a href="http://www.meinberg.de/english/products/pzf509.htm">PZF509 receiver</a> (FM demodulation/TCXO / 50us)</tt></b><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 1</tt></b>
				<p><b><tt><a href="http://www.meinberg.de">Meinberg </a>PZF535/<a href="http://www.meinberg.de/english/products/pzf509.htm">PZF509 receiver</a> (FM demodulation/OCXO / 50us)</tt></b><br>
					<a href="http://www.meinberg.de/english/products/pzf509.htm"><img src="../pic/pzf509.jpg" alt="BILD PZF509" height="300" width="260" align="top"></a><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 2</tt></b>
				<p><b><tt><a href="http://www.meinberg.de">Meinberg </a>DCF U/A 31/<a href="http://www.meinberg.de/english/products/c51.htm">DCF C51 receiver</a> (AM demodulation / 4ms)</tt></b><br>
					<a href="http://www.meinberg.de/english/products/c51.htm"><img src="../pic/c51.jpg" alt="BILD C51" height="180" width="330" align="top"></a><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 3</tt></b>
				<p><b><tt><a href="http://www.elv.de">ELV</a> DCF7000 (sloppy AM demodulation / 50ms)</tt></b><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 4</tt></b>
				<p><b><tt>Walter Schmid DCF receiver Kit (AM demodulation / 1ms)</tt></b><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 5</tt></b>
				<p><b><tt>RAW DCF77 100/200ms pulses (Conrad DCF77 receiver module / 5ms)</tt></b><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 6</tt></b>
				<p><b><tt>RAW DCF77 100/200ms pulses (TimeBrick DCF77 receiver module / 5ms)</tt></b><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 7</tt></b>
				<p><b><tt><a href="http://www.meinberg.de">Meinberg </a><a href="http://www.meinberg.de/english/products/gps167.htm">GPS166/GPS167 receiver</a> (GPS / &lt;&lt;1us)</tt></b><br>
					<a href="http://www.meinberg.de/english/products/gps167.htm"><img src="../pic/gps167.jpg" alt="BILD GPS167" height="300" width="280" align="top"></a><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 8</tt></b>
				<p><b><tt><a href="http://www.igel.de">IGEL</a> <a href="http://www.igel.de/eigelmn.html">clock</a></tt></b><br>
					<a href="http://www.igel.de/eigelmn.html"><img src="../pic/igclock.gif" alt="IGEL clock" height="174" width="200"></a><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 9</tt></b>
				<p><b><tt><a href="http://www.trimble.com">Trimble</a> <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html">SVeeSix GPS receiver</a>TAIP protocol (GPS / &lt;&lt;1us)</tt></b><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 10</tt></b>
				<p><b><tt><a href="http://www.trimble.com">Trimble</a> <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html">SVeeSix GPS receiver</a> TSIP protocol (GPS / &lt;&lt;1us) (no kernel support yet)</tt></b><br>
					<a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html"><img src="../pic/pd_om011.gif" alt="SVeeSix-CM3" height="100" width="420" align="top" border="0"></a><br>
					<a href="http://www.trimble.com/cgi/omprod.cgi/pd_om006.html"><img src="../pic/pd_om006.gif" alt="Lassen-SK8" height="100" width="420" border="0"></a><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 11</tt></b>
				<p><b><tt>Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support </tt></b><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 12</tt></b>
				<p><b><tt><a href="http://www.hopf-time.com">HOPF</a> <a href="http://www.hopf-time.com/kart6021.html">Funkuhr 6021</a></tt></b><br>
					<a href="http://www.hopf-time.com/engl/kart6021.html"><img src="../pic/fg6021.gif" alt="DCF77-Interface Board" height="207" width="238" align="top"></a><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 13</tt></b>
				<p><b><tt>Diem's Computime Radio Clock</tt></b><br>
				</p>
			<li><b><tt>server 127.127.8.0-3 mode 14</tt></b>
				<p><b><tt>RAWDCF receiver (DTR=high/RTS=low)</tt></b></p>
			<li><b><tt>server 127.127.8.0-3 mode 15</tt></b>
				<p><b><tt>WHARTON 400A Series Clocks with a 404.2 Serial Interface</tt></b></p>
			<li><b><tt>server 127.127.8.0-3 mode 16</tt></b>
				<p><b><tt>RAWDCF receiver (DTR=low/RTS=high) </tt></b></p>
			<li><b><tt>server 127.127.8.0-3 mode 17</tt></b>
				<p><b><tt>VARITEXT Receiver (MSF) </tt></b></p>
		</ul>
		<p>Actual data formats and set-up requirements of the various clocks can be found in <a href="../parsedata.html">NTP PARSE clock data formats</a>.</p>
		<p>The reference clock support carefully monitors the state transitions of the receiver. All state changes and exceptional events such as loss of time code transmission are logged via the syslog facility. Every hour a summary of the accumulated times for the clock states is listed via syslog.</p>
		<p>PPS support is only available when the receiver is completely synchronized. The receiver is believed to deliver correct time for an additional period of time after losing synchronizations, unless a disruption in time code transmission is detected (possible power loss). The trust period is dependent on the receiver oscillator and thus a function of clock type. This is one of the parameters in the clockinfo field of the reference clock implementation. This parameter cannot be configured by ntpdc.</p>
		<br>
		<p>For the Meinberg GPS166/GPS167 receiver is also a special firmware release available (Uni-Erlangen). This release should be used for proper operation.</p>
		<p>The raw DCF77 pulses can be fed via a level converter directly into Pin 3 (Rx) of the Sun. The telegrams will be decoded an used for synchronization. AM DCF77 receivers are running as low as $25. The accuracy is dependent on the receiver and is somewhere between 2ms (expensive) to 10ms (cheap). Upon bad signal reception of DCF77 synchronizations will cease as no backup oscillator is available as usually found in other reference clock receivers. So it is important to have a good place for the DCF77 antenna. For transmitter shutdowns you are out of luck unless you have other NTP servers with alternate time sources available.</p>
		<p>In addition to the PPS loopfilter control a true PPS hardware signal can be utilized via the PPSAPI interface. PPS pulses are usually applied via the CD pin (8) on serial devices. To select PPS support the mode parameter ist the mode value of above plus 128. If 128 is not added to the mode value PPS will be detected to be available but it will not be used.<br>
		</p>
		<h4>Hardware PPS support<br>
		</h4>
		<p>For PPS to be used you MUST add 128 to the mode parameter.</p>
		<h4>Monitor Data</h4>
		<p>Clock states statistics are written hourly the the syslog service. Online information can be found by examining the clock variable via the ntpq cv command.<br>
			Some devices have quite extensive addtional information (GPS16x, Trimble). The driver reads out much of the internal GPS data<br>
			and makes it accessible via clock variables. To find out about additional variable names query for the clock_var_list variable on<br>
			a specific clock association like this:<br>
		</p>
		<pre>ntpq&gt; as<br>
			
			ind assID status  conf reach auth condition  last_event cnt<br>
			
			===========================================================<br>
			
			  1 19556  9154   yes   yes  none falsetick   reachable  5<br>
			
			  2 19557  9435   yes   yes  none  candidat  clock expt  3<br>
			
			  3 19558  9714   yes   yes  none  pps.peer   reachable  1<br>
			
			ntpq&gt; raw<br>
			
			Output set to raw<br>
			
			ntpq&gt; cv 19557 clock_var_list<br>
			
			clock_var_list=&quot;type,timecode,poll,noreply,badformat,baddata,fudgetime1,fudgetime2,stratum,refid,flags,device,clock_var_list,refclock_ppsskew,refclock_ppstime,refclock_time,refclock_status,refclock_format,refclock_states,refclock_id,refclock_iomode,refclock_driver_version,meinberg_gps_status,gps_utc_correction,gps_message,meinberg_antenna_status,gps_tot_51,gps_tot_63,gps_t0a,gps_cfg[1],gps_health[1],gps_cfg[2],gps_health[2],gps_cfg[3],gps_health[3],gps_cfg[4]&quot;<br>
			
			ntpq&gt; cv 19557 refclock_status,refclock_format,refclock_states,refclock_id,refclock_iomode,refclock_driver_version,meinberg_gps_status,gps_utc_correction,gps_message,meinberg_antenna_status,gps_tot_51,gps_tot_63,gps_t0a,gps_cfg[1],gps_health[1],gps_cfg[2],gps_health[2],gps_cfg[3],gps_health[3],gps_cfg[4],gps_cfg[5],gps_health[6],gps_cfg[6],gps_health[7],gps_cfg[7],gps_health[8],gps_cfg[8],gps_health[9],gps_cfg[9],gps_health[9]<br>
			
			status=0x0003,<br>
			
			refclock_status=&quot;UTC DISPLAY; TIME CODE; PPS; POSITION; (LEAP INDICATION; PPS SIGNAL; POSITION)&quot;,<br>
			
			refclock_format=&quot;Meinberg GPS Extended&quot;,<br>
			
			refclock_states=&quot;*NOMINAL: 21:21:36 (99.99%); FAULT: 00:00:03 (0.00%); running time: 21:21:39&quot;,<br>
			
			refclock_id=&quot;GPS&quot;, refclock_iomode=&quot;normal&quot;,<br>
			
			refclock_driver_version=&quot;4.11&quot;,<br>
			
			meinberg_gps_status=&quot;[0x0000] &lt;OK&gt;&quot;,<br>
			
			gps_utc_correction=&quot;current correction 13 sec, last correction on c3710e80.00000000  Fri, Nov 28 2003  0:00:00.000&quot;,<br>
			
			gps_message=&quot;ZIGMER3TN7R9U44:6WWDEK&quot;,<br>
			
			meinberg_antenna_status=&quot;RECONNECTED on 2004-10-29 20:40:03.0000000 (+0000) UTC CORR, LOCAL TIME, reconnect clockoffset +0.0000000 s, disconnect time 0000-00-00 00:00:00.0000000 (+0000) &quot;,<br>
			
			gps_tot_51=&quot;week 1295 + 0 days + 47250.0000000 sec&quot;,<br>
			
			gps_tot_63=&quot;week 1295 + 0 days + 47244.0000000 sec&quot;,<br>
			
			gps_t0a=&quot;week 1295 + 2 days + 60672.0000000 sec&quot;,<br>
			
			gps_cfg[1]=&quot;[0x9] BLOCK II&quot;, gps_health[1]=&quot;[0x0] OK;SIGNAL OK&quot;,<br>
			
			gps_cfg[2]=&quot;[0x0] BLOCK I&quot;, gps_health[2]=&quot;[0x3f] PARITY;MULTIPLE ERRS&quot;,<br>
			
			gps_cfg[3]=&quot;[0x9] BLOCK II&quot;, gps_health[3]=&quot;[0x0] OK;SIGNAL OK&quot;,<br>
			
			gps_cfg[4]=&quot;[0x9] BLOCK II&quot;, gps_cfg[5]=&quot;[0x9] BLOCK II&quot;,<br>
			
			gps_cfg[6]=&quot;[0x9] BLOCK II&quot;, gps_health[6]=&quot;[0x0] OK;SIGNAL OK&quot;,<br>
			
			gps_cfg[7]=&quot;[0x9] BLOCK II&quot;, gps_health[7]=&quot;[0x0] OK;SIGNAL OK&quot;,<br>
			
			gps_cfg[8]=&quot;[0x9] BLOCK II&quot;, gps_health[8]=&quot;[0x0] OK;SIGNAL OK&quot;,<br>
			
			gps_cfg[9]=&quot;[0x9] BLOCK II&quot;, gps_health[9]=&quot;[0x0] OK;SIGNAL OK&quot;<br>
			
			ntpq&gt; <br>
			
			<br>
			
		</pre>
		<pre>Currently raw output is need because of display limitations in ntpq/ntpd - so large lists need<br>
			
			to by retrieved in several queries.<br>
			
		</pre>
		<h4>Fudge Factors</h4>
		<dl>
			<dt><tt>time1 <i>time</i></tt>
			<dd>Specifies the time offset calibration factor, in seconds and fraction, with default depending on clock type.
			<dt><tt>time2 <i>time</i></tt>
			<dd>
				<p>If flag1 is 1 time2<span style="font-family: &quot;verdana&quot;,sans-serif;"> </span>specifies the offset if the PPS signal to the actual time (PPS fine tuning).</p>
			<dd>
				<p>If flag1 is 1 time2 specifies the seconds a receiver with a premium local oscillator can be trusted after loosing synchronisation.</p>
			<dd><br>
			<dt><tt>stratum <span style="font-family: mon;"><span style="font-style: italic;">stratum</span></span></tt>
			<dd>Stratum for this reference clock.
			<dt><tt>refid</tt> <span style="font-style: italic;">refid</span>
			<dd>refid for this clock
		</dl>
		<dl>
			<dt><tt>flag1 0 | 1</tt>
			<dd>when 0 fudge <tt>timeval2</tt> value will refer to the PPS offset. when 1 <tt>timeval2</tt> values will refer to the TRUST TIME.<br>
			<dt><tt>flag2 0 | 1</tt>
			<dd>sample PPS on CLEAR instead on ASSERT if <tt>flag2</tt> is 1<br>
			<dt><tt>flag3 0 | 1</tt>
			<dd>link kernel PPS tracking to this refclock instance if <tt>flag3</tt> is 1<br>
			<dt><tt>flag4 0 | 1</tt>
			<dd>Delete next leap second instead of adding it. (You'll need to wait a bit for that to happen 8-)
			<dt><br>
		</dl>
		<span style="font-weight: bold;">Note about auxiliary SUN STREAMS modules (SunOS and Solaris):</span><br>
		<dl>
			<dt>The timecode of these receivers used to be sampled via a STREAMS module in the kernel (The STREAMS module has been designed for use with SUN Systems under SunOS 4.1.x or Solaris 2.3 - 2.8. It can be linked directly into the kernel or loaded via the loadable driver mechanism). This STREAMS module can be adapted to be able to convert different time code formats. Today the PPSAPI mechanism can be used. There is no real need for the STREAMS modules any more.<br>
		</dl>
		<h4>Making your own PARSE clocks</h4>
		<p>The parse clock mechanismis deviated from the way other ntp reference clocks work. For a short description how to build parse reference clocks see <a href="../parsenew.html">making PARSE clocks</a></p>
		<p>Additional Information</p>
		<p><a href="../refclock.html">Reference Clock Drivers</a></p>
		<hr>
		<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
	</body>

</html>