DRV-210 · Device Drivers
USB Device Drivers
The USB stack from descriptors to URBs, on both the host and gadget sides.
Who this course is for
Engineers who must support a custom USB device — writing the host-side driver that binds to it, or implementing the device side with the gadget framework.
Prerequisites
Course outline
Day 1 — Architecture and enumeration
- USB topology, speeds and addressing
- Descriptors: device, configuration, interface, endpoint
- Standard requests and what happens during enumeration
- usb_device vs usb_interface and where drivers actually bind
- Reading lsusb -v output like a datasheet
Day 2 — URBs and transfer types
- Endpoint types: control, interrupt, bulk, isochronous
- Bandwidth guarantees and what the scheduler promises
- The URB lifecycle: alloc, fill, submit, complete, kill
- Anchors, cancellation and unlink semantics
- Error paths: stalls, timeouts, -ENOENT, -ESHUTDOWN
Day 3 — A host-side driver
- probe/disconnect for a custom interface
- Bulk and interrupt URB submission patterns that survive disconnect
- usb_control_msg for vendor requests
- Exposing the device: char device or joining an existing subsystem
- Autosuspend basics and its interaction with URBs
Day 4 — The gadget side
- UDC, function drivers and the gadget framework
- configfs and composite gadgets: serial, ethernet, mass storage
- Building a custom function driver
- usbmon and Wireshark for both-ends debugging
- Common interop failures and how to read them off the wire
Hands-on labs
Labs follow the academy model — 35% principles, 20% guided investigation, 45% engineering studio. Every claim you make in a lab is backed by a trace, a counter or a measurement you captured yourself. How we teach
- Lab: Decode a real device's descriptor tree with lsusb -v and usbmon; draw its configuration and endpoint map
- Lab: Write a host driver that binds on VID/PID and streams bulk or interrupt URBs with correct completion handling
- Lab: Inject a stall and a surprise disconnect; verify your cleanup path survives both without warnings
- Lab: Build a composite gadget with configfs and talk to your own host driver through it
- Lab: Capture enumeration and your transfers in usbmon/Wireshark and annotate the trace against your code
Capstone project
Go end to end: a configfs composite gadget presenting a custom interface, plus the host-side driver that binds to it and moves data over bulk endpoints — evidenced by usbmon captures of the full transfer path and a disconnect/error-injection matrix showing every failure mode is handled without leaks or hangs.
What you leave with
- A working host-side USB driver for a custom interface
- URB lifecycle discipline: submission, completion, cancellation, disconnect
- Hands-on gadget/configfs experience from the device side
- usbmon and Wireshark fluency for USB debugging
- A transfer-and-error model you can apply to any USB device
How it runs
Every course follows the same model: 35% principles, 20% guided investigation, 45% engineering studio. You leave with working code, raw measurements and an evidence-based report — not a certificate of attendance. Read the methodology or see a full sample lesson.
Material is adapted to your kernel version, hardware and workload before a private delivery. For public cohorts, the environment is provided and configured.
Questions
Who is this course for?
Engineers who must support a custom USB device — writing the host-side driver that binds to it, or implementing the device side with the gadget framework. It sits at practitioner level within the Device Drivers track.
What do I need to know already?
Specific prerequisites for this course: DRV-110 level device-model knowledge; C and kernel module build experience; Comfort reading protocol specifications. We confirm levels before the cohort starts and adapt if a group is stronger or weaker than expected.
Can this run privately for my team?
Yes. Any course runs on-site at your offices anywhere, or live online for a distributed team, with labs adapted to your hardware and codebase.
What is the difference between in-person and online?
In person is 4 full days with hardware on your desk, capped at 14. Online is 8 half-day sessions across about two weeks so you can keep working, capped at 20, with remote lab access.
Do you invoice companies?
Yes. Purchase orders are accepted and invoicing is available in USD, EUR, GBP, SAR and CAD.
Upcoming dates
| Dates | Where | Seats | Early bird | Regular | |
|---|---|---|---|---|---|
| 15 Nov – 18 Nov 20264 full days | RiyadhIn person · KAFD Conference Centre | 7 of 14 | SAR 9,450until 16 Oct | ||
| 22 Nov – 25 Nov 20264 full days | Kuwait CityIn person · Al Hamra Tower | 12 of 14 | KWD 780until 23 Oct | ||
| 29 Nov – 2 Dec 20264 full days | MuscatIn person · Knowledge Oasis Muscat | 7 of 14 | OMR 970until 30 Oct | ||
| 29 Nov – 8 Dec 20268 half-days | Gulf bandLive online · 09:00–13:00 GMT+3 | 15 of 20 | US$1,800until 30 Oct | ||
| 30 Nov – 3 Dec 20264 full days | OttawaIn person · Kanata North Tech Park | 12 of 14 | CAD 3,430until 31 Oct | ||
| 7 Dec – 10 Dec 20264 full days | TorontoIn person · MaRS Discovery District | 7 of 14 | CAD 3,430until 7 Nov | ||
| 7 Dec – 16 Dec 20268 half-days | Europe bandLive online · 09:00–13:00 CET | 4 of 20 | US$1,800until 7 Nov | ||
| 7 Dec – 16 Dec 20268 half-days | Americas bandLive online · 13:00–17:00 ET | 9 of 20 | US$1,800until 7 Nov | ||
| 14 Dec – 17 Dec 20264 full days | LondonIn person · Shoreditch Works | 12 of 14 | GBP 1,960until 14 Nov | ||
| 14 Dec – 17 Dec 20264 full days | BerlinIn person · Factory Görlitzer Park | 7 of 14 | EUR 2,320until 14 Nov |
Dates shown for the next few months. If nothing fits, tell us where and when — cohorts are added on demand, and private delivery can be scheduled any week.
More in Device Drivers
DRV-1013 days
Character Devices & sysfs
Your first working driver: character device registration, file operations, and exposing state through sysfs.
Practitioner-taught
SAR 6,750Next 15 Nov
DRV-1103 days
The Unified Device Model
Buses, devices, drivers and classes — the abstraction that makes probe and bind work across every subsystem.
Practitioner-taught
SAR 7,880Next 25 Oct
DRV-1204 days
Platform Drivers & Device Tree
Describing non-discoverable hardware and writing the drivers that consume that description.
Practitioner-taught
SAR 10,500Next 11 Oct
DRV-2013 days
I2C & SPI Drivers
Client drivers for the two buses embedded hardware is built from, including regmap and error recovery.
Practitioner-taught
SAR 7,880Next 18 Oct
DRV-2204 days
PCI & PCIe Drivers
Enumeration, BARs, MSI-X and DMA for PCIe devices, which is where most accelerator drivers live.
Practitioner-taught
SAR 12,000Next 1 Nov
DRV-3013 days
DMA Engines & Mappings
Moving data without the CPU: the DMA API, coherency, IOMMU interaction and the bugs that only appear under load.
Practitioner-taught
SAR 9,000Next 8 Nov
DRV-3103 days
Interrupts & Threaded IRQs
Interrupt handling from the hardware edge to the bottom half, and how to keep hard IRQ context short.
Practitioner-taught
SAR 7,880Next 18 Oct