- Examples Of Usb Devices
- Driver For Usb
- Drivers Usb Usb Devices Wireless Adapter
- Drivers Usb Usb Devices Dongle
The Universal Serial Bus Logo. USB, short for Universal Serial Bus, is an industry standard developed in the mid-1990s that defines the cables, connectors and communications protocols used in a bus for connection, communication, and power supply between computers and electronic devices.It is currently developed by the USB Implementers Forum. USB was designed to standardize the connection of. If your USB device does not work the most likely problem is missing or outdated drivers. When you plug the device into your USB, Windows will look for the associated driver, if it cannot find this driver then you will be prompted to insert the driver disc that came with your device.
This topic describes the operations that a Kernel-Mode Driver Framework (KMDF) or User-Mode Driver Framework (UMDF) driver starting in version 2 can perform using the USB device object methods provided by Windows Driver Frameworks (WDF).
It contains the following sections:
For step-by-step directions on writing a simple KMDF-based USB client driver, see How to write your first USB client driver (KMDF).
Creating a USB device object
To use the framework's USB I/O target objects (WDFUSBDEVICE, WDFUSBINTERFACE, and WDFUSBPIPE), your client driver must first call WdfUsbTargetDeviceCreateWithParameters to create a USB device object. Typically, a driver calls WdfUsbTargetDeviceCreateWithParameters from its EvtDevicePrepareHardware callback function.
When the driver calls WdfUsbTargetDeviceCreateWithParameters, the framework creates a WDFUSBDEVICE object and associates it with the FDO that represents the USB device. The method returns a handle to the new framework USB device object that the USB client driver can then use to communicate with the physical device.
After calling WdfUsbTargetDeviceCreateWithParameters, the driver can call WdfUsbTargetDeviceGetDeviceDescriptor and WdfUsbTargetDeviceRetrieveConfigDescriptor to obtain USB descriptors from the device. Those descriptors contain information about the device's first configuration, its interface settings, and their defined endpoints. (The USB descriptors are defined in the official USB specification.)
Configuring a USB Device
The WdfUsbTargetDeviceCreateWithParameters method also creates a framework USB interface object for each USB interface that the device's first configuration contains.
After calling WdfUsbTargetDeviceCreateWithParameters, the client driver must call WdfUsbTargetDeviceSelectConfig to select a configuration. This method creates framework interface objects for each alternate setting of the interface in the selected configuration.
The method also creates pipe objects that represent endpoints defined in each alternate setting of each interface of the selected configuration.
After you have selected a configuration, you can change alternate settings for the configuration's interfaces, if necessary.
You can also call WdfUsbTargetDeviceSelectConfig to deconfigure a device.
For related information, see:
Obtaining Device Information
After configuring a device, your client driver can call the following methods to obtain information about a USB device:
Determines whether the host controller and USB driver stack support a specific capability. Before calling WdfUsbTargetDeviceQueryUsbCapability, a driver must call WdfUsbTargetDeviceCreateWithParameters.
Returns a handle to the I/O target object that is associated with a USB device. The driver can pass this handle to WdfRequestSend or WdfIoTargetStop.
Retrieves version and capability information that is associated with a USB device.
WdfUsbTargetDeviceIsConnectedSynchronous (KMDF only)
Determines if the device is connected.
WdfUsbTargetDeviceRetrieveCurrentFrameNumber (KMDF only)
Retrieves the current USB frame number.
Getting USB Descriptors
To obtain the Unicode strings that are contained in a USB device's descriptors, the driver can call any of the following methods:
Obtains a device's USB device descriptor.
Obtains a device's USB configuration descriptor, interface descriptors, and endpoint descriptors.
Copies a Unicode string to a driver-supplied buffer.
Copies a Unicode string to a framework-supplied buffer.
Formats a request for a Unicode string. The driver can call WdfRequestSend to send the request synchronously or asynchronously.
Sending a Control Transfer
Your driver can call the following methods to send an I/O request that describes a standard, device class-specific, or vendor-specific USB control transfer.
Synchronously sends a USB control transfer request.
Formats a request for a USB control transfer. The driver can call WdfRequestSend to send the request synchronously or asynchronously.
For related information, see How to send a USB control transfer.
Resetting and Power-Cycling a Device's Port
Examples Of Usb Devices
Your driver can call the following methods to reset or power-cycle the USB port that a device is connected to:
Synchronously sends a request to reset a device's USB port.
WdfUsbTargetDeviceCyclePortSynchronously (KMDF only)
Synchronously sends a request to power-cycle a device's USB port.
WdfUsbTargetDeviceFormatRequestForCyclePort (KMDF only)
Formats a request to power-cycle a device's USB port. The driver must call WdfRequestSend to send the request synchronously or asynchronously.
For related information, see How to recover from USB pipe errors.
Sending an URB to a Device
If your KMDF driver communicates with its USB device by sending I/O requests that contain URBs, the driver can call the following methods:
WdfUsbTargetDeviceCreateUrb (KMDF only)
Allocates a USB request block (URB). Before calling WdfUsbTargetDeviceCreateUrb, a driver must call WdfUsbTargetDeviceCreateWithParameters.
Driver For Usb
WdfUsbTargetDeviceCreateIsochUrb (KMDF only)
Allocates an isochronous USB request block (URB). Before calling WdfUsbTargetDeviceCreateIsochUrb, a driver must call WdfUsbTargetDeviceCreateWithParameters.
Drivers Usb Usb Devices Wireless Adapter
WdfUsbTargetDeviceSendUrbSynchronously (KMDF only)
Synchronously sends an I/O request that contains an URB.
WdfUsbTargetDeviceFormatRequestForUrb (KMDF only)
Formats an I/O request that contains a URB. The driver must call WdfRequestSend to send the request synchronously or asynchronously.
Drivers Usb Usb Devices Dongle
WdfUsbTargetDeviceWdmGetConfigurationHandle (KMDF only)
Returns a device's USBD configuration handle. Some URBs require this handle.
For general conceptual background on URBs, see Allocating and Building URBs.