[How-To] disable unused USB ports to reduce router power consumption

opkg update && opkg install hub-ctrl

check USB ports startus:

hub-ctrl -v

you will see something similar (in this example TL-WR710n):

Hub #0 at 001:001
INFO: individual power switching.
WARN: Port indicators are NOT supported.
Hub Port Status:
Port 1: 0000.0100 power

Port 1: 0000.0000 = USB off
Port 1: 0000.0100 power = USB on

USB off:

 hub-ctrl -h 0 -P 1 -p 0

That says to control hub 0 (-h 0) port 1 (-P 1) and to turn the power off (-p 0)

USB on:

 hub-ctrl -h 0 -P 1 -p 1

You can also use ”-p 1” to turn the power back on


Practical use (example):
you have a router running on a solar system or on a battery, that collects and sends data via 3G USB dongle (that is quite power hungry).
To reduce power consumption you can switch on the 3G USB dongle just when it is needed and just for a few minutes during the day.


Important to say that this will only work with hubs that are capable of individual power switching (in contrast to ganged or no power switching capabilities at all).