Powering off USB port

heycam

Registered
Hi again.

I'd like to power off a particular USB port (the one a particular external hard disk is connected to). Is there a command line program included with the OS that can do this? Or does anyone know of one I can get?

Poking about, it's probably possible to write one with the IOKit USB stuff, but I'd rather not delve into that if somebody's already written something.

Thanks,

Cameron
 
I don't think it is physically possible. The USB ports are powered whenever the computer is running and not sleeping. The ability to turn this power on or off at will was never designed into the hardware.
 
Hi.

I don't think it is physically possible. The USB ports are powered whenever the computer is running and not sleeping. The ability to turn this power on or off at will was never designed into the hardware.

I'm pretty sure it is possible; I just searched through the USB 2.0 spec and there are mentions of a PORT_POWER bit that can be cleared to power off a port (if the hub supports it; some don't). In section 11.11 it says:

Self-powered hubs may have power switches that control delivery of power downstream facing ports but it is not required. Bus-powered hubs are required to have power switches. A hub with power switches can switch power to all ports as a group/gang, to each port individually, or have an arbitrary number of gangs of one or more ports.

and by "power switch" it means ones that are in the electronics and can be controlled.

I just found a short program for Linux that will power off a USB port. I just need an OS X version of that.

Thanks,

Cameron
 
Back
Top