<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title>JJY Receivers</title>
<link rev="made" href="http://www.bea.hi-ho.ne.jp/abetakao/">
<link rel="start" href="http://www.eecis.udel.edu/~mills/ntp/html/refclock.html">
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>JJY Receivers</h3>
<p>Last update:
<!-- #BeginDate format:En2m -->12-Oct-2017 09:05<!-- #EndDate -->
UTC <a href="driver40.html">ENGLISH</a> <a href="driver40-ja.html">JAPANESE</a></p>
<hr>
<h4>Synopsis</h4>
Address: 127.127.40.<em>u</em><br>
Reference ID: <code>JJY</code><br>
Driver ID: <code>JJY</code><br>
Serial Port: <code>/dev/jjy<em>u</em></code>; See corresponding receiver
<h4>Description</h4>
<p>This driver supports the following the JJY receivers and the GPS clock sold in Japan, and the time service through a telephone line.
</p>
<table width="100%">
<tr>
<td width="50%" style="vertical-align:top;">
<a href="#mode-1">Tristate Ltd. TS-JJY01, TS-JJY02</a><br>
<a href="#mode-2">C-DEX Co.,Ltd. JST2000</a><br>
<a href="#mode-3">Echo Keisokuki Co.,Ltd. LT-2000</a><br>
<a href="#mode-4">CITIZEN T.I.C. CO.,LTD. JJY-200</a><br>
<a href="#mode-5">Tristate Ltd. TS-GPSclock-01</a><br>
</td>
<td width="50%" style="vertical-align:top; border-left:solid; padding:0px 0px 0px 10px;">
<a href="#mode-6">SEIKO TIME SYSTEMS INC. TDC-300</a><br>
<a href="#mode-100">Telephone JJY</a><br>
</td>
</tr>
</table>
<ul>
<li>
<p><a name="mode-1">Tristate Ltd. TS-JJY01, TS-JJY02</a> <a href="http://www.tristate.ne.jp/">http://www.tristate.ne.jp/</a> (Japanese only)</p><br>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server 127.127.40.X mode 1</dt>
<dd><br></dd>
<dt>fudge 127.127.40.X time1 0.NNN flag1 0|1</dt>
<dd>
<p>Time1 may specify a constant to be added to the time offset for the time from the receiver, a fixed-point decimal number in seconds. You may specify the time offset from several tens of milli-seconds ( 0.0NN seconds ) to a hundred and several tens of milli-seconds ( 0.1NN seconds ) for this clock.</p>
<p>Flag1 has no effect for time synchronization. When flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into the clockstats file.</p>
<table border="1" summary="fudge flag1">
<tr><td>0 (Default)</td><td>DCST and STUS commands are not issued</td></tr>
<tr><td>1</td><td>DCST and STUS commands are issued</td></tr>
</table>
</dd>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C, 9600 BPS, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>Command</td>
<td> --> </td>
<td>Reply</td>
</tr>
<tr>
<td><code>dcst{CR}{LF}</code></td>
<td> --> </td>
<td><code>valid{CR}{LF} | invalid{CR}{LF}</code></td>
</tr>
<tr>
<td><code>stus{CR}{LF}</code></td>
<td> --> </td>
<td><code>adjusted{CR}{LF} | unadjusted{CR}{LF}</code></td>
</tr>
<tr>
<td><code>time{CR}{LF}</code></td>
<td> --> </td>
<td><code>HH:MM:SS{CR}{LF}</code></td>
</tr>
<tr>
<td><code>date{CR}{LF}</code></td>
<td> --> </td>
<td><code>YYYY/MM/DD WWW{CR}{LF}</code></td>
</tr>
<tr>
<td><code>stim{CR}{LF}</code></td>
<td> --> </td>
<td><code>HH:MM:SS{CR}{LF}</code></td>
</tr>
</table>
<p>The date and time are requested separately. The time is requested before and after the date request to check uncertainty of the date whether it's before or after midnight.</p><br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-2">C-DEX Co.,Ltd. JST2000</a> <a href="http://www.c-dex.co.jp/">http://www.c-dex.co.jp/</a> (Japanese only)</p><br>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server 127.127.40.X mode 2</dt>
<dd><br></dd>
<dt>fudge 127.127.40.X time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C, 9600 BPS, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>Command</td>
<td> --> </td>
<td>Reply</td>
</tr>
<tr>
<td><code>{ENQ}1J{ETX}</code></td>
<td> --> </td>
<td><code>{STX}JYYMMDDWHHMMSSS{ETX}</code></td>
</tr>
</table>
<br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-3">Echo Keisokuki Co.,Ltd. LT-2000</a> <!-- a href="http://www.clock.co.jp/" --></p><br>
<p>Echo Keisokuki was dissolved. Some business of the company was taken over by FreqTime Co., Ltd. in July, 2015.</p><br>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server 127.127.40.X mode 3</dt>
<dd><br></dd>
<dt>fudge 127.127.40.X time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C, 9600 BPS, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>Command</td>
<td> --> </td>
<td>Reply</td>
</tr>
<tr>
<td><code>C</code></td>
<td> --> </td>
<td>( Mode 2 : Continuous )</td>
</tr>
<tr>
<td>( Every second before 0.5 second )</td>
<td></td>
<td><code>YYMMDDWHHMMSS{ST1}{ST2}{ST3}{ST4}{CR}</code></td>
</tr>
<tr>
<td><code>#</code></td>
<td> --> </td>
<td>( Mode 1 : Request&Send )</td>
</tr>
</table>
<br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-4">CITIZEN T.I.C. CO.,LTD. JJY-200</a> <a href="http://www.tic-citizen.co.jp/">http://www.tic-citizen.co.jp/</a> (Japanese only)</p><br>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server 127.127.40.X mode 4</dt>
<dd><br></dd>
<dt>fudge 127.127.40.X time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C, 4800 BPS, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>Command</td>
<td> --> </td>
<td>Reply</td>
</tr>
<tr>
<td>( Every second )</td>
<td></td>
<td><code>'XX YY/MM/DD W HH:MM:SS{CR}</code></td>
</tr>
</table>
<br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-5">Tristate Ltd. TS-GPSclock-01</a> <a href="http://www.tristate.ne.jp/">http://www.tristate.ne.jp/</a> (Japanese only)</p>
<p>This driver supports the Tristate TS-GPSclock-01 in command/response mode, though it is a GPS clock, not JJY radio clock. Using the menus and the onboard switches, the TS-GPSclock-01 should be set to command/response mode and JST time zone.<br>
Besides this driver ( Type 40 ), <a href="driver20.html">the generic NMEA GPS driver ( Type 20 )</a> supports the TS-GPSclock-01 in NMEA mode.</p>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server 127.127.40.X mode 5</dt>
<dd><br></dd>
<dt>fudge 127.127.40.X time1 0.NNN flag1 0|1</dt>
<dd>
<p>Time1 may specify a constant to be added to the time offset for the time from the receiver, a fixed-point decimal number in seconds.</p>
<p>Flag1 has no effect for time synchronization. When a flag1 is set to 1, status command is issued before DATE and TIME commands, and write a response text into a clockstats file.</p>
<table border="1" summary="fudge flag1">
<tr><td>0 (Default)</td><td>STUS command is not issued</td></tr>
<tr><td>1</td><td>STUS command is issued</td></tr>
</table>
</dd>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>USB ( /dev/ttyACM<em>0</em> )</p>
<br>
</dd>
<dt>Time code format</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>Command</td>
<td> --> </td>
<td>Reply</td>
</tr>
<tr>
<td><code>stus{CR}{LF}</code></td>
<td> --> </td>
<td><code>*R{CR}{LF} | *G{CR}{LF} | *U{CR}{LF} | +U{CR}{LF}</code></td>
</tr>
<tr>
<td><code>time{CR}{LF}</code></td>
<td> --> </td>
<td><code>HH:MM:SS{CR}{LF}</code></td>
</tr>
<tr>
<td><code>date{CR}{LF}</code></td>
<td> --> </td>
<td><code>YYYY/MM/DD{CR}{LF}</code></td>
</tr>
<tr>
<td><code>time{CR}{LF}</code></td>
<td> --> </td>
<td><code>HH:MM:SS{CR}{LF}</code></td>
</tr>
</table>
<p>The date and time are requested separately. The time is requested before and after the date request to check uncertainty of the date whether it's before or after midnight.</p><br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-6">SEIKO TIME SYSTEMS INC. TDC-300</a> <a href="http://www.seiko-sts.co.jp/">http://www.seiko-sts.co.jp/</a> (English and Japanese)</p><br>
<p>The TDC-300 must be set to the type 3 data format using the front panel menu display and the switches.</p>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server 127.127.40.X mode 6</dt>
<dd><br></dd>
<dt>fudge 127.127.40.X time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C, 2400 BPS, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>Command</td>
<td> --> </td>
<td>Reply</td>
</tr>
<tr>
<td></td>
<td></td>
<td><code>{STX}YYMMDDWHHMMSS{ETX}</code></td>
</tr>
<tr>
<td>( 5 to 10 mSec. before second )</td>
<td></td>
<td><code>{STX}{xE5}{ETX}</code></td>
</tr>
</table>
<br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-100">Telephone JJY</a> <a href="http://jjy.nict.go.jp/">http://jjy.nict.go.jp/</a> (English and Japanese)</p>
<p>The telephone JJY is the time service through a public telephone line.<br>
The service is provided by the National Institute of Information and Communications Technology in Japan.</p>
<p>ATTENTION; This mode, the telephone JJY, can not be used with the refclock_acts ( type 18 ) at the same time.
Because the "phone" statement in the ntp configuration file is not involved with the "server" statement,
so the both the refclock_acts ( type 18 ) and this refclock_jjy ( type 40, mode 100 to 180 ) can not recognize the appropriate "phone" statement among the "phone" statements.</p>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server 127.127.40.X mode (100, 101 to 180) minpoll N</dt>
<dd>
<p>The mode 100 is specified, this driver does not issue the loopback command in order to measure the delay, and the delay of the telephone line and the system processing is not adjusted.<br>
The mode 101 to 180 is specified, this driver issues the loopback command and measures the delay of the telephone line and the system processing through the Telphone JJY loopback circuit.<br>
The round trip time through the Telphone JJY loopback circuit is measured 5 times, and each delay time is greater than 700 milli-seconds,
that delay time is ignored during average delay time calculation. Also, if the valid delay time ( <= 700 mS. ) is measured more than 3 times, the maximum delay time among the valid delay times is ignored,
and if the valid delay time is measured more than 4 times, the minimum delay time among them is ignored, like marking/grading sports judgment.<br>
The adjustment time is calculated by the formula,<br>
multiply ( the measured round trip time ) by ( ( the mode number ) - 100 ) %,<br>
and the adjustment delay time is added to the syncronizing time.<br>
If you choose the automatic delay ajustment, in other words, the mode 101 to 180 is specifed, the recommended mode number is 145 to 165.</p>
<p>The default polling interval 6 ( 64 seconds ) is too short for this mode. The "minpoll" should be set to greater than or equal to 8 ( 256 seconds, about 4 minutes ).<br>
The interval time is given the value in second power of 2. The minpoll value 12 is 4096 seconds interval ( about 1 hour ), 14 is 16384 seconds interval ( about 4.5 hours ), 16 is 65536 seconds ( about 18 hours ), respectively.</p><br>
</dd>
<dt>fudge 127.127.40.X flag1 0|1 flag2 0|1 flag3 0|1 flag4 0|1</dt>
<dd>
<p>Time1 may specify a constant to be added to the time offset for the time from the receiver, a fixed-point decimal number in seconds.<br>
When the mode 100 is specified, the time1 may be specified in order to adjust the time offset.<br>
When the mode 101 to 180 is specified, the time1 should not be specified because this driver adds some percentage of the measured loopback delay, depending on the value of the mode number.</p>
<div style="text-align:left;">Flag1 is the modem dialing type.</div>
<table border="1" summary="fudge flag1">
<tr><td>0 (Default)</td><td>Tone</td><td>ATDWTnn...nn</td></tr>
<tr><td>1</td><td>Pulse</td><td>ATDWPnn...nn</td></tr>
</table>
<br>
<div style="text-align:left;">Flag2 is the modem error correction type.</div>
<table border="1" summary="fudge flag2">
<tr><td>0 (Default)</td><td>Normal</td><td>AT\N0</td></tr>
<tr><td>1</td><td>Auto V42, MNP, Normal</td><td>AT\N3</td></tr>
</table>
<br>
<div style="text-align:left;">Flag3 is the modem speaker switch.</div>
<table border="1" summary="fudge flag3">
<tr><td>0 (Default)</td><td>Off</td><td>ATM0Ln</td></tr>
<tr><td>1</td><td>On</td><td>ATM2Ln</td></tr>
</table>
<br>
<div style="text-align:left;">Flag4 is the modem speaker volume.</div>
<table border="1" summary="fudge flag4">
<tr><td>0 (Default)</td><td>Low</td><td>ATMnL1</td></tr>
<tr><td>1</td><td>Middle</td><td>ATMnL2</td></tr>
</table>
<br>
</dd>
<dt>phone 042NNNNNNN</dt>
<dd>
<p>The phone number is available at <a href="http://jjy.nict.go.jp/">http://jjy.nict.go.jp/</a><br>
The number of digits of the phone number is checked. If the international access number and the country number are added in order to call from outside of Japan, the number of digits is over the limit.<br>
The first 2 or 3 digits are checked. The emergency service number and the special service number in Japan are not allowed.<br>
Calling from extension line, the number for an outside line should be prefix "0," ( Zero, Comma ). The prefix is also checked, and no other outside access number is allowed.</p>
</dd>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C or USB, 2400 BPS, 8-bits, no parity, 1 stop bit</p>
<p>Modem control commands:<br>
<code>ATE0Q0V1, ATMnLn, AT&K4, AT+MS=V22B, AT%C0, AT\Nn, ATH1, ATDWxnn...nn</code><br>
<code>+++, ATH0</code></p>
<br>
</dd>
<dt>Time code format</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>Prompt</td>
<td> --> </td>
<td>Command</td>
<td> --> </td>
<td>Reply</td>
</tr>
<tr>
<td><code>Name{SP}?{SP}</code></td>
<td> --> </td>
<td><code>TJJY{CR}</code></td>
<td> --> </td>
<td>Welcome messages</td>
</tr>
<tr>
<td><code>></code></td>
<td> --> </td>
<td><code>LOOP{CR}</code></td>
<td> --> </td>
<td>( Switch to the loopback circuit )</td>
</tr>
<tr>
<td><code> </code></td>
<td> </td>
<td><code>( One char. )</code></td>
<td> --> </td>
<td><code>( One char. )</code></td>
</tr>
<tr>
<td><code> </code></td>
<td> </td>
<td><code>COM{CR}</code></td>
<td> --> </td>
<td>( Exit from the loopback circuit )</td>
</tr>
<tr>
<td><code>></code></td>
<td> --> </td>
<td><code>TIME{CR}</code></td>
<td> --> </td>
<td><code>HHMMSS{CR}HHMMSS{CR}HHMMSS{CR}</code> 3 times on second</td>
</tr>
<tr>
<td><code>></code></td>
<td> --> </td>
<td><code>4DATE{CR}</code></td>
<td> --> </td>
<td><code>YYYYMMDD{CR}</code></td>
</tr>
<tr>
<td><code>></code></td>
<td> --> </td>
<td><code>LEAPSEC{CR}</code></td>
<td> --> </td>
<td><code>{SP}0{CR} | +1{CR} | -1{CR}</code></td>
</tr>
<tr>
<td><code>></code></td>
<td> --> </td>
<td><code>TIME{CR}</code></td>
<td> --> </td>
<td><code>HHMMSS{CR}HHMMSS{CR}HHMMSS{CR}</code> 3 times on second</td>
</tr>
<tr>
<td><code>></code></td>
<td> --> </td>
<td><code>BYE{CR}</code></td>
<td> --> </td>
<td>Sayounara messages</td>
</tr>
</table>
<p>The date and time are requested separately. The time is requested before and after the date request to check uncertainty of the date whether it's before or after midnight.<br>
The leap second is not handled, and only written in the clockstats file as an information.</p>
<br>
</dd>
</dl>
</li>
</ul>
<p>The JJY is the radio station which transmits the JST (Japan Standard Time) in long wave radio. The station JJY is operated by the National Institute of Information and Communications Technology.
An operating announcement and some information are available from <a href="http://www.nict.go.jp/">http://www.nict.go.jp/</a> (English and Japanese) and <a href="http://jjy.nict.go.jp/">http://jjy.nict.go.jp/</a> (English and Japanese)</p>
<p>The user is expected to provide a symbolic link to an available serial port device. This is typically performed by a command such as;</p>
<p><code>ln -s /dev/ttyS0 /dev/jjy0</code></p>
<p>Using an RS-232C to USB converter cable, the clock or a modem can be connected to a USB port instead of a serial port. In this case, the typical symbolic link command is as follows;</p>
<p><code>ln -s /dev/ttyUSB0 /dev/jjy0</code></p>
<p>Windows NT does not support symbolic links to device files. COM<em>X</em>: is the unit used by the driver, based on the refclock unit number, where unit 1 corresponds to COM1: and unit 3 corresponds to COM3:</p>
<h4>Monitor Data</h4>
<p>The driver writes sent and received data to/from the JJY receivers, GPS clock, and the modem into the <code>clockstats</code> file.</p>
<p><code>
statsdir /var/log/ntpd/<br>
filegen clockstats file clockstats type day enable
</code></p>
<div style="text-align:left;">Mark of the clockstats record</div>
<table border="1" summary="Clockstats">
<tr><td><code>JJY</code> </td><td>Infomation message ( This refclock starts or stops. )</td></tr>
<tr><td><code>--></code> </td><td>Sent data</td></tr>
<tr><td><code><--</code> </td><td>Received data</td></tr>
<tr><td><code>---</code> </td><td>Infomation message</td></tr>
<tr><td><code>===</code> </td><td>Infomation message ( Start of each polling, and sync. time. )</td></tr>
<tr><td><code>-W-</code> </td><td>Warning message</td></tr>
<tr><td><code>-X-</code> </td><td>Error message</td></tr>
</table>
<h4>Fudge Factors</h4>
<dl>
<dt><code>time1 <em>time</em></code></dt>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
<dt><code>time2 <em>time</em></code></dt>
<dd>Not used by this driver.
<dt><code>stratum <em>number</em></code></dt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
<dt><code>refid <em>string</em></code></dt>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <code>JJY</code>.</dd>
<dt><code>flag1 0 | 1</code></dt>
<dd>See corresponding receiver.</dd>
<dt><code>flag2 0 | 1</code></dt>
<dd>See corresponding receiver.</dd>
<dt><code>flag3 0 | 1</code></dt>
<dd>See corresponding receiver.</dd>
<dt><code>flag4 0 | 1</code></dt>
<dd>See corresponding receiver.</dd>
</dl>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</html>