xref: /openbsd/share/man/man4/msts.4 (revision d415bd75)
1.\"	$OpenBSD: msts.4,v 1.4 2015/01/15 00:48:10 deraadt Exp $
2.\"
3.\" Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: January 15 2015 $
18.Dt MSTS 4
19.Os
20.Sh NAME
21.Nm msts
22.Nd Meinberg Standard Time String timedelta sensor
23.Sh SYNOPSIS
24.Cd "pseudo-device msts" Op Ar count
25.Sh DESCRIPTION
26This line discipline interfaces serial Meinberg devices.
27.Pp
28The line discipline is enabled by the following sequence:
29.Bd -literal -offset indent
30#include <sys/ioctl.h>
31int ldisc = MSTSDISC, fildes; ...
32ioctl(fildes, TIOCSETD, &ldisc);
33.Ed
34.Pp
35The byte stream is unaltered by the line discipline which
36maintains a timedelta sensor using the MSTS data.
37The timedelta sensor will appear as msts* in the list of sensors and the delta
38(in nanoseconds) between the received time information and the local time can
39be accessed through the
40.Xr sysctl 8
41interface.
42.Pp
43The Meinberg radio clocks use the following default baudrates:
44.Pp
45.Bl -tag -width "GPS-receivers (external and PCI, COM0)XXX" -offset indent -compact
46.It GPS-receivers (external and PCI, COM0)
4719200/8N1
48.It GPS-receivers (external, COM1)
499600/8N1
50.It DCF77-receivers (external)
519600/7E2
52.It DCF77-receivers (PCI)
534800/8N1
54.El
55.Sh SENSOR STATES
56The quality of the timedelta is reported as the sensor status:
57.Bl -tag -width "CRITICALXX" -offset indent
58.It OK
59The time information is valid.
60The timedelta is safe to use for applications like
61.Xr ntpd 8 .
62.It WARN
63The attached receiver has been indicating a warning condition
64for at least the last ten minutes.
65The timedelta should be used with care.
66.It CRITICAL
67tty timestamping has been turned on but there is no PPS signal present or the
68receiver indicated a warning condition for at least the last twenty minutes.
69Check your hardware.
70Some receiver units need PPS to be manually turned on.
71.El
72.Pp
73The status of a second sensor is used to report the status of the
74device itself:
75.Bl -tag -width "CRITICALXX" -offset indent
76.It OK
77The clock is synchronized, e.g. a GPS receiver has a fix.
78.It WARN
79The device issued a warning condition, e.g. a GPS receiver has no fix.
80.El
81.Sh SEE ALSO
82.Xr tty 4 ,
83.Xr ldattach 8 ,
84.Xr ntpd 8 ,
85.Xr sysctl 8
86.Sh HISTORY
87The
88.Nm
89interface first appeared in
90.Ox 4.3 .
91.Sh AUTHORS
92The
93.Nm
94line discipline was written by
95.An Marc Balmer Aq Mt mbalmer@openbsd.org .
96