Click to See Complete Forum and Search --> : Programmatically power-cycling USB device


StoneRaven
September 30th, 2004, 06:41 PM
Hello all,

I am wondering if there is a way to programmatically cause a USB device, attached to the PC, to be power cycled without actually unplugging and re-plugging in the USB device.

The problem is I have a USB device which can get in a non-responsive state. My DLL, which is the interface from the PC application and the USB driver, gets hung waiting for a response. As soon as the USB cable is unplugged, my DLL accurately reports there is no device, and as soon as the USB cable is plugged back in the device works fine.

What I would like to do is have my DLL check the timing of the worker thread and if the device has not responded by a set amount of time, simulate or cause a USB power cycle to the device so it "fixes" itself. Then my DLL can talk to the device as normal again.

Anyone know if this is possible? It occurred to me that it might not be possible to selectively choose which USB device to power-cycle and that I may need to just power-cycle/reset the entire USB controller. Again I don't know if that is even possible.

Thank you for your time and any assistance you may provide.

StoneRaven...