Muokkaa

Jaa


First steps for USB client driver development

This section introduces USB driver development concepts and tools. The section applies to developers new to driver development that wish to implement a driver for a USB device that Microsoft does not provide an in-box driver for. These drivers are called a USB client driver in this documentation. The topics in this section describe high-level USB concepts and provide step-by-step instructions about performing common tasks of a USB client driver. For detailed information about those concepts see USB specifications at USB Documents.

Driver developers must have coding experience in the C++ programming language and understand the concepts of function pointers, callback functions, and event handlers. If writing a driver based on the User-Mode Driver Framework the developer must be familiar with C++ and COM.

Learning path for USB client driver developers

  1. Read the USB Specification 3.2.

    • Learn about the industry specification and different components (device, host controller, and hub) of the architecture. It's important to understand the data flow model, how the host and device communicate with each other, and the format of the requests that the device expects.
  2. Obtain a test USB device.

    • Have a USB device and its hardware specification. The specification describes device capabilities and the supported vendor commands. Use the specification to determine the functionality of the device driver and the related design decisions.

    • Have the OSR USB FX2 learning kit if new to USB driver development. The kit is the most suitable to study USB samples included in this documentation set.

    • Have a Microsoft USB Test Tool (MUTT) devices. MUTT hardware can be purchased from JJG Technologies. The device does not have installed firmware installed. To install firmware, download the MUTT software package. For more information, see the documentation included with the package.

  3. Study the USB device layout and the related USB descriptors.

    • Describe your device capabilities by reading the configuration descriptor, interface descriptors for each supported alternate settings, and their endpoint descriptors. By using USBView, the developer can browse all USB controllers and the USB devices connected to them and also inspect the device configuration.
  4. Choose a driver model for developing a USB client driver

    • Determine if the driver should be a custom driver or use one of the Microsoft-provided drivers based on the design of the target device. Choose the best driver model and describe the features supported by each model.
  5. Review the Microsoft-provided USB driver stack and driver development concepts.

  6. Prepare the development and debugging environment.

  7. Write your first driver.

  8. Extend your driver by sending a USB control transfer request.

  9. Extend your driver to use WDF USB I/O target objects to perform USB data transfers.

Community Resources for USB