Disconnecting USB Type-A Power

Hardware: Banana Pi BPI-M4

Problem Description:

  1. We have external instruments connected to the Banana Pi via USB Type-A. Occasionally, we must manually unplug and re-plug them to power-cycle and reboot the instruments.
  2. For the sake of remote troubleshooting or as a temporary workaround, is it possible to cut the power to the USB Type-A port via command line or code?

Troubleshooting Actions Taken: I consulted an AI and attempted the following commands, but the USB power was not disconnected:

  1. echo '0' | sudo tee /sys/bus/usb/devices/1-1.4/authorized
  2. echo 'auto' | sudo tee /sys/bus/usb/devices/1-1.4/power/control and autosuspend_delay_ms
  3. echo '1-1.4' | sudo tee /sys/bus/usb/drivers/usb/unbind

You can modify power to a hub. This one perhapse:

https://a.aliexpress.com/_EHuHemW

Disconnect power from the input port, and power the hub from a 5V buck converter with an enable input.

https://a.aliexpress.com/_EJg8NXG

Then enable / disable the buck converter with a GPIO pin.

1 Like

Thanks @ericwoud. Last question, does this USB hub still allow data transfer?

Or this USB hub just supply voltage only?

The specification didn’t say too much.

It is a regular hub.

1 Like

Ah it’s GL850G, i missed out at first. Thanks @ericwoud