AC Power Control through USB
1. Purpose
Rebooting remote system, AC Power Control is only reliable way.
- Kernel sometime hangs, no way to reboot by command line.
- Hardware RESET feature would be unreliable, especially
for evaluation boards in testing phase. Some chips will not be
get reset.
2. Constraints/Requirements
Any hacker around embedded system has his/her own solution for AC
Power Control, so, there are bunch of home-brewed solutions out there.
Besides, there are some expensive products.
Those solutions and products don't match general use.
For general use, here are constraints/requirements:
- Cheap, Common, and Convenient
- Thus, by Off-the-shelf hardware
- No Soldering Iron (or Black Magic), Please
3. The Definite Solution
It is TANAKA Akira who invented this solution, that is,
USB-coupled AC Power Cable
+
USB port power control
=
AC Power Control through USB
NIIBE Yutaka implemented it on GNU/Linux, as hub-ctrl.c.
It's cheap: USD$35 (Power cable) + USD$25 (USB Hub) = USD$60.
It's common (available any large computer shops in Japan), and
convenient (just plug in USB hub into your computer and connect AC
Power Cable). No Soldering Iron or any magic is required.
4. USB-coupled AC Power Cable
In JAPAN
- No Natural Resources (Oil).
- Everyone is energy conscious.
- Everyone cares Kyoto Protocol.
- Peripherals MUST be powered off when PC is not powered ON.
There are two products has this power-OFF feature:
- AC Power Cable with AC Power Consumption Detection:
It checks power consumption of PC by AC power line.
When it detects no consumption of a AC power line,
it disables power of other lines.
- USB-coupled AC Power Cable:
It checks voltage of USB port.
When it detects no valtage of USB port,
it disables power lines.
List of USB-coupled AC Power Cable:
5. USB Port Power Control
This feature is specified in USB 2.0 Specification. USB Hub has
feature to control port power. If it supports this feature, it's 'Hub
Descriptor' should have relevant value at wHubCharacteristic field.
Using lsusb utilities with -v option, you can inspect 'Hub Descriptor', such
like:
Hub Descriptor:
[...]
wHubCharacteristic 0x0089
Per-port power switching
Per-port overcurrent protection
Port indicators
[...]
CAUTION: Although many chips implemented this feature, many products
omit the circuit of power control, unfortunately.
List of USB Hubs known to support USB Port Power Control:
- Elecom: U2H-G4S
- Sanwa Supply: USB-HUB14GPH
- Targus, Inc.: PAUH212
- Hawking Technology: UH214
List of USB Hubs known to NOT support USB Port Power Control:
- Intel 82801 (Root Hub)
- Dick Smith Electronics: XH6777
6. Implementation(s)
Initial Implementation: Kernel hack
- New IOCTL for hub driver
- usb_control_msg: USB_PORT_FEAT_POWER
Second Implementation: User space
- libusb library
- usb_control_msg: USB_PORT_FEAT_POWER
7. Retrospect
The idea of USB-coupled AC power seemed old (more than 10 years).
Here are the products information (which are not available any more).
$Id: ac-power-control.html,v 1.7 2006/01/28 00:36:53 gniibe Exp $
NIIBE Yutaka and TANAKA Akira
Number of visits:
32890| | | | | | | | | | | | | | | | | ##### ################################### ##################################### ####################################### ######################################### =========================================== | | | | | | | | | | | | | | | | | ### ######### ########### ############# ############### ################################# =========================================== | | | | | | | | | | | | | | ####### ################# ################### ##################### ####################### ######################### ########################### ############################# ############################### =========================================== |