A practical introduction to USB for software developers who want to write userspace drivers without touching kernel code. Using an Android phone in bootloader mode as the example device, it walks through USB enumeration, VID/PID identification with lsusb, and using libusb to detect and communicate with the device from userspace. Covers USB concepts including descriptors, endpoint types (Control, Bulk, Interrupt, Isochronous), IN/OUT directions, and finally implements a simple Fastboot protocol client that sends commands and reads responses over Bulk endpoints.
Table of contents
Introduction h1The USB Device h1Enumerating the device by hand h1Enumerating the device with libusb h1Talking to the device h1Endpoints h1Fastboot, finally h1Final Words h1Sort: