Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


DTM USB Address Description test

OSR_Community_UserOSR_Community_User Member Posts: 110,217
Hi,

Using DTM I am running the USB Address Description test on my USB 1.1 device. The test repeats a sequence of commands for all device addresses. This fails with the same error but at a random device address.

From the log file....

Iteration Number: 941
Assertion 9.22.1: Port Reset
Reset External Hub Port
Get Port Status
Clear C_PORT_RESET
Assertion 9.22.1:
Assertion 9.22.1: Ends
Assertion 9.22.3: Set Address
Setting device to address 61
Setting Address to: 61
Assertion 9.22.3:
Assertion 9.22.3: Ends
Assertion 9.22.4: Get Device Descriptor
Assertion 9.22.4:
Assertion 9.22.4: Ends
Assertion 9.22.4: Get Configuration Descriptor
Assertion 9.22.4:
Assertion 9.22.4: Ends
Iteration Number: 942
Assertion 9.22.1: Port Reset
Reset External Hub Port
Get Port Status
Reset Port
Sleep for 20 ms
Get Port Status
Clear C_PORT_RESET
Error Data received from request does not match previous data.
File: d:\6229t\testsrc\driverstest\usb\usbhct\exe\addrtest.cpp Line: 521
Error Type: BOOL
Error Code: 0x0
Error Text: Error 0x00000000
Data received:
01 01
Data Expected:
03 01
Assertion 9.22.1:
Assertion 9.22.1: Ends
Output Test Signature End
....

So iteration 941 passed but after C_PORT_RESET on interation 942 it failed.

With a USB analyser I can see that the data for the device descriptor and configuration descriptor for address set to 61 look correct. Normally, before the next set address command is issued (for the next iteration) there is a reset for 10->11mS.
In the error case I see the following:
Reset 10.6mS
Suspend 16.5mS
Reset 189mS
Reset 251mS
Suspend 461mS
Reset 10.8mS

This is followed by:
Get Device descriptor for 64 bytes to address 0
Reset 11mS
Set Address to 2
Get Device Descriptor (for 18 bytes)
Get Configuration Descriptor (for 255 bytes)
Get Device Descriptor (for 18 bytes)
Get Configuration Descriptor (for 9 bytes)
Get Configuration Descriptor (for 53 bytes)
Set Configuration (to 1)

This all looks OK on the bus with the correct data returned.

So - data received 01 01 data expected 03 01 ?? Where is this coming from?

I have a USB 2.0 hub connected between the PC and my device. It appears the problem is a reset to the hub?

Does anyone know what the problem might be?

I am currently checking the WLK for QFE updates and DTM filter updates.

Thanks,
Hayden

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Internals & Software Drivers 25 Jan 2021 LIVE ONLINE
Developing Minifilters 8 March 2021 LIVE ONLINE