Я разработал USB-устройство с использованием LPC2148 и стека LPCUSB USB. Он хорошо работает, когда я устанавливаю его как устройство HID (клавиатура), но когда я устанавливаю его как составное устройство, хранилище (SD-карта памяти) и HID, он работает только в Windows XP. Я пробовал на двух разных компьютерах с Windows 7, и оба показали мне, что устройство не может запуститься (ошибка кода 10).
Я использовал две программы для отслеживания USB (USBTrace и USBlyzer) и не смог найти, что происходит. Устройство отображается как установленное в Win 7, за исключением того, что оно указывает, что оно не может быть запущено в свойствах устройства. Так кто-нибудь знает, что отличается от XP и Win7 при работе с композитным устройством USB?
Вот дескриптор в исходном коде, а ниже - вывод из USBlyzer:
Connection Status Device connected
Current Configuration 0
Speed Full (12 Mbit/s)
Device Address 5
Number Of Open Pipes 0
* Device Descriptor Teleboard
Offset Field Size Value Description
0 bLength 1 12h
1 bDescriptorType 1 01h Device
2 bcdUSB 2 0200h USB Spec 2.0
4 bDeviceClass 1 00h Class info in Ifc Descriptors
5 bDeviceSubClass 1 00h
6 bDeviceProtocol 1 00h
7 bMaxPacketSize0 1 40h 64 bytes
8 idVendor 2 FFFFh
10 idProduct 2 0003h
12 bcdDevice 2 0100h 1.00
14 iManufacturer 1 01h "Acme"
15 iProduct 1 02h "Testboard"
16 iSerialNumber 1 03h "ADR2012"
17 bNumConfigurations 1 01h
* Configuration Descriptor 1
Configuration Descriptor 1
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 02h Configuration
2 wTotalLength 2 0042h
4 bNumInterfaces 1 02h
5 bConfigurationValue 1 01h
6 iConfiguration 1 00h
7 bmAttributes 1 C0h Self Powered
4..0: Reserved ...00000
5: Remote Wakeup ..0..... No
6: Self Powered .1...... Yes
7: Reserved 1.......
(bus-powered for 1.0)
8 bMaxPower 1 32h 100 mA
* Interface Descriptor 0/0 Mass Storage, 2 Endpoints
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 00h
3 bAlternateSetting 1 00h
4 bNumEndpoints 1 02h
5 bInterfaceClass 1 08h Mass Storage
6 bInterfaceSubClass 1 06h SCSI Transparent Command Set
7 bInterfaceProtocol 1 50h Bulk-Only Transport
8 iInterface 1 00h
* Endpoint Descriptor 85 5 In, Bulk, 64 bytes
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 85h 5 In
3 bmAttributes 1 02h Bulk
1..0: Transfer Type ......10 Bulk
7..2: Reserved 000000..
4 wMaxPacketSize 2 0040h 64 bytes
6 bInterval 1 00h
* Endpoint Descriptor 02 2 Out, Bulk, 64 bytes
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 02h 2 Out
3 bmAttributes 1 02h Bulk
1..0: Transfer Type ......10 Bulk
7..2: Reserved 000000..
4 wMaxPacketSize 2 0040h 64 bytes
6 bInterval 1 00h
* Interface Descriptor 1/0 HID, 1 Endpoint
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 01h
3 bAlternateSetting 1 00h
4 bNumEndpoints 1 01h
5 bInterfaceClass 1 03h HID
6 bInterfaceSubClass 1 00h
7 bInterfaceProtocol 1 01h
8 iInterface 1 00h
* HID Descriptor
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 21h HID
2 bcdHID 2 0110h 1.10
4 bCountryCode 1 00h
5 bNumDescriptors 1 01h
6 bDescriptorType 1 22h Report
7 wDescriptorLength 2 0040h 64 bytes
* Endpoint Descriptor 81 1 In, Interrupt, 32 ms
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 81h 1 In
3 bmAttributes 1 03h Interrupt
1..0: Transfer Type ......11 Interrupt
7..2: Reserved 000000..
4 wMaxPacketSize 2 0008h 8 bytes
6 bInterval 1 20h 32 ms
* String Descriptor
Offset Field Size Value Description
0 bLength 1 04h
1 bDescriptorType 1 03h String
2 wLANGID[0] 2 0409h English (United States)
