I have a new chinese webcam plugable by USB, with 6 LEDs to help night talks. However the lights do not turn on. Never! The cam has no buttons and the box says that is compatible with Linux.
I try the cam with Cheese and GUVCViewer. The cam works with no changes on LEDs and the mic do not works. (forgot the mic by now...)
Code:
$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
...
Bus 001 Device 009: ID 0c45:62c0 Microdia Sonix USB 2.0 Camera
Looks ok.
As i know, we can directly change some hardware configurations, writing on /sys, so first i found camera path:
Code:
# dmesg | grep -i camera
...
[66449.007123] input: USB 2.0 Camera as /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/input/input14
Second, search for *led*:
Code:
# ls /sys/devices/pci0000\:00/0000\:00\:1d.7/usb1/1-3/1-3\:1.0/input/input14
capabilities device event10 id modalias name phys power properties subsystem uevent uniq
# ls /sys/devices/pci0000\:00/0000\:00\:1d.7/usb1/1-3/1-3\:1.0/input/input14/capabilities/
abs ev ff key led msc rel snd sw
Found!
Code:
# cat /sys/devices/pci0000\:00/0000\:00\:1d.7/usb1/1-3/1-3\:1.0/input/input14/capabilities/led
0
hummm... may changing to
1 that will turn on.
Code:
# ls -l /sys/devices/pci0000\:00/0000\:00\:1d.7/usb1/1-3/1-3\:1.0/input/input14/capabilities/led
-r--r--r-- 1 root root 4096 Dez 29 12:34 /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/input/input14/capabilities/led
Code:
# chmod +w /sys/devices/pci0000\:00/0000\:00\:1d.7/usb1/1-3/1-3\:1.0/input/input14/capabilities/led
Ok! That is
-rw-r--r-- now.
Code:
# echo 1 > /sys/devices/pci0000\:00/0000\:00\:1d.7/usb1/1-3/1-3\:1.0/input/input14/capabilities/led
-bash: echo: write error: Input/output error
WTF?
Trying another way... The uevent special file looks promising:
Code:
# cat /sys/devices/pci0000\:00/0000\:00\:1d.7/usb1/1-3/1-3\:1.0/input/input14/uevent
PRODUCT=3/c45/62c0/100
NAME="USB 2.0 Camera"
PHYS="usb-0000:00:1d.7-3/button"
PROP=0
EV=3
KEY=100000 0 0 0 0 0 0
MODALIAS=input:b0003v0C45p62C0e0100-e0,1,kD4,ramlsfw
Code:
# echo LED=1 >> /sys/devices/pci0000\:00/0000\:00\:1d.7/usb1/1-3/1-3\:1.0/input/input14/uevent
No fail!
Code:
# cat /sys/devices/pci0000\:00/0000\:00\:1d.7/usb1/1-3/1-3\:1.0/input/input14/uevent
PRODUCT=3/c45/62c0/100
NAME="USB 2.0 Camera"
PHYS="usb-0000:00:1d.7-3/button"
PROP=0
EV=3
KEY=100000 0 0 0 0 0 0
MODALIAS=input:b0003v0C45p62C0e0100-e0,1,kD4,ramlsfw
But no change too.
That is wrong? There is another way?
I only want to turn on the webcam lights.