在读出设备描述符之后,无论设置usb地址,或者读配置描述符,都能产生中断,但返回状态0x28,这可是375的读端点数据命令,这么会返回命令而不是状态呢?程序在读其他usb设备过程中正常,但usb蓝牙适配器就发生这现象,请各位大侠支支招[Emot]20[/Emot][Emot]20[/Emot]
连芯片都做出来了,沁恒的客服们没理由解决不了这个问题吧?至少帮我推测一下原因啊
返回的0X28,并不是读端点数据的命令,而是操作设备的中断状态(超时)。 你前面读取的设备描述符是正确成功的吗?你在获取设备描述符之后,延时几MS之后再去设置地址试下。你用Bus Hound 抓取一下电脑是怎么对其操作的,按电脑的操作步骤试下。
bushound截得pc以下初始化过程:
Device Phase Data Description Cmd.Phase.Ofs(rep) ------ ----- ------------------------ ---------------- ------------------ 16.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 1.1.0 16.0 DI 00 01 03 00 .... 1.2.0 16.0 CTL 23 01 11 00 01 00 00 00 CLEAR FEATURE 2.1.0 16.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 3.1.0(2) 16.0 DI 00 01 01 00 .... 3.2.0 16.0 CTL 23 01 10 00 01 00 00 00 CLEAR FEATURE 5.1.0 16.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 6.1.0 16.0 DI 00 01 00 00 .... 6.2.0 16.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 7.1.0 16.0 DI 03 03 00 00 .... 7.2.0 16.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 8.1.0(2) 16.0 DI 01 01 01 00 .... 8.2.0 16.0 CTL 23 01 10 00 01 00 00 00 CLEAR FEATURE 10.1.0 16.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 11.1.0(2) 16.0 DI 01 01 00 00 .... 11.2.0 16.0 CTL 23 03 04 00 01 00 00 00 SET FEATURE 13.1.0 16.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 14.1.0 16.0 DI 03 01 10 00 .... 14.2.0 16.0 CTL 23 01 14 00 01 00 00 00 CLEAR FEATURE 15.1.0 16.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 16.1.0(2) 16.0 DI 03 01 00 00 .... 16.2.0 16.0 CTL 23 03 04 00 01 00 00 00 SET FEATURE 18.1.0 16.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 19.1.0 16.0 DI 03 01 10 00 .... 19.2.0 16.0 CTL 23 01 14 00 01 00 00 00 CLEAR FEATURE 20.1.0 16.0 CTL 80 06 00 02 00 00 ff 00 GET DESCRIPTOR 21.1.0 16.0 DI 09 02 ba 00 03 01 00 c0 ........ 21.2.0 00 09 04 00 00 03 e0 01 ........ 21.2.8 01 00 07 05 81 03 10 00 ........ 21.2.16 01 07 05 02 02 40 00 01 .....@.. 21.2.24 16.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 22.1.0 16.0 DI 03 03 00 00 .... 22.2.0 30.0 CTL 80 06 00 01 00 00 12 00 GET DESCRIPTOR 23.1.0 30.0 DI 12 01 10 01 e0 01 01 10 ........ 23.2.0 31 11 01 10 73 03 01 02 1...s... 23.2.8 00 01 .. 23.2.16 30.0 CTL 80 06 00 02 00 00 09 02 GET DESCRIPTOR 24.1.0 30.0 DI 09 02 ba 00 03 01 00 c0 ........ 24.2.0 00 09 04 00 00 03 e0 01 ........ 24.2.8 01 00 07 05 81 03 10 00 ........ 24.2.16 01 07 05 02 02 40 00 01 .....@.. 24.2.24 30.0 CTL 00 09 01 00 00 00 00 00 SET CONFIG 25.1.0 30.0 CTL 01 0b 00 00 01 00 00 00 SET INTERFACE 26.1.0 30.0 CTL 20 00 00 00 00 00 03 00 SEND HCI 27.1.0 30.0 DO 03 0c 00 ... 27.2.0 30.1 DI 0e 04 01 03 0c 00 ...... 28.1.0 30.0 CTL 20 00 00 00 00 00 05 00 SEND HCI 29.1.0 30.0 DO 16 0c 02 00 b0 ..... 29.2.0 30.1 DI 0e 04 01 16 0c 00 ...... 30.1.0 30.0 CTL 20 00 00 00 00 00 05 00 SEND HCI 31.1.0 30.0 DO 18 0c 02 10 27 ....' 31.2.0 30.1 DI 0e 04 01 18 0c 00 ...... 32.1.0 30.0 CTL 20 00 00 00 00 00 03 00 SEND HCI 33.1.0 30.0 DO 15 0c 00 ... 33.2.0 30.1 DI 0e 06 01 15 0c 00 00 b0 ........ 34.1.0 30.0 CTL 20 00 00 00 00 00 03 00 SEND HCI 35.1.0 30.0 DO 05 10 00 ... 35.2.0 30.1 DI 0e 0b 01 05 10 00 a6 02 ........ 36.1.0 30 08 00 0a 00 0.... 36.1.8 30.0 CTL 20 00 00 00 00 00 04 00 SEND HCI 37.1.0 30.0 DO 31 0c 01 00 1... 37.2.0 30.1 DI 0e 04 01 31 0c 00 ...1.. 38.1.0 30.0 CTL 20 00 00 00 00 00 0a 00 SEND HCI 39.1.0 30.0 DO 33 0c 07 80 02 ff a0 00 3....... 39.2.0 14 00 .. 39.2.8 30.1 DI 0e 04 01 33 0c 00 ...3.. 40.1.0 30.0 CTL 20 00 00 00 00 00 03 00 SEND HCI 41.1.0 30.0 DO 03 10 00 ... 41.2.0 30.1 DI 0e 0c 01 03 10 00 bf fe ........ 42.1.0 8d 78 08 18 00 00 .x.... 42.1.8 30.0 CTL 20 00 00 00 00 00 04 00 SEND HCI 43.1.0 30.0 DO 0a 0c 01 00 .... 43.2.0 30.1 DI 0e 04 01 0a 0c 00 ...... 44.1.0 30.0 CTL 20 00 00 00 00 00 04 00 SEND HCI 45.1.0 30.0 DO 1a 0c 01 01 .... 45.2.0 30.1 DI 0e 04 01 1a 0c 00 ...... 46.1.0 30.0 CTL 20 00 00 00 00 00 03 00 SEND HCI 47.1.0 30.0 DO 14 0c 00 ... 47.2.0 30.1 DI 0e fc 01 14 0c 00 49 53 ......IS 48.1.0 53 43 42 54 41 00 00 00 SCBTA... 48.1.8 00 00 00 00 00 00 00 00 ........ 48.1.16 00 00 00 00 00 00 00 00 ........ 48.1.24 30.1 DI 00 00 00 00 00 00 00 00 ........ 49.1.0 00 00 00 00 00 00 00 00 ........ 49.1.8 00 00 00 00 00 00 00 00 ........ 49.1.16 00 00 00 00 00 00 00 00 ........ 49.1.24 30.0 CTL 20 00 00 00 00 00 03 00 SEND HCI 50.1.0 30.0 DO 09 10 00 ... 50.2.0 30.1 DI 0e 0a 01 09 10 00 79 56 ......yV 51.1.0 20 67 11 00 g.. 51.1.8 30.0 CTL 20 00 00 00 00 00 03 00 SEND HCI 52.1.0 30.0 DO 23 0c 00 #.. 52.2.0 30.1 DI 0e 07 01 23 0c 00 00 00 ...#.... 53.1.0 00 . 53.1.8 30.0 CTL 20 00 00 00 00 00 06 00 SEND HCI 54.1.0 30.0 DO 24 0c 03 00 00 00 $..... 54.2.0 30.1 DI 0e 04 01 24 0c 0
我这边找了个蓝牙适配置试了下,并不会出现你所说的获取不到配置描述符的情况。你采用的是外置固件模式还是内值固件模式去获取的?你可以参考下附件程序中获取描述的部分,你最好能检控下在哪一步返回超时。 还有就是你的Bus Hound缓冲区设置的不够大,配置描述符并没有获取完整,总共长度为0XBA个字节,你只获取了32个字节。UploadImages/2007101211311593.rar