阅读:5596回复:3
一个小问题,请教各位了!为什么我的设备显示设备类型是:人体学输入设备
为什么我的设备显示设备类型是:人体学输入设备
而不是我想要的MASS STORAGE DEVICE 我在INTERFACE DESCRIPTOR中,设置 bInterfaceClass=x08 // bInterfaceClass: MASS STORAGE bInterfaceSubClass=0X04 //bInterfaceSubClass 照理应该PC机识别它为海量存储设备才对啊! 配置描述符如下: Cfg_Descp[] = { 0x09, // bLength: Size of descriptor 0x02, // bDescriptorType: Configuration CFG_LEN,0x00, // wTotalLength: Cfg+Ifc+Class+Ep = 34 bytes 0x01, // bNumInterfaces: 1 interface 0x01, // bConfigurationValue: 1 0x00, // iConfiguration: none 0xA0, // bmAttributes: bus-powered, remote-wakeup 0x32, // MaxPower: 100mA //--------------------------------------------------------------------------------------------------------------------- // INTERFACE DESCRIPTOR //--------------------------------------------------------------------------------------------------------------------- 0x09, // bLength: Size of descriptor 0x04, // bDescriptorType: Interface 0x00, // bInterfaceNumber: #0 0x00, // bAlternateSetting: #0 0x02, // bNumEndpoints: 2 0x08, // bInterfaceClass: mass storage 0x04, // bInterfaceSubClass: none 0x00, // bInterfaceProtocol: none 0x00, // iInterface: none //--------------------------------------------------------------------------------------------------------------------- // ENDPOINT1 in DESCRIPTOR //--------------------------------------------------------------------------------------------------------------------- 0x07, // bLength: Size of descriptor 0x05, // bDescriptorType: Endpoint 0x81, // bEndpointAddress: IN, EP1 0x02, // bmAttributes: Interrupt EP1_LEN,0x00, // wMaxPacketSize: 0x0A, // bInterval: 10ms //--------------------------------------------------------------------------------------------------------------------- // ENDPOINT2 out DESCRIPTOR //--------------------------------------------------------------------------------------------------------------------- 0x07, 0x05, 0x02, // bEndpointAddress: out, EP2 0x02, // bmAttributes: Interrupt EP2_LEN,0x00, // wMaxPacketSize: 0x0A // bInterval: 10ms }; [编辑 - 6/30/04 by mirror] |
|
沙发#
发布于:2004-06-30 17:41
并且我用BUSBOUND抓取了NETAC优盘的枚举过程
前面的数据和我的数据几乎一样 只是后面多了如下数据: 到底是怎么回事呢? 谁能给我解释一下 先谢过了 16.2 LEN 1f 00 00 00 31 4.9ms 26.1.0 2004-06-30 09:55:46.464 16.2 DO 55 53 42 43 08 b6 91 85 USBC.... 5us 26.2.0 2004-06-30 09:55:46.464 24 00 00 00 80 00 06 12 $....... 26.2.8 00 00 00 24 00 00 00 00 ...$.... 26.2.16 00 00 00 00 00 00 00 ....... 26.2.24 16.1 LEN 24 00 00 00 36 989us 27.1.0 2004-06-30 09:55:46.465 16.1 DI 00 00 02 02 00 00 00 00 ........ 2us 27.2.0 2004-06-30 09:55:46.465 4e 65 74 61 63 20 20 20 Netac 27.2.8 4f 6e 6c 79 64 69 73 6b Onlydisk 27.2.16 20 50 6f 70 75 6c 61 72 Popular 27.2.24 33 2e 31 30 3.10 27.2.32 16.1 LEN 0d 00 00 00 13 999us 28.1.0 2004-06-30 09:55:46.466 16.1 DI 55 53 42 53 08 b6 91 85 USBS.... 2us 28.2.0 2004-06-30 09:55:46.466 00 00 00 00 00 ..... 28.2.8 16.2 LEN 1f 00 00 00 31 1.9ms 29.1.0 2004-06-30 09:55:46.468 16.2 DO 55 53 42 43 08 b6 91 85 USBC.... 2us 29.2.0 2004-06-30 09:55:46.468 fc 00 00 00 80 00 0a 23 .......# 29.2.8 00 00 00 00 00 00 00 fc ........ 29.2.16 00 00 00 00 00 00 00 ....... 29.2.24 16.1 LEN 0c 00 00 00 12 999us 30.1.0 2004-06-30 09:55:46.469 16.1 DI 00 00 00 08 00 00 f2 60 .......` 3us 30.2.0 2004-06-30 09:55:46.469 02 00 02 00 .... 30.2.8 16.1 LEN 0d 00 00 00 13 997us 31.1.0 2004-06-30 09:55:46.470 16.1 DI 55 53 42 53 08 b6 91 85 USBS.... 3us 31.2.0 2004-06-30 09:55:46.470 f0 00 00 00 00 ..... 31.2.8 17 LEN 05 00 00 00 5 3.0ms 32.1.0 2004-06-30 09:55:46.473 17 DI 00 00 02 02 00 ..... 5us 32.2.0 2004-06-30 09:55:46.473 16.2 LEN 1f 00 00 00 31 2.0ms 33.1.0 2004-06-30 09:55:46.475 16.2 DO 55 53 42 43 08 b6 91 85 USBC.... 13us 33.2.0 2004-06-30 09:55:46.475 08 00 00 00 80 00 0a 25 .......% 33.2.8 00 00 00 00 00 00 00 00 ........ 33.2.16 00 00 00 00 00 00 00 ....... 33.2.24 16.1 RSET 997us 34.1.0 2004-06-30 09:55:46.476 |
|
板凳#
发布于:2004-06-30 18:58
端点2不对
--------------------------------------------------------------------------------------------------------------------- // ENDPOINT2 out DESCRIPTOR //--------------------------------------------------------------------------------------------------------------------- 0x07, 0x05, 0x01, // bEndpointAddress: out, EP2 0x02, EP2_LEN,0x00, // wMaxPacketSize: 0x0A // bInterval: 10ms }; 我在INTERFACE DESCRIPTOR中,设置 bInterfaceClass=x08 // bInterfaceClass: MASS STORAGE bInterfaceSubClass=0X04 //bInterfaceSubClass 照理应该PC机识别它为海量存储设备才对啊! bInterfaceSubClass应该为06吧 再设下一个字节为0x50试试 另外将你的usb设备的vid、pid设置成一个该电脑没用过的号码 [编辑 - 6/30/04 by flyhye] |
|
|
地板#
发布于:2004-06-30 19:14
谢谢flyhye!!
先奉上10分! 我这就试试! |
|