Controlling USB ports

OP
OP
B

balanga

Daemon

Thanks: 93
Messages: 2,292

#3
Thanks, but it wasn't quite what I was looking for... I'd like to be able to control devices such as lights which only use USB ports for drawing power. usbconfig(8) showed no indication that I had a lamp connected to a port.

I have no idea if this is even possible.
 

ralphbsz

Daemon

Thanks: 710
Messages: 1,209

#5
If you have a purely passive lamp, which has no electronics that's connected to the two USB data pins, and only uses the two USB power pins to get 5V using at most the minimum unmanaged power (which I think is 100 or 150mA, the details are lost in my brain), then there is nothing you can control. I think such devices do exist; whether they are USB standard conforming would be a question for a USB expert.

If you have USB-conforming devices, they use the data pins to speak some USB protocol which controls power delivery. This is the point where the USB controller (host) can perform power management, and this is the point where programs like usbcontrol can interact with the USB controller.
 
OP
OP
B

balanga

Daemon

Thanks: 93
Messages: 2,292

#6
If you have a purely passive lamp, which has no electronics that's connected to the two USB data pins, and only uses the two USB power pins to get 5V using at most the minimum unmanaged power (which I think is 100 or 150mA, the details are lost in my brain), then there is nothing you can control. I think such devices do exist; whether they are USB standard conforming would be a question for a USB expert.
That's basically what my question was about, ie whether you could control the port itself, not device attatched to the port. I was think of something equivalent to enabling/disabling LAN ports...
 

ralphbsz

Daemon

Thanks: 710
Messages: 1,209

#7
Actually, on further thinking: I think the USB controller chips may be capable of turning the +5V power completely off. But power management of USB is complicated, and involves the OS, the motherboard's ACPI implementation (for power during sleep and such things), and the controller hardware. You'll either have to rely on trial and error (start with "usbconfig power_off"), or read the whole specification and the interface documents (which sounds like a lot of work).
 
OP
OP
B

balanga

Daemon

Thanks: 93
Messages: 2,292

#8
I'll rely on trial and error :) although it would be nice to know what unit and addr referred to, or even how many there were of each...
 
Top