turn USB port on/off
Hi all,
I am trying to write a script to turn a USB port on and off... I am using the USB port to power a device that needs to be occassionally reset, so the idea is to cut power off the USB and then back on. How do I do that with Shell programming? Furthermore, I have many USB ports on my computer, how do I know which port I am controlling?
I've been doing some searching in the linux file system, and found this file /sys/bus/usb/devices/usb1/power/state which seem like it says whether a USB port is on or off. The problem is I know for sure that there is at least one USB port that is on, yet all the power/state files have the value 0, does that mean the power is "on" on all the devices?
Thanks,
Neked
|