Capturing device eumeration
Previous  Next


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 ?

graphic Step 1

Click Capture Hot Plugged Devices in the Capture menu or click the graphic icon.

graphic Step 2

Click  Start Monitor in the Capture menu or click the  graphic icon.

graphic Step 3

Plug in the device. USBTrace will capture all requests exchanged between host and the newly plugged in device.

graphic Step 4
Click Stop Monitor in the Capture menu or click the  graphic  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
graphic


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
graphic


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.

graphic