xref: /freebsd/share/man/man4/ucom.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
18b97f354STom Rhodes.\" $NetBSD: ucom.4,v 1.9 2002/03/22 00:39:40 augustss Exp $
28b97f354STom Rhodes.\"
38b97f354STom Rhodes.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
48b97f354STom Rhodes.\" All rights reserved.
58b97f354STom Rhodes.\"
68b97f354STom Rhodes.\" This code is derived from software contributed to The NetBSD Foundation
78b97f354STom Rhodes.\" by Lennart Augustsson.
88b97f354STom Rhodes.\"
98b97f354STom Rhodes.\" Redistribution and use in source and binary forms, with or without
108b97f354STom Rhodes.\" modification, are permitted provided that the following conditions
118b97f354STom Rhodes.\" are met:
128b97f354STom Rhodes.\" 1. Redistributions of source code must retain the above copyright
138b97f354STom Rhodes.\"    notice, this list of conditions and the following disclaimer.
148b97f354STom Rhodes.\" 2. Redistributions in binary form must reproduce the above copyright
158b97f354STom Rhodes.\"    notice, this list of conditions and the following disclaimer in the
168b97f354STom Rhodes.\"    documentation and/or other materials provided with the distribution.
178b97f354STom Rhodes.\"
188b97f354STom Rhodes.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
198b97f354STom Rhodes.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
208b97f354STom Rhodes.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
218b97f354STom Rhodes.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
228b97f354STom Rhodes.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
238b97f354STom Rhodes.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
248b97f354STom Rhodes.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
258b97f354STom Rhodes.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
268b97f354STom Rhodes.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
278b97f354STom Rhodes.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
288b97f354STom Rhodes.\" POSSIBILITY OF SUCH DAMAGE.
298b97f354STom Rhodes.\"
30*463b8ebdSAllan Jude.Dd July 11, 2020
318b97f354STom Rhodes.Dt UCOM 4
328b97f354STom Rhodes.Os
338b97f354STom Rhodes.Sh NAME
348b97f354STom Rhodes.Nm ucom
358b97f354STom Rhodes.Nd USB tty support
368b97f354STom Rhodes.Sh SYNOPSIS
37c5f3a2c1SChristian BruefferTo compile this driver into the kernel,
38c5f3a2c1SChristian Bruefferplace the following line in your
39c5f3a2c1SChristian Bruefferkernel configuration file:
40c5f3a2c1SChristian Brueffer.Bd -ragged -offset indent
41fc1a4ecfSWarner Losh.Cd "device ucom"
42c5f3a2c1SChristian Brueffer.Ed
43c5f3a2c1SChristian Brueffer.Pp
44c5f3a2c1SChristian BruefferAlternatively, to load the driver as a
45c5f3a2c1SChristian Brueffermodule at boot time, place the following line in
46c5f3a2c1SChristian Brueffer.Xr loader.conf 5 :
47c5f3a2c1SChristian Brueffer.Bd -literal -offset indent
48c5f3a2c1SChristian Bruefferucom_load="YES"
49c5f3a2c1SChristian Brueffer.Ed
508b97f354STom Rhodes.Sh DESCRIPTION
518b97f354STom RhodesThe
528b97f354STom Rhodes.Nm
538b97f354STom Rhodesdriver attaches to USB modems, serial ports, and other devices that need
548b97f354STom Rhodesto look like a tty.
558b97f354STom RhodesThe
568b97f354STom Rhodes.Nm
578b97f354STom Rhodesdriver shows a behavior like a
588b97f354STom Rhodes.Xr tty 4 .
598b97f354STom RhodesThis means that normal programs such as
608b97f354STom Rhodes.Xr tip 1
618b97f354STom Rhodesor
628ae7052eSEdward Tomasz Napierala.Xr ppp 8
638b97f354STom Rhodescan be used to access the device.
647722b7d5SEdward Tomasz Napierala.Sh SYSCTL VARIABLES
657722b7d5SEdward Tomasz NapieralaThe following variables are available as both
667722b7d5SEdward Tomasz Napierala.Xr sysctl 8
677722b7d5SEdward Tomasz Napieralavariables and
687722b7d5SEdward Tomasz Napierala.Xr loader 8
697722b7d5SEdward Tomasz Napieralatunables:
707722b7d5SEdward Tomasz Napierala.Bl -tag -width indent
717722b7d5SEdward Tomasz Napierala.It Va hw.usb.ucom.debug
724426f429SBrad DavisDebug output level, where 0 is debugging disabled and larger values increase
734426f429SBrad Davisdebug message verbosity.
744426f429SBrad DavisDefault is 0.
757762e8a1SEdward Tomasz Napierala.It Va hw.usb.ucom.device_mode_console
767762e8a1SEdward Tomasz NapieralaWhen set to 1, the
777762e8a1SEdward Tomasz Napierala.Nm
787762e8a1SEdward Tomasz Napieraladriver will mark terminals as console devices when operating in device mode.
797762e8a1SEdward Tomasz NapieralaDefault is 1.
807722b7d5SEdward Tomasz Napierala.It Va hw.usb.ucom.pps_mode
814426f429SBrad DavisEnables and configure PPS capture mode as described below.
821adc28f5SChristian Brueffer.El
835994d9f1SIan Lepore.Sh Pulse Per Second (PPS) Timing Interface
845994d9f1SIan LeporeThe
855994d9f1SIan Lepore.Nm
865994d9f1SIan Leporedriver can capture PPS timing information as defined in RFC 2783.
875994d9f1SIan LeporeThe API, accessed via
882017d1b0SEdward Tomasz Napierala.Xr ioctl 2 ,
895994d9f1SIan Leporeis available on the tty device.
905994d9f1SIan LeporeTo use the PPS capture feature with
915994d9f1SIan Lepore.Xr ntpd 8 ,
925994d9f1SIan Leporesymlink the tty device to
935994d9f1SIan Lepore.Va /dev/pps0.
948b97f354STom Rhodes.Pp
958b97f354STom RhodesThe
965994d9f1SIan Lepore.Va hw.usb.ucom.pps_mode
975994d9f1SIan Leporesysctl configures the PPS capture mode.
985994d9f1SIan LeporeIt can be set in
995994d9f1SIan Lepore.Xr loader.conf 5
1005994d9f1SIan Leporeor
1015994d9f1SIan Lepore.Xr sysctl.conf 5 .
1025994d9f1SIan LeporeThe following capture modes are available:
1035994d9f1SIan Lepore.Bl -tag -compact -offset "mmmm" -width "mmmm"
1045994d9f1SIan Lepore.It 0
1055994d9f1SIan LeporeCapture disabled (default).
1065994d9f1SIan Lepore.It 1
1075994d9f1SIan LeporeCapture pulses on the CTS line.
1085994d9f1SIan Lepore.It 2
1095994d9f1SIan LeporeCapture pulses on the DCD line.
1105994d9f1SIan Lepore.El
1118b97f354STom Rhodes.Sh FILES
112fa196deaSEdward Tomasz Napierala.Bl -tag -width "/dev/ttyU*.init" -compact
113fa196deaSEdward Tomasz Napierala.It Pa /dev/ttyU*
1144f4acb65SEdward Tomasz Napieralafor callin ports
115fa196deaSEdward Tomasz Napierala.It Pa /dev/ttyU*.init
116fa196deaSEdward Tomasz Napierala.It Pa /dev/ttyU*.lock
1174f4acb65SEdward Tomasz Napieralacorresponding callin initial-state and lock-state devices
1184f4acb65SEdward Tomasz Napierala.Pp
119fa196deaSEdward Tomasz Napierala.It Pa /dev/cuaU*
1204f4acb65SEdward Tomasz Napieralafor callout ports
121fa196deaSEdward Tomasz Napierala.It Pa /dev/cuaU*.init
122fa196deaSEdward Tomasz Napierala.It Pa /dev/cuaU*.lock
1234f4acb65SEdward Tomasz Napieralacorresponding callout initial-state and lock-state devices
1248b97f354STom Rhodes.El
1258b97f354STom Rhodes.Sh SEE ALSO
126*463b8ebdSAllan Jude.Xr cu 1 ,
1278b97f354STom Rhodes.Xr tty 4 ,
128c5f3a2c1SChristian Brueffer.Xr uark 4 ,
129b96fc197SEdward Tomasz Napierala.Xr ubsa 4 ,
130b96fc197SEdward Tomasz Napierala.Xr ubser 4 ,
131ba0700b5SChristian Brueffer.Xr uchcom 4 ,
132b96fc197SEdward Tomasz Napierala.Xr ucycom 4 ,
133b96fc197SEdward Tomasz Napierala.Xr ufoma 4 ,
1348b97f354STom Rhodes.Xr uftdi 4 ,
135b96fc197SEdward Tomasz Napierala.Xr uhso 4 ,
136b96fc197SEdward Tomasz Napierala.\".Xr ugensa 4 ,
137b96fc197SEdward Tomasz Napierala.Xr uipaq 4 ,
138884a2a69SHans Petter Selasky.Xr umcs 4 ,
1398b97f354STom Rhodes.Xr umct 4 ,
1408b97f354STom Rhodes.Xr umodem 4 ,
1417fb94ea5SKevin Lo.Xr umoscom 4 ,
1428b97f354STom Rhodes.Xr uplcom 4 ,
1438b97f354STom Rhodes.Xr usb 4 ,
1447fb94ea5SKevin Lo.Xr uslcom 4 ,
1458b97f354STom Rhodes.Xr uvisor 4 ,
146*463b8ebdSAllan Jude.Xr uvscom 4 ,
147*463b8ebdSAllan Jude.Xr ttys 5
1488b97f354STom Rhodes.Sh HISTORY
1498b97f354STom RhodesThe
1508b97f354STom Rhodes.Nm
1518b97f354STom Rhodesdriver was adopted from
1528b97f354STom Rhodes.Nx
153eb98fe64SRuslan Ermilovin March of 2002.
154eb98fe64SRuslan ErmilovThis manual page was adopted from
1558b97f354STom Rhodes.Nx
156eb98fe64SRuslan Ermilovby
1576c899950SBaptiste Daroussin.An Tom Rhodes Aq Mt trhodes@FreeBSD.org
1588b97f354STom Rhodesin April 2002.
1590afc94c1SUlrich Spörlein.Sh BUGS
1600afc94c1SUlrich SpörleinPrior to
1610afc94c1SUlrich Spörlein.Fx 6.0
1620afc94c1SUlrich Spörlein.Nm
1630afc94c1SUlrich Spörleincreated
1640afc94c1SUlrich Spörlein.Pa /dev/ucom?
1650afc94c1SUlrich Spörleinrather than the uniform device names created today.
1660afc94c1SUlrich SpörleinOld scripts must be adjusted accordingly.
167