kamaradclimber
kamaradclimber

Reputation: 2489

Find a usb device in /proc.bus

I would like to control a usb lamp with linux by switching its current on and off.

Basically any solution comes with inserting values in

/sys/bus/usb/devices/..../power/level

This would be a great idea but there is no way to find which device my device is. I tried lsusb, exploring /proc.bus/input/devices, even a bit a C code [4] but nothing seems related to my device.

To give more information it is a rotating lamp with a on/off switch but it does not seem to have any interaction with the computer except for the current.

Note : I have already looked for solution in SO on [1], [2] and even for windows ([3])

[1] : Controlling a USB power supply (on/off) with linux

[2] : Linux USB: turning the power on and off?

[3] : USB Device Connected

[4] : http://www.kernel.org/doc/pending/hotplug.txt

Upvotes: 1

Views: 1875

Answers (1)

rodrigo
rodrigo

Reputation: 98358

The problem is probably that most USB lamps are not USB devices at all. They use the USB port just to get the power.

No data connection means that the operating system does not know anything about it, and there is little you can do about that, other than using a hub, for example, and detect the hub, instead of the lamp...

Upvotes: 2

Related Questions