xref: /freebsd/share/man/man4/ucom.4 (revision 06c3fb27)
1.\" $NetBSD: ucom.4,v 1.9 2002/03/22 00:39:40 augustss Exp $
2.\"
3.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Lennart Augustsson.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd July 11, 2020
31.Dt UCOM 4
32.Os
33.Sh NAME
34.Nm ucom
35.Nd USB tty support
36.Sh SYNOPSIS
37To compile this driver into the kernel,
38place the following line in your
39kernel configuration file:
40.Bd -ragged -offset indent
41.Cd "device ucom"
42.Ed
43.Pp
44Alternatively, to load the driver as a
45module at boot time, place the following line in
46.Xr loader.conf 5 :
47.Bd -literal -offset indent
48ucom_load="YES"
49.Ed
50.Sh DESCRIPTION
51The
52.Nm
53driver attaches to USB modems, serial ports, and other devices that need
54to look like a tty.
55The
56.Nm
57driver shows a behavior like a
58.Xr tty 4 .
59This means that normal programs such as
60.Xr tip 1
61or
62.Xr ppp 8
63can be used to access the device.
64.Sh SYSCTL VARIABLES
65The following variables are available as both
66.Xr sysctl 8
67variables and
68.Xr loader 8
69tunables:
70.Bl -tag -width indent
71.It Va hw.usb.ucom.debug
72Debug output level, where 0 is debugging disabled and larger values increase
73debug message verbosity.
74Default is 0.
75.It Va hw.usb.ucom.device_mode_console
76When set to 1, the
77.Nm
78driver will mark terminals as console devices when operating in device mode.
79Default is 1.
80.It Va hw.usb.ucom.pps_mode
81Enables and configure PPS capture mode as described below.
82.El
83.Sh Pulse Per Second (PPS) Timing Interface
84The
85.Nm
86driver can capture PPS timing information as defined in RFC 2783.
87The API, accessed via
88.Xr ioctl 2 ,
89is available on the tty device.
90To use the PPS capture feature with
91.Xr ntpd 8 ,
92symlink the tty device to
93.Va /dev/pps0.
94.Pp
95The
96.Va hw.usb.ucom.pps_mode
97sysctl configures the PPS capture mode.
98It can be set in
99.Xr loader.conf 5
100or
101.Xr sysctl.conf 5 .
102The following capture modes are available:
103.Bl -tag -compact -offset "mmmm" -width "mmmm"
104.It 0
105Capture disabled (default).
106.It 1
107Capture pulses on the CTS line.
108.It 2
109Capture pulses on the DCD line.
110.El
111.Sh FILES
112.Bl -tag -width "/dev/ttyU*.init" -compact
113.It Pa /dev/ttyU*
114for callin ports
115.It Pa /dev/ttyU*.init
116.It Pa /dev/ttyU*.lock
117corresponding callin initial-state and lock-state devices
118.Pp
119.It Pa /dev/cuaU*
120for callout ports
121.It Pa /dev/cuaU*.init
122.It Pa /dev/cuaU*.lock
123corresponding callout initial-state and lock-state devices
124.El
125.Sh SEE ALSO
126.Xr cu 1 ,
127.Xr tty 4 ,
128.Xr uark 4 ,
129.Xr ubsa 4 ,
130.Xr ubser 4 ,
131.Xr uchcom 4 ,
132.Xr ucycom 4 ,
133.Xr ufoma 4 ,
134.Xr uftdi 4 ,
135.Xr uhso 4 ,
136.\".Xr ugensa 4 ,
137.Xr uipaq 4 ,
138.Xr umcs 4 ,
139.Xr umct 4 ,
140.Xr umodem 4 ,
141.Xr umoscom 4 ,
142.Xr uplcom 4 ,
143.Xr usb 4 ,
144.Xr uslcom 4 ,
145.Xr uvisor 4 ,
146.Xr uvscom 4 ,
147.Xr ttys 5
148.Sh HISTORY
149The
150.Nm
151driver was adopted from
152.Nx
153in March of 2002.
154This manual page was adopted from
155.Nx
156by
157.An Tom Rhodes Aq Mt trhodes@FreeBSD.org
158in April 2002.
159.Sh BUGS
160Prior to
161.Fx 6.0
162.Nm
163created
164.Pa /dev/ucom?
165rather than the uniform device names created today.
166Old scripts must be adjusted accordingly.
167