2

Is it possible to enable/disable arbitrary usb port in ArchLinux via console on Raspberry Pi B+ and at the same time others still work?

  • Why would you want this? Stop additional devices being installed, lower power consumption? – rob Oct 6 '14 at 12:18
  • Lower power consumption. For instance, I use one usb port for a data aqusition device, but I would like to power off other three because of lower power consumption. – KernelPanic Oct 6 '14 at 13:13
5

No, it is not possible to enable/disable or power down any single USB port. The hub providing the different ports is connected to one root USB port, thus it's none or all.

Ok, but is it possible to disable root USB port?

For the B-type it should be possible to disable the USB-Hub (see http://babaawesam.com/2014/01/24/power-saving-tips-for-raspberry-pi/ ) which should lead to some power savings. It's not refering to the B+ but if I am not mistaken that part of the architecture did not change. Note that the Ethernet NIC is connected to that USB hub so you'll lose network connection when disabling the hub, so you will be unable to connect to the Pi via network or USB. The only way to access the Pi is by the serial console.

Script from source:

Script made by Ryan for shutting USB Hub

#!/bin/bash
#Code to stop
/etc/init.d/networking stop
echo 0 > /sys/devices/platform/bcm2708_usb/buspower;
echo “Bus power stopping”

#!/bin/bash
#Code to start
echo 1 > /sys/devices/platform/bcm2708_usb/buspower;
echo “Bus power starting”
sleep 2;
/etc/init.d/networking start

If you cannot locate buspower, use the below mentioned command to locate it and replace in the above script.

find /sys/devices/ -name `dmesg -t | grep dwc_otg | grep “DWC OTG Controller” | awk ‘{print $2}’ | cut -d”:” -f1`
  • Ok, but is it possible to disable root USB port? – KernelPanic Oct 15 '14 at 3:43
  • For the B-type it should be possible to disable the USB-Hub (see babaawesam.com/2014/01/24/power-saving-tips-for-raspberry-pi ) which should lead to some power savings. It's not refering to the B+ but if I am not mistaken that part of the architecture did not change. Note that the Ethernet NIC is connected to that USB hub so you'll lose network connection when disabling the hub. – Ghanima Oct 15 '14 at 6:22

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.