UCHCOM(4)

πŸ’– UCHCOM(4) πŸ’–

okay bestie, this is the manual page for uchcom, a section 4 (kernel interfaces) situation, and it's literally the whole vibe for talking to serial adapters. stay with me, it's cute, i promise πŸŽ€


✨ NAME ✨

uchcom β€” the WinChipHead CH341/CH340 serial adapter driver. yes that's the whole name section, we're being efficient today πŸ’…


🌸 SYNOPSIS 🌸

so there's two ways to get this driver in your life, and you get to pick your main character moment πŸ¦‹

Option one: bake it into the kernel. drop these lines into your kernel configuration file:

device usb
device ucom
device uchcom

Option two: just load it as a module at boot time. put this single line in loader.conf(5):

uchcom_load="YES"

and that's it, no cap ✨


πŸ’œ DESCRIPTION πŸ’œ

okay so the uchcom driver is out here providing support for the WinChipHead CH341/CH340 USB-to-RS-232 Bridge chip. like, that's the whole job, and it ate πŸ”₯

and the way you actually talk to the device? through the ucom(4) driver, which makes the whole thing behave like a tty(4). so it's giving very much "just a regular terminal port" energy, even though underneath it's a USB situation 🫢


πŸ‘‘ HARDWARE πŸ‘‘

here's the adapter that's invited to the party:

  • HL USB-RS232

that's the list. iconic. no notes 🌈


πŸŽ€ FILES πŸŽ€

bestie here's the file situation, and there's a callin/callout duality going on, so pay attention πŸ’–

  • /dev/ttyU* β€” for callin ports
  • /dev/ttyU*.init β€” the corresponding callin initial-state device
  • /dev/ttyU*.lock β€” the corresponding callin lock-state device
  • /dev/cuaU* β€” for callout ports
  • /dev/cuaU*.init β€” the corresponding callout initial-state device
  • /dev/cuaU*.lock β€” the corresponding callout lock-state device

so ttyU is your callin girlie and cuaU is your callout girlie, and each one brought two little sidekicks (.init and .lock). obsessed πŸ’…


⭐ SEE ALSO ⭐

go read these too, they're the friend group:


πŸ¦‹ HISTORY πŸ¦‹

the uchcom driver first appeared in NetBSD (so it's a transfer student, we love her). and the first FreeBSD release to include it was FreeBSD 8.0. glow up era ✨


πŸ’€ BUGS πŸ’€

ngl there's one thing and it's kind of a jumpscare: this chip actually seems unable to drive other than 8 data bits and 1 stop bit line. so like, that's the configuration. periodt. don't fight it πŸ™ˆ

and that's the page, bestie!! this one came from Debian and it's dated April 26, 2017 β€” a whole classic πŸŽ€ go forth and serial-communicate responsibly, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from