1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ I'd look through the USB documentation, but there's probably some sort of wake up request that's being honored, but not getting passed through when there's an additional hub in the way. \$\endgroup\$ – Chris Stratton Aug 7 '13 at 2:56
  • \$\begingroup\$ What type of device is it? Just a wild guess, but is there possibly too much filter capacitance? (i.e. so the device rail/lines stay powered for longer than they should) Check the USB spec for details on maximum capacitance. Also try another device to see if it does the same. \$\endgroup\$ – Oli Glaser Aug 7 '13 at 4:26
  • \$\begingroup\$ I am not much aware of software details of libusb. USB hubs will have power control switches like TPS2046 or equalent(these chips have EN pins and OE# outputs) and main Hub control like CY7C65432 which controls them. Unless any overcurrent condition or command from host to disable port (ClearPortFeature(PORT_POWER) from usb spec) should disable the port. how you are controlling the individual ports? Have you confirmed all the software related doubts. \$\endgroup\$ – user19579 Aug 7 '13 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.