阅读:2880回复:6
How to reset a USB device
For example, I have a device connected to a hub on port 1. I want to reset the device (make the device reenumerate). I know the hub\'s symbolic name. Is there a IOCTL I can use to send to hub to reset the device on port 1?
thanks a lot |
|
沙发#
发布于:2005-04-14 11:36
哪一端是你做的?HOST OR CLIENT?如果是HOST,向HUB发送一个PORT RESET命令就可以了,具体的命令格式见协议的11章(或是12章)的HUB类命令.这是标准命令.
|
|
|
板凳#
发布于:2005-04-14 23:53
thanks metalwing. Sorry I need input english. No chinese input installed on my computer.
What I really want to do is from the user mode, I can get the handle of a USB hub, and I know the port number also. I want reset any device on that port. I noticed that wxp ddk has IOCTL_USB_HUB_CYCLE_PORT. But no documents. Any suggestions? |
|
地板#
发布于:2005-04-15 10:16
没关系.只要你看的懂中文就行了,我的E文我自己都看不懂.
USB的对HUB的STANDARD REQ有一个命令:23 03 00 04 XX XX XX XX 这个命令表示设置HUB的某个PORT的RESET FEATURE.当这个PORT的 RESET FEATURE设置了后,该PORT复位,连接到该PORT的设备也就复位. 具体的你可以看USB协议的11.24,关于SETFEATURE命令在11.24.2.13. |
|
|
地下室#
发布于:2005-04-15 10:46
How to send \"STANDARD REQ有一个命令:23 03 00 04 XX XX XX XX
\" from the user mode? |
|
5楼#
发布于:2005-04-15 11:31
你说的这个USER MODE(用户模式)是个什么模式?CLIENT OR HOST?
你做的是设备(DEVICE)还是接口(HUB OR HOST)? |
|
|
6楼#
发布于:2005-04-15 13:40
回家了可以发中文了.
我说的user mode 是指windows应用程序. 我想写个应用程序来reset device (任意设备). 我可以拿到hub的symbolic name,我createfile 得到handle,我想用deviceIOControl send 一个IOCTL 来reset port. 我的问提是,这样作可行么? 如果不行,我是不是要从写hubhub.sys? |
|