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