阅读:1289回复:4
jianghuiren,小小问题,多多指点!
1〉枚举过程全部结束!
2〉枚举过程中有一些奇怪的setup包,比如 0680 0302 0409 00ff(在0680 0200 0000 00ff之后)。不知道为什么。 3〉枚举结束后,用bus hound只能看到一个端点0,看不到INT BULK端点。 4〉周立功提供的驱动安装后,用周立功的调试助手也可以发现设备,但是找不到端点。 5〉安装自己的驱动,用周立功的调试助手可以发现设备,可以找到端点。但是写入数据失败,也就是无法写入数据。 6〉bus hound 抓不到0680 0200 0000 0009 和0680 0200 0000 00ff这两条setup包,但我用仿真机看到确实执行了,而且也确实能够进入下一步操作。这两步之后的一步是0680 0200 0000 0109,在我这里和0680 0200 0000 00ff一样处理了,也就是发送配置,接口,端点描述符共2e字节上去了,然后进入0900 0100 0000 0000,然后是0880 0000 0000 0001,然后枚举结束。 不知道这个过程哪里不对,呵呵,现在可以给32分了,请看看,也请大家指点!谢谢阿先。 |
|
沙发#
发布于:2005-04-20 10:39
2)是不是你再设备描述符里打开了index,string等描述符?
3)可能你的配置描述符有问题 4)同上 5)同上,驱动没有从设备描述符中枚举出端点列表 6)0680 0200 0000 0109后面的0109时根据你上一个应答0680 0200 0000 00ff的数据计算出俩的实际配置描述符的大小,你看看你的配置描述符中是否有01 09字样的字符? 0900 0100 0000 0000是SetConfig,收到这个说明枚举已经完成,你的设备驱动也会正常安装了,至于最后一个是SetInterface,如果你只有一个interface的话可以不用理会。 总结:你的配置描述符有问题,或者在发送过程中出了问题,下面是我的配置描述符,给你参考: //High_speed Configuration Descriptor unsigned short ConfigDescr_H[] = { 0x0209, // 09 Length of the configuration Descriptor // 02 Configuration Descriptor 0x002e, // 002e Total length of the configurations,interface and class/endpoint 0x0101, // 01 No. of interface supported // 01 Configuration Value 0x8000, // 01 Index of string descriptor // 80 Configurations Characteristic 0x0932, // 32 , Power 100mA, // 09 Length of standard interface descriptor 0x0104, // 04 Standard Interface Type // 01 No of Interface 0x0400, // 00 Alternate Setting Selector // 04 No of Endpoints 0x0000, // 00 Interface Class // 00 Interface Sub Class 0x0000, // 00 Interface Protocol //00 Index of interface String Descriptor //BULK ENDPOINT 0x0507, // 07 Length of Standard Endpoint Descriptor // 05 Standard Endpoint Type 0x0281, // 81 Set endpoint to ep1in // 02 Set Endpoint to bulk mode 0x0200, // 0200 Endpoint Max Packet Size 0x0700, // 00 Interval for Polling Endpoint for data transfer// 07 Length of Standard Endpoint Descriptor 0x0105, // 05 Standard Endpoint Type // 01 Set endpoint ep1out 0x0002, // 02 Set Endpoint to bulk mode// 0200 Endpoint Max Packet Size 0x0002, // 00 Interval for Polling Endpoint for data transfer //INT ENDPOINT 0x0507, // 07 Length of Standard Endpoint Descriptor // 05 Standard Endpoint Type 0x0382, // 82 Set endpoint to ep2in // 03 Set Endpoint to int mode 0x0200, // 0200 Endpoint Max Packet Size 0x0701, // 01 Interval for Polling Endpoint for data transfer// 07 Length of Standard Endpoint Descriptor 0x0205, // 05 Standard Endpoint Type // 02 Set endpoint to ep2out 0x0003, // 03 Set endpoint to int mode// 0200 Endpoint Max Packet Size 0x0102 // 00 Interval for Polling Endpoint for data transfer }; |
|
板凳#
发布于:2005-04-20 10:41
还有,我的id是jinghuiren不是jianghuiren
:) |
|
地板#
发布于:2005-04-21 00:40
jinghuiren,确实是我的数值有问题,40写成04了,呵呵,感谢你的回复!!佩服!另外,id的问题和上述的错误原因是一样的,哈哈!给分,谢谢! :D :D :D
|
|
地下室#
发布于:2005-04-21 09:16
助人为快乐之本
呵呵。 :D |
|