USBTrace can be used to debug the entire device enumeration process. Unlike some
other software analyzers USBTrace does not use any filter drivers to capture USB bus
activity. The limitation with using a filter driver is that you cannot start logging until the
driver for the device is loaded. So such monitoring software will miss the USB requests
exchanged between the host and the device before the driver for the device is loaded.
How to setup USBTrace to monitor enumeration ?
Step
1
Click Capture Hot Plugged Devices in the Capture menu or click the
icon.
Step
2
Click Start Monitor in the Capture menu or click the
icon.
Step 3
Plug in the device. USBTrace will capture all requests exchanged between host and the
newly plugged in device.
Step
4Click Stop Monitor in the Capture menu or click the
icon to end the capture
session.
Enumeration Log Walkthrough
The enumeration process can be divided into 2 phases: Phase #1, where the host learns
about the newly arrived device by reading the descriptors and loads the appropriate
device driver & Phase #2, where the device driver configures the device and makes it
ready for data transfer.
Fig Phase #1
As shown above, in the first phase the host learns about the device by reading its device,
configuration and string descriptors. With USBTrace, detailed information regarding each
of these requests can be obtained.
Fig Phase #2
The second phase starts with the loaded driver of the device getting an
IRP_MN_START_DEVICE PNP IRP. After this, the driver reads the device, configuration
and string descriptors and configures the device by selecting a configuration. The device
is now ready for data transfer.
If you want to see the requests exchanged between the host and the hub during phase
#1 of device enumeration, check the hub (root hub or external hub) to which the device is
plugged in before starting capture. This includes the host reading the port status and
resetting the port.