DRV-210 · Device Drivers

USB Device Drivers

The USB stack from descriptors to URBs, on both the host and gadget sides.

Practitioner 4 days in person8 half-days online Max 14 in person

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

DRV-110 level device-model knowledgeC and kernel module build experienceComfort reading protocol specifications

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

  1. Lab: Decode a real device's descriptor tree with lsusb -v and usbmon; draw its configuration and endpoint map
  2. Lab: Write a host driver that binds on VID/PID and streams bulk or interrupt URBs with correct completion handling
  3. Lab: Inject a stall and a surprise disconnect; verify your cleanup path survives both without warnings
  4. Lab: Build a composite gadget with configfs and talk to your own host driver through it
  5. 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

DatesWhereSeatsEarly birdRegular
15 Nov – 18 Nov 20264 full days RiyadhIn person · KAFD Conference Centre 7 of 14 SAR 9,450until 16 OctSAR 10,500
22 Nov – 25 Nov 20264 full days Kuwait CityIn person · Al Hamra Tower 12 of 14 KWD 780until 23 OctKWD 870
29 Nov – 2 Dec 20264 full days MuscatIn person · Knowledge Oasis Muscat 7 of 14 OMR 970until 30 OctOMR 1,080
29 Nov – 8 Dec 20268 half-days Gulf bandLive online · 09:00–13:00 GMT+3 15 of 20 US$1,800until 30 OctUS$2,000
30 Nov – 3 Dec 20264 full days OttawaIn person · Kanata North Tech Park 12 of 14 CAD 3,430until 31 OctCAD 3,810
7 Dec – 10 Dec 20264 full days TorontoIn person · MaRS Discovery District 7 of 14 CAD 3,430until 7 NovCAD 3,810
7 Dec – 16 Dec 20268 half-days Europe bandLive online · 09:00–13:00 CET 4 of 20 US$1,800until 7 NovUS$2,000
7 Dec – 16 Dec 20268 half-days Americas bandLive online · 13:00–17:00 ET 9 of 20 US$1,800until 7 NovUS$2,000
14 Dec – 17 Dec 20264 full days LondonIn person · Shoreditch Works 12 of 14 GBP 1,960until 14 NovGBP 2,180
14 Dec – 17 Dec 20264 full days BerlinIn person · Factory Görlitzer Park 7 of 14 EUR 2,320until 14 NovEUR 2,580

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