USB HID Composite device won't enumerate on Windows 7

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB HID Composite device won't enumerate on Windows 7

466 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ECamino on Wed Sep 25 06:15:28 MST 2013
Hi,

The device enumerates on XP and Linux, but not on Windows 7.  USBlyzer shows 'URB Select Configuration failed'
I've deleted all regestry keys for the device in XP and re-enumerated it and there are no errors.

In W7, all the descriptors show in the USBlyzer properties window except the HID report descriptors. I can see that when URB Select Configuation 1 happens, there is a URBD_STATUS_INVAlID_PARAMETER error.  Sorry about the formatting, but here are the descriptors as captured on XP when the device successfully enumerates:
[color=#03f]
 Connection StatusDevice connected
Current Configuration1
SpeedFull
Device Address1
Number Of Open Pipes3
Device Descriptor  “”
OffsetFieldSizeValueDescription
0bLength112h
1bDescriptorType101hDevice
2bcdUSB20200hUSB Spec 2.0
4bDeviceClass100hClass info in Ifc Descriptors
5bDeviceSubClass100h
6bDeviceProtocol100h
7bMaxPacketSize0140h64 bytes
8idVendor2“”
10idProduct2“”
12bcdDevice2"”"”
14iManufacturer101h"”
15iProduct102h“”
16iSerialNumber103h“”
17bNumConfigurations101h
Configuration Descriptor 1 Bus Powered, 200 mA
OffsetFieldSizeValueDescription
0bLength109h
1bDescriptorType102hConfiguration
2wTotalLength20042h
4bNumInterfaces102h
5bConfigurationValue101h
6iConfiguration100h
7bmAttributes1A0hBus Powered, Remote Wakeup
4..0: Reserved...00000 
5: Remote Wakeup..1..... Yes
6: Self Powered.0...... No, Bus Powered
7: Reserved (set to one)
(bus-powered for 1.0)1....... 
8bMaxPower164h200 mA
Interface Descriptor 0/0 HID, 2 Endpoints
OffsetFieldSizeValueDescription
0bLength109h
1bDescriptorType104hInterface
2bInterfaceNumber100h
3bAlternateSetting100h
4bNumEndpoints102h
5bInterfaceClass103hHID
6bInterfaceSubClass100h
7bInterfaceProtocol100h
8iInterface104h“”
HID Descriptor 
OffsetFieldSizeValueDescription
0bLength109h
1bDescriptorType121hHID
2bcdHID20111h1.11
4bCountryCode100h
5bNumDescriptors101h
6bDescriptorType122hReport
7wDescriptorLength20021h33 bytes
Endpoint Descriptor 81 1 In, Interrupt, 32 ms
OffsetFieldSizeValueDescription
0bLength107h
1bDescriptorType105hEndpoint
2bEndpointAddress181h1 In
3bmAttributes103hInterrupt
1..0: Transfer Type......11 Interrupt
7..2: Reserved000000.. 
4wMaxPacketSize20020h32 bytes
6bInterval120h32 ms
Endpoint Descriptor 01 1 Out, Interrupt, 32 ms
OffsetFieldSizeValueDescription
0bLength107h
1bDescriptorType105hEndpoint
2bEndpointAddress101h1 Out
3bmAttributes103hInterrupt
1..0: Transfer Type......11 Interrupt
7..2: Reserved000000.. 
4wMaxPacketSize200FFh255 bytes
6bInterval120h32 ms
Interface Descriptor 1/0 HID, 1 Endpoint
OffsetFieldSizeValueDescription
0bLength109h
1bDescriptorType104hInterface
2bInterfaceNumber101h
3bAlternateSetting100h
4bNumEndpoints101h
5bInterfaceClass103hHID
6bInterfaceSubClass101hBoot Interface
7bInterfaceProtocol101hKeyboard
8iInterface100h
HID Descriptor 
OffsetFieldSizeValueDescription
0bLength109h
1bDescriptorType121hHID
2bcdHID20111h1.11
4bCountryCode100h
5bNumDescriptors101h
6bDescriptorType122hReport
7wDescriptorLength2003Fh63 bytes
Endpoint Descriptor 82 2 In, Interrupt, 32 ms
OffsetFieldSizeValueDescription
0bLength107h
1bDescriptorType105hEndpoint
2bEndpointAddress182h2 In
3bmAttributes103hInterrupt
1..0: Transfer Type......11 Interrupt
7..2: Reserved000000.. 
4wMaxPacketSize20008h8 bytes
6bInterval120h32 ms
Interface 0 HID Report Descriptor Vendor-Defined 1
Item Tag (Value)Raw Data
Usage Page (Vendor-Defined 1)06 00 FF 
Usage (Vendor-Defined 1)09 01 
Collection (Application)A1 01 
    Logical Minimum (0)15 00 
    Logical Maximum (255)26 FF 00 
    Report Size (8)75 08 
    Report Count (32)95 20 
    Usage (Vendor-Defined 1)09 01 
    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02 
    Report Count (255)95 FF 
    Usage (Vendor-Defined 1)09 01 
    Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)91 02 
    Report Count (32)95 20 
    Usage (Vendor-Defined 1)09 01 
    Feature (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)B1 02 
End CollectionC0 
Interface 1 HID Report Descriptor Keyboard
Item Tag (Value)Raw Data
Usage Page (Generic Desktop)05 01 
Usage (Keyboard)09 06 
Collection (Application)A1 01 
    Usage Page (Keyboard/Keypad)05 07 
    Usage Minimum (Keyboard Left Control)19 E0 
    Usage Maximum (Keyboard Right GUI)29 E7 
    Logical Minimum (0)15 00 
    Logical Maximum (1)25 01 
    Report Size (1)75 01 
    Report Count (8)95 08 
    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02 
    Report Count (1)95 01 
    Report Size (8)75 08 
    Input (Cnst,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 03 
    Report Count (5)95 05 
    Report Size (1)75 01 
    Usage Page (LEDs)05 08 
    Usage Minimum (Num Lock)19 01 
    Usage Maximum (Kana)29 05 
    Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)91 02 
    Report Count (1)95 01 
    Report Size (3)75 03 
    Output (Cnst,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)91 03 
    Report Count (6)95 06 
    Report Size (8)75 08 
    Logical Minimum (0)15 00 
    Logical Maximum (115)25 73 
    Usage Page (Keyboard/Keypad)05 07 
    Usage Minimum (Undefined)19 00 
    Usage Maximum (Keyboard Right GUI)29 E7 
    Input (Data,Ary,Abs)81 00 
End CollectionC0 
[/color]



Why won't W7 enumerate my composite device?

EC
0 Kudos
Reply
3 Replies

396 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Thu Sep 26 08:14:36 MST 2013

Quote:
Is the 64-byte max a requirement for FS bulk endpoints too?
Is this information in the USB spec somewhere?


USB2.0 spec (usb_20.pdf, http://www.usb.org/developers/docs/usb_20_070113.zip )
5.7.3 Interrupt Transfer Packet Size Constraints
An endpoint for an interrupt pipe specifies the maximum size data payload that it will transmit or receive. The maximum allowable interrupt data payload size is 64 bytes or less for full-speed.


5.8.3 Bulk Transfer Packet Size Constraints
The USB defines the allowable maximum bulk data payload sizes to be only 8, 16, 32, or 64 bytes for full-speed endpoints


Anyway, HID doesn't accept bulk endpoint.

You have 255 bytes output report on the report descriptor.
It's OK. Such a large output report is split into four packets (64, 64, 64, 63) on the firmware, over 64-bytes wMaxPacketSize endpoint.
There is no need to change your PC application at all. PC host controller (hardware) chains split packets into single one by 255 bytes read-out request.

Just the firmware routine, which sends the output report, is fixed for this trouble. Don't worry so much

PS.
Ah, to get better response, set the bInterval of the interrupt OUT EP to 1 ms.
6bInterval120h32 ms    <--- 1 ms


Tsuneo
0 Kudos
Reply

396 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ECamino on Thu Sep 26 06:24:45 MST 2013
Thanks, Tsuneo!

Ouch!  That's going to create some headaches for us and our customers.  Simply changing the ep type to bulk didn't work either, and then our interface software on the XP PCs couldn't com with the device.

Is the 64-byte max a requirement for FS bulk endpoints too?

Is this information in the USB spec somewhere?

EC
0 Kudos
Reply

396 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Wed Sep 25 17:05:24 MST 2013
The wMaxPacketSize of the interrupt OUT EP takes 255 bytes
It must be 64 bytes or less, for full-speed device.
Endpoint Descriptor 01 1 Out, Interrupt, 32 ms
OffsetFieldSizeValueDescription
0bLength107h
1bDescriptorType105hEndpoint
2bEndpointAddress101h1 Out
3bmAttributes103hInterrupt
1..0: Transfer Type......11 Interrupt
7..2: Reserved000000.. 
4wMaxPacketSize200FFh255 bytes   <---- 64 or less
6bInterval120h32 ms


The criteria of descriptor check at SelectConfiguration (Set_Configuration) gets stricter on Win7 than WinXP.

Tsuneo
0 Kudos
Reply