2 include::include-html.ad[]
6 ["verse",subs="normal"]
9 Serial Port: +/dev/jjyu+; See corresponding receiver
13 Some modes of this driver report only two-digit years, and are thus
14 reliant on the system clock to be near correct before samples will be
15 processed properly. You will not be able to use them to run
16 autonomously, nor will it reliably recover from a trashed or zeroed
21 This driver supports the following the JJY receivers and the GPS clock
22 sold in Japan, and the time service through a telephone line.
24 [width="100%",cols="<50%,<50%",]
25 |=================================================
26 |link:#subtype-1[Tristate Ltd. TS-JJY01, TS-JJY02] |link:#subtype-6[SEIKO TIME SYSTEMS INC. TDC-300]
27 |link:#subtype-2[C-DEX Co.,Ltd. JST2000] |link:#subtype-100[Telephone JJY]
28 |link:#subtype-3[Echo Keisokuki Co.,Ltd. LT-2000] |
29 |link:#subtype-4[CITIZEN T.I.C. CO.,LTD. JJY-200] |
30 |link:#subtype-5[Tristate Ltd. TS-GPSclock-01] |
31 |=================================================
33 * [[subtype-1]]Tristate Ltd. TS-JJY01, TS-JJY02 https://www.tristate.ne.jp/ (Japanese only)
35 NTP configuration ({ntpconf})::
38 `refclock` _jjy_ `unit` _X_ `subtype` _1_ `time1` _0.NNN_ `flag1 {0 | 1}`;;
39 `time1` may specify a constant to be added to the time offset for the
40 time from the receiver, a fixed-point decimal number in seconds. You
41 may specify the time offset from several tens of milliseconds (0.0NN
42 seconds) to a hundred and several tens of milliseconds (0.1NN seconds)
44 `flag1` has no effect for time synchronization. When `flag1` is set to
45 1, status commands are issued before `DATE` and `STIM` commands, and
46 write a response text into the `clockstats` file.
48 [width="100%",cols="<50%,<50%",]
49 |====================================
50 |0 (Default) | `DCST` and `STUS` commands are not issued
51 |1 | `DCST` and `STUS` commands are issued
52 |====================================
56 RS-232C, 9600 bps, 8-bits, no parity, 1 stop bit;;
60 [width="100%",cols="<25%,<10%,<65%",]
61 |==================================================
62 |Command | -\-> |Reply
63 |`dcst{CR}{LF}`| -\-> |`valid{CR}{LF} \| invalid{CR}{LF}`
64 |`stus{CR}{LF}`| -\-> |`adjusted{CR}{LF} \| unadjusted{CR}{LF}`
65 |`time{CR}{LF}`| -\-> |`HH:MM:SS{CR}{LF}`
66 |`date{CR}{LF}`| -\-> |`YYYY/MM/DD WWW{CR}{LF}`
67 |`stim{CR}{LF}`| -\-> |`HH:MM:SS{CR}{LF}`
68 |==================================================
70 The date and time are requested separately. The time is requested
71 before and after the date request to check uncertainty of the date
72 whether it's before or after midnight.
74 * [[subtype-2]]C-DEX Co.,Ltd. JST2000 http://www.c-dex.co.jp/ (Japanese only)
76 NTP configuration ({ntpconf})::
79 `refclock` _jjy_ `unit` _X_ `subtype` _2_ `time1` _0.NNN_;;
83 RS-232C, 9600 bps, 8-bits, no parity, 1 stop bit;;
87 [width="100%",cols="<25%,<10%,<65%",]
88 |==================================================
89 |Command | -\-> |Reply
90 |`{ENQ}1J{ETX}`| -\-> |`{STX}JYYMMDDWHHMMSSS{ETX}`
91 |==================================================
93 * [[subtype-3]]Echo Keisokuki Co.,Ltd. LT-2000
95 NTP configuration ({ntpconf})::
98 `refclock` _jjy_ `unit` _X_ `subtype` _3_ `time1` _0.NNN_;;
102 RS-232C, 9600 bps, 8-bits, no parity, 1 stop bit;;
106 [width="100%",cols="<25%,<10%,<65%",]
107 |==================================================
108 |Command | -\-> |Reply
109 |C | -\-> | (Subtype 2: Continuous)
110 |(Every second before 0.5 second)| | `YYMMDDWHHMMSS{ST1}{ST2}{ST3}{ST4}{CR}`
111 |# | -\-> | (Subtype 1: Request & Send)
112 |==================================================
114 Note: Echo Keisokuki has been dissolved. Some business of the company was taken over by FreqTime Co., Ltd. in July, 2015.
116 * [[subtype-4]]CITIZEN T.I.C. CO.,LTD. JJY-200 http://www.tic-citizen.co.jp/ (Japanese only)
118 NTP configuration ({ntpconf})::
121 `refclock` _jjy_ `unit` _X_ `subtype` _4_ `time1` _0.NNN_;;
125 RS-232C, 4800 bps, 8-bits, no parity, 1 stop bit;;
129 [width="100%",cols="<25%,<10%,<65%",]
130 |==================================================
131 |Command | -\-> |Reply
132 |(Every second)| -\-> |`XX YY/MM/DD W HH:MM:SS{CR}`
133 |==================================================
135 * [[subtype-5]]Tristate Ltd. TS-GPSclock-01 https://www.tristate.ne.jp/ (Japanese only)
137 This driver supports the Tristate TS-GPSclock-01 in command/response
138 subtype, though it is a GPS clock, not JJY radio clock. Using the
139 menus and the onboard switches, the TS-GPSclock-01 should be set to
140 command/response mode and JUST time zone.
142 Besides this driver, link:driver_nmea.html[the generic NMEA
143 GPS driver] supports the TS-GPSclock-01 in NMEA mode.
145 NTP configuration ({ntpconf})::
148 `refclock` _jjy_ `unit` _X_ `subtype` _5_ `time1` _0.NNN_ `flag1 {0 | 1}`;;
149 `time1` may specify a constant to be added to the time offset for the
150 time from the receiver, a fixed-point decimal number in seconds. +
151 `flag1` has no effect for time synchronization. When a `flag1` is set to
152 1, status command is issued before `DATE` and `TIME` commands, and write
153 a response text into a `clockstats` file.
155 [width="100%",cols="<50%,<50%",]
156 |=========================
157 |0 (Default)|`STUS` command is not issued
158 |1 |`STUS` command is issued
159 |=========================
163 USB (/dev/ttyACM_0_);;
167 [width="100%",cols="<25%,<10%,<65%",]
168 |==================================================
169 |Command | -\-> |Reply
170 |`stus{CR}{LF}`| -\-> |`*R{CR}{LF} \| *G{CR}{LF} \| *U{CR}{LF} \| +U{CR}{LF}`
171 |`time{CR}{LF}`| -\-> |`HH:MM:SS{CR}{LF}`
172 |`date{CR}{LF}`| -\-> |`YYYY/MM/DD{CR}{LF}`
173 |`time{CR}{LF}`| -\-> |`HH:MM:SS{CR}{LF}`
174 |==================================================
176 The date and time are requested separately. The time is requested
177 before and after the date request to check uncertainty of the date
178 whether it's before or after midnight.
180 * [[subtype-6]]SEIKO TIME SYSTEMS INC. TDC-300 https://www.seiko-sts.co.jp/ (English and Japanese)
182 The TDC-300 must be set to the type 3 data format using the front panel
183 menu display and the switches.
185 NTP configuration ({ntpconf})::
188 `refclock` _jjy_ `unit` _X_ `subtype` _6_ `time1` _0.NNN_;;
192 RS-232C, 2400 bps, 8-bits, no parity, 1 stop bit;;
196 [width="100%",cols="<25%,<10%,<65%",]
197 |==================================================
198 |Command | -\-> |Reply
199 | | -\-> |`{STX}YYMMDDWHHMMSS{ETX}`
200 |(5 to 10 mSec. before second)| -\-> |`{STX}{xE5}{ETX}`
201 |==================================================
203 * [[subtype-100]]Telephone JJY http://jjy.nict.go.jp/ (English and Japanese)
205 The telephone JJY is the time service through a public telephone line. +
206 The service is provided by the National Institute of Information and
207 Communications Technology in Japan.
209 ATTENTION; This subtype, the telephone JJY, can not be used with the
210 refclock_modem driver at the same time. Because the `phone`
211 statement in the configuration file is not involved with the
212 `server` statement, so the both the refclock_modem and this
213 refclock_jjy (subtype 100 to 180) can not recognize the
214 appropriate `phone` statement among the `phone` statements.
216 NTP configuration ({ntpconf})::
219 `refclock` _jjy_ `unit` _X_ `subtype` _(100, 101 to 180)_ `minpoll` _N (N >= 8)_;;
220 The subtype 100 is specified, this driver does not issue the loopback
221 command in order to measure the delay, and the delay of the
222 telephone line and the system processing is not adjusted.
224 The subtype 101 to 180 is specified, this driver issues the loopback
225 command and measures the delay of the telephone line and the system
226 processing through the Telephone JJY loopback circuit.
228 The round trip time through the Telephone JJY loopback circuit is
229 measured 5 times, and each delay time is greater than 700
230 milliseconds, that delay time is ignored during average delay time
231 calculation. Also, if the valid delay time (<= 700 ms) is
232 measured more than 3 times, the maximum delay time among the valid
233 delay times is ignored, and if the valid delay time is measured more
234 than 4 times, the minimum delay time among them is ignored, like
235 marking/grading sports judgment.
237 The adjustment time is calculated by the formula, multiply (the
238 measured round trip time) by ((the subtype number) - 100) %,
239 and the adjustment delay time is added to the synchronizing time.
241 If you choose the automatic delay adjustment, in other words, the subtype
242 101 to 180 is specified, the recommended subtype number is 145 to 165.
244 The default polling interval 6 (64 seconds) is too short for this
245 subtype. The `minpoll` should be set to greater than or equal to 8 (256
246 seconds, about 4 minutes).
248 The interval time is given the value in second power of 2. The
249 minpoll value 12 is 4096 seconds interval (about 1 hour), 14 is
250 16384 seconds interval (about 4.5 hours), 16 is 65536 seconds (about
251 18 hours), respectively.
253 `flag1 {0 | 1}` `flag2` _{0|1}_ `flag3` _{0|1}_ `flag4` _{0|1}_;;
254 `time1` may specify a constant to be added to the time offset for
255 the time from the receiver, a fixed-point decimal number in
256 seconds. When the subtype 100 is specified, the `time1` may be
257 specified in order to adjust the time offset. When the subtype 101
258 to 180 is specified, the `time1` should not be specified because
259 this driver adds some percentage of the measured loopback delay,
260 depending on the value of the subtype number.
262 .Flag1 is the modem dialing type
263 [width="100%",cols="<34%,<33%,<33%",]
264 |=================================
265 |0 (Default)|Tone |`ATDWTnn...nn`
266 |1 |Pulse|`ATDWPnn...nn`
267 |=================================
269 .Flag2 is the modem error correction type.
270 [width="100%",cols="<34%,<33%,<33%",]
271 |=======================================
272 |0 (Default)|Normal |`AT\N0`
273 |1 |Auto V42, MNP, Normal|`AT\N3`
274 |=======================================
276 .Flag3 is the modem speaker switch.
277 [width="100%",cols="<34%,<33%,<33%",]
278 |=======================================
279 |0 (Default)|Off |`ATM0Ln`
281 |=======================================
283 .Flag4 is the modem speaker volume.
284 [width="100%",cols="<34%,<33%,<33%",]
285 |=======================================
286 |0 (Default) |Low |`ATMnL1`
288 |=======================================
290 `phone` _042NNNNNNN_;;
291 The phone number is available at http://jjy.nict.go.jp/time/teljjy (Japanese and English) +
292 The number of digits of the phone number is checked. If the
293 international access number and the country number are added in
294 order to call from outside of Japan, the number of digits is over
297 The first 2 or 3 digits are checked. The emergency service number
298 and the special service number in Japan are not allowed.
300 Calling from extension line, the number for an outside line should
301 be prefix "0," (Zero, Comma). The prefix is also checked, and no
302 other outside access number is allowed.
306 RS-232C or USB, 2400 bps, 8-bits, no parity, 1 stop bit;;
307 Modem control commands:;;
309 +ATE0Q0V1, ATMnLn, AT&K4, AT+MS=V22B, AT%C0, AT\Nn, ATH1, ATDWxnn...nn `+++`, ATH0+;;
313 [width="100%",cols="<15%,<10%,<15%,<10%,<50%",]
314 |==================================================
315 |Prompt | -\-> |Command | -\-> |Reply
316 |`Name{SP}?{SP}`| -\-> |`TJJY{CR}` | -\-> |Welcome messages
317 |> | -\-> |`LOOP{CR}` | -\-> |(Switch to the loopback circuit)
318 | | -\-> |(One char.) | -\-> |(One char.)
319 | | -\-> |`COM{CR}` | -\-> |(Exit from the loopback circuit)
320 |> | -\-> |`TIME{CR}` | -\-> |`HHMMSS{CR}HHMMSS{CR}HHMMSS{CR}` 3 times on second
321 |> | -\-> |`4DATE{CR}` | -\-> |`YYYYMMDD{CR}`
322 |> | -\-> |`LEAPSEC{CR}`| -\-> |`{SP}0{CR}` \| `+1{CR}` \| `-1{CR}`
323 |> | -\-> |`TIME{CR}` | -\-> |`HHMMSS{CR}HHMMSS{CR}HHMMSS{CR}` 3 times on second
324 |> | -\-> |`BYE{CR}` | -\-> |Sayounara messages
325 |==================================================
327 The date and time are requested separately. The time is requested
328 before and after the date request to check uncertainty of the date
329 whether it's before or after midnight.
331 The leap second is not handled, and only written in the clockstats
335 JJY is the radio station that transmits JST (Japan Standard
336 Time) in long wave radio. The JJY station is operated by the National
337 Institute of Information and Communications Technology. An operating
338 announcement and some information are available from
339 http://jjy.nict.go.jp/ (Japanese and English).
341 The user is expected to provide a symbolic link to an available serial
344 ----------------------------------------------------------------
345 ln -s /dev/ttyS0 /dev/jjy0
346 ----------------------------------------------------------------
348 Using an RS-232C to USB converter cable, the clock or a modem can be
349 connected to a USB port instead of a serial port with this symbolic
352 ----------------------------------------------------------------
353 ln -s /dev/ttyUSB0 /dev/jjy0
354 ----------------------------------------------------------------
358 The driver writes sent and received data to/from the JJY receivers, GPS
359 clock, and the modem into the +clockstats+ file.
362 ----------------------------------------------------------------
363 statsdir /var/log/ntpd/
364 filegen clockstats file clockstats type day enable
365 ----------------------------------------------------------------
367 .Mark of the clockstats record
368 [width="100%",cols="<50%,<50%",]
369 |============================================================
370 |+JJY+ | Information message (This refclock starts or stops.)
372 |+<--+ | Received data
373 |+---+ | Information message
374 |+===+ | Information message (Start of each polling, and sync. time.)
375 |+-W-+ | Warning message
376 |+-X-+ | Error message
377 |============================================================
382 The driver unit number, defaulting to 0. Used as a distinguishing
383 suffix in the driver device name.
385 Specifies the time offset calibration factor, in seconds and fraction,
388 Not used by this driver.
390 Specifies the driver stratum, in decimal from 0 to 15, with default 0.
392 Specifies the driver reference identifier, an ASCII string from one to
393 four characters, with default +JJY+.
395 See corresponding receiver.
397 See corresponding receiver.
399 See corresponding receiver.
401 See corresponding receiver.
403 Used to select a device type and serial parameters.
405 Synonym for subtype, retained for backward compatibility.
407 Not used by this driver.
408 +ppspath+ 'filename'::
409 Not used by this driver.
411 Not used by this driver. The subtype implies the baud rate.
413 == Configuration Examples
415 See the examples in the Description section.
419 include::includes/footer.adoc[]