I have a USB hub that supports individual port-switching. I'm shutting off a port using the libusb library. When there is nothing connected to the port, the power pin drops from 5V to 1.5V and slowly decays. When there is a device connected(bDeviceClass 0), the port turns back on again after shutting down for about 0.5 seconds. However, when I connect another USB hub to the port, it shuts down properly when I issue the turn off command with libusb.
What's happening?
The device is a Android phone. I'm actually using hub-ctrl.c found here http://www.gniibe.org/oitoite/ac-power-control-by-USB-hub/hub-ctrl.c which uses the libusb library. Also, only the first hub that I use has power, the second hub doesn't have power.