UCOM(4)
π UCOM(4) β the USB tty glow-up π
okay bestie, sit down, hydrate, and let me tell you about ucom, the USB tty support driver from the Kernel Interfaces Manual. she's the reason your lil USB modem can act like a real terminal and honestly? iconic. β¨
πΈ NAME πΈ
ucom β USB tty support π«Ά
π SYNOPSIS π
so to get this driver baked into your kernel, you drop this line in your kernel configuration file:
device ucom
or, if you'd rather load her as a module at boot time (slay, flexible queen), put this in loader.conf(5):
ucom_load="YES"
β¨ DESCRIPTION β¨
The ucom driver attaches to USB modems, serial ports, and honestly any other device that needs to look like a tty. she shows behavior like a tty(4), no cap. which means all your normal little programs β think tip(1) or ppp(8) β can just. use the device. no drama. π
π SYSCTL VARIABLES π
these babies are available both as sysctl(8) variables and loader(8) tunables. double threat energy:
hw.usb.ucom.debugβ debug output level, where0means debugging is disabled and bigger values crank up the debug message verbosity. default is0. (lowkey quiet by default, respect.)hw.usb.ucom.device_mode_consoleβ when set to1, theucomdriver marks terminals as console devices while operating in device mode. default is1.hw.usb.ucom.pps_modeβ enables and configures PPS capture mode, as described down below π
β±οΈ Pulse Per Second (PPS) Timing Interface β±οΈ
The ucom driver can capture PPS timing info as defined in RFC 2783. the API lives on the tty device and you get to it via ioctl(2). to use the PPS capture feature with ntpd(8), just symlink the tty device to /dev/pps0. periodt.
The hw.usb.ucom.pps_mode sysctl configures the PPS capture mode. you can set it in loader.conf(5) or sysctl.conf(5). the capture modes available are:
0β capture disabled (default).1β capture pulses on theCTSline.2β capture pulses on theDCDline.
π¦ FILES π¦
/dev/ttyU*β for callin ports/dev/ttyU*.init/dev/ttyU*.lockβ corresponding callin initial-state and lock-state devices/dev/cuaU*β for callout ports/dev/cuaU*.init/dev/cuaU*.lockβ corresponding callout initial-state and lock-state devices
π SEE ALSO π
tty(4), uark(4), ubsa(4), ubser(4), uchcom(4), ucycom(4), ufoma(4), uftdi(4), uhso(4), uipaq(4), umcs(4), umct(4), umodem(4), umoscom(4), uplcom(4), usb(4), uslcom(4), uvisor(4), uvscom(4)
like, the whole USB serial friend group. squad goals fr fr. π«Ά
π HISTORY π
The ucom driver was adopted from NetBSD in March of 2002. this manual page was adopted from NetBSD by Tom Rhodes <trhodes@FreeBSD.org> in **April 2002`. (shoutout to Tom, a real one π)
π BUGS π
prior to FreeBSD 6.0, ucom created /dev/ucom? rather than the uniform device names created today. so if you're running some ancient script from the before-times, you must adjust it accordingly. no shortcuts, bestie. π
tl;dr: plug in a USB modem, get a tty, runtip(1)orppp(8), maybe symlink/dev/pps0if you're feeling fancy. that's the whole vibe. you got this πβ¨
β cute lil sign-off from the Debian crew, page dated April 25, 2018 π mwah, go touch some serial ports π¦
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1999 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms