Eu desenvolvi um dispositivo USB usando um LPC2148 e a pilha USB LPCUSB . Ele funciona bem quando eu o defino como um dispositivo HID (um teclado), mas quando o defino como um dispositivo composto, armazenamento (SD Flash Card) e HID, ele só funciona no Windows XP. Eu tentei em dois computadores com Windows 7 diferentes e ambos me mostraram que o dispositivo não pode ser iniciado (erro de código 10).
Eu usei dois softwares para rastrear o USB (USBTrace e USBlyzer) e não consegui encontrar o que está acontecendo. O dispositivo é mostrado como instalado no Win 7, exceto pelo fato de afirmar que não pode ser iniciado nas propriedades do dispositivo de hardware. Então, alguém sabe o que é diferente entre o XP e o Win7 ao manusear um dispositivo USB?
Aqui é o descritor no código fonte e abaixo está a saída do 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)