Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: USB Framework: Odd things durring enumeration
PostPosted: Tue Jan 30, 2007 8:54 pm 
Offline

Joined: Sat Apr 16, 2005 12:47 am
Posts: 44
Location: Petaluma, California
I'm looking at the trace from the HID keyboard application (under Windows 2000 & XP), and am seeing some anomalies. I hope someone else knows what is going on here. Everything looks good up through the Addressed state. But durring the get descriptors phase there are some string requests that seem out of place.
Code:
Hlr Ept0 Stp NewReq Std gDesc Dev Write0(18)
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 2 EoT
Hlr Ept0 Rd Ack
Hlr Ept0 Stp NewReq Std gDesc Cfg Write0(9)
Hlr Ept0 Wr 8
Hlr Ept0 Wr 1 EoT
Hlr Ept0 Rd Ack
Hlr Ept0 Stp NewReq Std gDesc Str0 Write0(4)
Hlr Ept0 Wr 4 EoT
Hlr Ept0 Stp NewReq Std gDesc Str3 Write0(26)
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 2 EoT
Hlr Ept0 Rd Ack
Hlr Ept0 Stp NewReq Std gDesc Cfg Write0(41)
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 1 EoT
Hlr Ept0 Rd Ack

What are those get string requests doing interupting the get configuration descriptor request??? From what I understand it is normal for the host to ask for the first 9 bytes of the configuration descriptor (to determine the length of the full configuration descriptor), followed by reqesting the complete descriptor. But why are strings being requested in the middle of this process?
Code:
Hlr Ept0 Stp NewReq Std gDesc W: STD_RequestHandler: Unknown GetDescriptor = 0x06
Stall0
Hlr Ept0 Sta

Why is the host asking for something that is supportted by only high speed devices? Shouldn't the host know that this device is not a high speed device? That should be known before entering the default state.
Code:
Hlr Ept0 Stp NewReq Std gDesc Str0 Write0(4)
Hlr Ept0 Wr 4 EoT
Hlr Ept0 Stp NewReq Std gDesc Str2 Write0(48)
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 0 EoT
Hlr Ept0 Rd Ack
Hlr Ept0 Stp NewReq Std gDesc Str0 Write0(4)
Hlr Ept0 Wr 4 EoT
Hlr Ept0 Stp NewReq Std gDesc Str2 Write0(48)
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 0 EoT
Hlr Ept0 Rd Ack

Here are those pesky string requests again. And they are requested twice. From here on everything appears "normal". (i.e. after setting the device address, the host asks for the device and configuration descriptors before loading a driver and setting the configuration.
Code:
Hlr Ept0 Stp NewReq Std gDesc Dev Write0(18)
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 2 EoT
Hlr Ept0 Rd Ack
Hlr Ept0 Stp NewReq Std gDesc Cfg Write0(9)
Hlr Ept0 Wr 8
Hlr Ept0 Wr 1 EoT
Hlr Ept0 Rd Ack
Hlr Ept0 Stp NewReq Std gDesc Cfg Write0(41)
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 8
Hlr Ept0 Wr 1 EoT
Hlr Ept0 Rd Ack
Hlr Ept0 Stp NewReq Std sCfg Write0(0)
Hlr Ept0 Wr 0 EoT SetCfg() CfgEpt1 CfgEpt2
Read2(1) Hlr Ept0 Stp NewReq sIdle(0) Write0(0)
Hlr Ept0 Wr 0 EoT
...

Can someone explain why the string requests are interupting this phase of the enumeration? And why are there multiple requests for the same descriptors???

- Joe


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 31, 2007 11:34 am 
Offline

Joined: Fri Aug 04, 2006 1:15 pm
Posts: 56
Hi jdupre,

Unfortunately, the inner working of Windows USB drivers is not very clear.
It seems that the Qualifier Descriptor is requested from full-speed devices by the Windows XP driver but not by the Windows 2000 one.
I cannot give you an answer about the rationale behind requesting the various String descriptors multiple times.

Regards.


Top
 Profile  
 
 Post subject: Re: USB Framework: Odd things durring enumeration
PostPosted: Fri Apr 20, 2012 8:01 am 
Offline

Joined: Thu Mar 29, 2012 5:19 pm
Posts: 17
Although thread is quite old, decided to answer it (Google may lead you here):

Call for descriptor 0x06 simply happens. It is completely valid to answer this request with a STALL, because low and full speed devices do not have to answer it.

Also, before a string descriptor is queried, there seem to be a string 0 descriptor request before (language descriptor).
If you have a look at LibUSB-win32, there are two calls, which request a string: one with an additional language id parameter, and another one without this parameter, which fetches language before fetching the string. Maybe these calls are similar to some Windows USB library calls.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: