xref: /freebsd/share/man/man4/ucom.4 (revision eb69d1f144a6fcc765d1b9d44a5ae8082353e70b)
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.\" $FreeBSD$
31.\"
32.Dd August 3, 2017
33.Dt UCOM 4
34.Os
35.Sh NAME
36.Nm ucom
37.Nd USB tty support
38.Sh SYNOPSIS
39To compile this driver into the kernel,
40place the following line in your
41kernel configuration file:
42.Bd -ragged -offset indent
43.Cd "device ucom"
44.Ed
45.Pp
46Alternatively, to load the driver as a
47module at boot time, place the following line in
48.Xr loader.conf 5 :
49.Bd -literal -offset indent
50ucom_load="YES"
51.Ed
52.Sh DESCRIPTION
53The
54.Nm
55driver attaches to USB modems, serial ports, and other devices that need
56to look like a tty.
57The
58.Nm
59driver shows a behavior like a
60.Xr tty 4 .
61This means that normal programs such as
62.Xr tip 1
63or
64.Xr ppp 8
65can be used to access the device.
66.Sh MIB Variables
67The
68.Nm
69driver exposes the following variables in the
70.Va hw.usb.ucom
71branch of the
72.Xr sysctl 3
73MIB:
74.Bl -tag -width ".Va pps_mode"
75.It Va debug
76Debug output level, where 0 is debugging disabled and larger values increase
77debug message verbosity.
78Default is 0.
79.It Va pps_mode
80Enables and configure PPS capture mode as described below.
81.Sh Pulse Per Second (PPS) Timing Interface
82The
83.Nm
84driver can capture PPS timing information as defined in RFC 2783.
85The API, accessed via
86.Xr ioctl 2 ,
87is available on the tty device.
88To use the PPS capture feature with
89.Xr ntpd 8 ,
90symlink the tty device to
91.Va /dev/pps0.
92.Pp
93The
94.Va hw.usb.ucom.pps_mode
95sysctl configures the PPS capture mode.
96It can be set in
97.Xr loader.conf 5
98or
99.Xr sysctl.conf 5 .
100The following capture modes are available:
101.Bl -tag -compact -offset "mmmm" -width "mmmm"
102.It 0
103Capture disabled (default).
104.It 1
105Capture pulses on the CTS line.
106.It 2
107Capture pulses on the DCD line.
108.El
109.Sh FILES
110.Bl -tag -width "/dev/ttyU*.init" -compact
111.It Pa /dev/ttyU*
112for callin ports
113.It Pa /dev/ttyU*.init
114.It Pa /dev/ttyU*.lock
115corresponding callin initial-state and lock-state devices
116.Pp
117.It Pa /dev/cuaU*
118for callout ports
119.It Pa /dev/cuaU*.init
120.It Pa /dev/cuaU*.lock
121corresponding callout initial-state and lock-state devices
122.El
123.Sh SEE ALSO
124.Xr tty 4 ,
125.Xr uark 4 ,
126.Xr ubsa 4 ,
127.Xr ubser 4 ,
128.Xr uchcom 4 ,
129.Xr ucycom 4 ,
130.Xr ufoma 4 ,
131.Xr uftdi 4 ,
132.Xr uhso 4 ,
133.\".Xr ugensa 4 ,
134.Xr uipaq 4 ,
135.Xr umcs 4 ,
136.Xr umct 4 ,
137.Xr umodem 4 ,
138.Xr umoscom 4 ,
139.Xr uplcom 4 ,
140.Xr usb 4 ,
141.Xr uslcom 4 ,
142.Xr uvisor 4 ,
143.Xr uvscom 4
144.Sh HISTORY
145The
146.Nm
147driver was adopted from
148.Nx
149in March of 2002.
150This manual page was adopted from
151.Nx
152by
153.An Tom Rhodes Aq Mt trhodes@FreeBSD.org
154in April 2002.
155.Sh BUGS
156Prior to
157.Fx 6.0
158.Nm
159created
160.Pa /dev/ucom?
161rather than the uniform device names created today.
162Old scripts must be adjusted accordingly.
163