summaryrefslogtreecommitdiff
path: root/share/man
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2008-01-05 17:33:29 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2008-01-05 17:33:29 +0000
commit2a0eec3d922ea9fda272a0a239ac6eb30cadc40b (patch)
treed48c394d5a9db8c4f953389e4ff44df8005b4fbb /share/man
parentf1d430b3cf60f8e6d4f5810bcde9bc17bd36ac8c (diff)
Add support for the Meinberg Standard Time String format that all Meinberg
radio clocks can transmit over serial ports. This is implemented as a line discipline similar to nmea(4) and provides a timedelta sensor. See http://www.meinberg.de/english/specs/timestr.htm for details on the MSTS format. ldattach(8) is extended to support the "msts" line discipline and two stopbits (which some radio clocks, e.g. the C51 use). Do a "make includes" before your next system build. Initially from Maurice Janssen based on nmea(4). "go for it" deraadt
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man4/Makefile8
-rw-r--r--share/man/man4/msts.486
2 files changed, 90 insertions, 4 deletions
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index c673afc834d..766540625f9 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.440 2007/12/31 14:56:33 dlg Exp $
+# $OpenBSD: Makefile,v 1.441 2008/01/05 17:33:28 mbalmer Exp $
MAN= aac.4 ac97.4 acphy.4 \
acpi.4 acpiac.4 acpibat.4 acpibtn.4 acpicpu.4 acpidock.4 \
@@ -30,9 +30,9 @@ MAN= aac.4 ac97.4 acphy.4 \
ksyms.4 kue.4 lc.4 lge.4 lii.4 lkm.4 lm.4 \
lmc.4 lmenv.4 lmn.4 lmtemp.4 lo.4 lofn.4 lpt.4 lxtphy.4 luphy.4 \
maestro.4 mainbus.4 malo.4 maxds.4 maxtmp.4 mbg.4 midi.4 mii.4 mfi.4 \
- moscom.4 mpi.4 mpu.4 msk.4 mtd.4 mtdphy.4 multicast.4 mtio.4 myx.4 \
- ne.4 neo.4 netintro.4 nfe.4 nge.4 nmea.4 noct.4 nofn.4 nsclpcsio.4 \
- nsgphy.4 nsphy.4 nsphyter.4 null.4 nviic.4 ohci.4 opl.4 \
+ moscom.4 mpi.4 mpu.4 msk.4 msts.4 mtd.4 mtdphy.4 multicast.4 mtio.4 \
+ myx.4 ne.4 neo.4 netintro.4 nfe.4 nge.4 nmea.4 noct.4 nofn.4 \
+ nsclpcsio.4 nsgphy.4 nsphy.4 nsphyter.4 null.4 nviic.4 ohci.4 opl.4 \
options.4 onewire.4 oosiop.4 osiop.4 owid.4 owsbm.4 owtemp.4 \
pcagpio.4 pcaled.4 pcdisplay.4 pchb.4 pci.4 pcib.4 pcfadc.4 \
pcfiic.4 pciide.4 pckbc.4 pckbd.4 pcmcia.4 pcn.4 pcppi.4 pcscp.4 \
diff --git a/share/man/man4/msts.4 b/share/man/man4/msts.4
new file mode 100644
index 00000000000..afe137d8885
--- /dev/null
+++ b/share/man/man4/msts.4
@@ -0,0 +1,86 @@
+.\" $OpenBSD: msts.4,v 1.1 2008/01/05 17:33:28 mbalmer Exp $
+.\"
+.\" Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: January 5 2008 $
+.Dt MSTS 4
+.Os
+.Sh NAME
+.Nm msts
+.Nd Meinberg Standard Time String timedelta sensor
+.Sh SYNOPSIS
+.Cd "pseudo-device msts" Op Ar count
+.Sh DESCRIPTION
+This line discipline interfaces serial Meinberg devices.
+.Pp
+The line discipline is enabled by the following sequence:
+.Bd -literal -offset indent
+#include <sys/ttycom.h>
+int ldisc = MSTSDISC, fildes; ...
+ioctl(fildes, TIOCSETD, &ldisc);
+.Ed
+.Pp
+The byte stream is unaltered by the line discipline which
+maintains a timedelta sensor using the MSTS data.
+The timedelta sensor will appear as msts* in the list of sensors and the delta
+(in nanoseconds) between the received time information and the local time can
+be accessed through the
+.Xr sysctl 8
+interface.
+.Pp
+The Meinberg radio clocks use the following default baudrates:
+.Pp
+.Bl -tag -width "GPS-receivers (external and PCI, COM0)XXX" -offset indent -compact
+.It GPS-receivers (external and PCI, COM0)
+19200/8N1
+.It GPS-receivers (external, COM1)
+9600/8N1
+.It DCF77-receivers (external)
+9600/7E2
+.It DCF77-receivers (PCI)
+4800/8N1
+.El
+.Sh SENSOR STATES
+The quality of the timedelta is reported as the sensor status:
+.Bl -tag -width "WARNXX"
+.It OK
+The time information is valid.
+The timedelta is safe to use for applications like
+.Xr ntpd 8 .
+.It WARN
+The attached receiver has been indicating a warning condition
+for at least the last ten minutes.
+The timedelta should be used with care.
+.It CRITICAL
+tty timestamping has been turned on but there is no PPS signal present or the
+receiver indicated a warning condition for at least the last twenty minutes.
+Check your hardware.
+Some receiver units need PPS to be manually turned on.
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ldattach 8 ,
+.Xr ntpd 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+interface first appeared in
+.Ox 4.3 .
+.Sh AUTHORS
+The
+.Nm
+line discipline was written by
+.An Marc Balmer Aq mbalmer@openbsd.org .