CDCE(4)

πŸ’– CDCE(4) β€” the USB ethernet bestie πŸ’–

okay so this is the manual page for cdce, from the Kernel Interfaces Manual section of the manual, and bestie you're gonna want to sit down for this one because it's giving USB networking and it ate ✨


🌸 NAME 🌸

cdce β€” USB Communication Device Class Ethernet (CDC ECM/NCM) driver

like. it's a driver. for USB ethernet. iconic behavior honestly πŸ’…


✨ SYNOPSIS ✨

So there's two ways to get this baby into your life, and both of them are valid 🫢

Option one, the "I bake it into the kernel" route: compile this driver straight into the kernel by putting these lines in your kernel configuration file:

device uhci
device ohci
device usb
device miibus
device uether
device cdce

Option two, the "I'm a module girlie" route: load the driver as a module at boot time instead, by putting this line in loader.conf(5):

if_cdce_load="YES"

no cap, that's it πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

The cdce driver provides support for USB Host-to-Host (aka USB-to-USB) and USB-to-Ethernet bridges based on the USB Communication Device Class Ethernet Control Model (CDC ECM) and Network Control Model (CDC NCM) specifications. And the way that it ALSO provides device-side CDC ECM support?? multitasking queen πŸ‘‘

The USB bridge shows up as a regular network interface on both sides, just transporting Ethernet frames like it's nothing. main character energy fr fr.

For more info on configuring this device, go see ifconfig(8). she's the one with the details.

Speed check: USB 1.x bridges support speeds of up to 12Mbps, and USB 2.0 speeds of up to 480Mbps. glow up πŸ“ˆ

Packets are received and transmitted over separate USB bulk transfer endpoints. separate! as they should be!

heads up bestie: the cdce driver does not support different media types or options. that's it. that's the whole menu. no customizing 😭

πŸŽ€ HARDWARE πŸŽ€

The following devices are supported by the cdce driver β€” the certified squad πŸ’…:

  • Prolific PL-2501 Host-to-Host Bridge Controller
  • Sharp Zaurus PDA
  • Terayon TJ-715 DOCSIS Cable Modem

πŸ’€ DIAGNOSTICS πŸ’€

the moment of truth. the vibe check. when things go wrong, you get one of these:

  • cdce%d: no union descriptor β€” The driver could not fetch an interface descriptor from the USB device. For a manually added USB vendor/product, the CDCE_NO_UNION flag can be tried to work around the missing descriptor. workaround era 🧚
  • cdce%d: no data interface
  • cdce%d: could not read endpoint descriptor
  • cdce%d: unexpected endpoint
  • cdce%d: could not find data bulk in/out β€” For a manually added USB vendor/product, these errors indicate that the bridge is not compatible with the driver. like. it's just not gonna work bestie, it's not you it's the bridge πŸ₯²
  • cdce%d: watchdog timeout β€” A packet was queued for transmission and a transmit command was issued, however the device failed to acknowledge the transmission before a timeout expired. ghosted mid-transmission πŸ’€
  • cdce%d: no memory for rx list -- packet dropped! β€” Memory allocation through MGETHDR or MCLGET failed, the system is running low on mbufs. running on empty, literally 😭
  • cdce%d: abort/close rx/tx pipe failed
  • cdce%d: rx/tx list init failed
  • cdce%d: open rx/tx pipe failed
  • cdce%d: usb error on rx/tx

🌈 SEE ALSO 🌈

Universal Serial Bus Class Definitions for Communication Devices, http://www.usb.org/developers/devclass_docs/usbcdc11.pdf.

Data sheet Prolific PL-2501 Host-to-Host Bridge/Network Controller, http://tech.prolific.com.tw/visitor/fcabdl.asp?fid=20679530.


⭐ HISTORY ⭐

The cdce device driver first appeared in OpenBSD 3.6, NetBSD 3.0 and FreeBSD 6.0. a legend across three platforms, we have no choice but to stan πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

The cdce driver was written by Craig Boston <craig@tobuj.gank.org> based on the aue(4) driver written by Bill Paul <wpaul@windriver.com> and ported to OpenBSD by Daniel Hartmeier <dhartmei@openbsd.org>. collaboration slay 🫢


πŸ™ˆ CAVEATS πŸ™ˆ

Many USB devices notoriously fail to report their class and interfaces correctly. Undetected products might work flawlessly when their vendor and product IDs are added to the driver manually. so like... the device is being shady about its own identity and you gotta add it by hand. toxic but workable πŸ’…


and that's the whole page bestie!! this one shipped with Debian, dated May 21, 2018 β€” mwah, love that for us πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from