[python-win32] USB Power Off from Python

Tim Roberts timr at probo.com
Wed Dec 13 21:16:53 CET 2006


Sajjad Hussain wrote:
> I am using a USB port to power my USB device that
> takes 5V DC power. My device works fine and is powered
> on properly. I am using small script written in python
> to open a port (I am using a serial to usb adapter
> since my device has a serial connector on it), and
> send some data.
>
> Now I just want to turn off my device. Basically
> cutoff 5V usb power to my device. That means turn off
> power to a particular usb port where my device is
> connected to. And later say after 5 minutes I want to
> turn the power back on. I am using Windows XP. Please
> let me know how I can do that.

You can't.  There is no mechanism in the Windows USB driver stack to
perform this task.  Not even a USB kernel driver can do this.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-win32 mailing list