On 07/24/2012 10:02 AM, Laurent Pinchart wrote: > Hi Adam, > > On Monday 23 July 2012 16:26:16 Adam Wozniak wrote: >> I'm trying to control the "recording" light on a Logitech C270 webcam >> from a linux userspace app. >> >> There is a windows app that does this, so I know it is possible. >> >> Running the app in a VM, and looking at usbmon output, the following >> lines get printed when I turn the light on and off: >> >> ffff8802adc33c80 1951017902 S Co:1:004:0 s 21 01 0900 0700 0005 5 = >> 01010000 0a >> ffff8802adc33c80 1952527826 S Co:1:004:0 s 21 01 0900 0700 0005 5 = >> 01000000 0a >> >> so I know this is a "control output" message with "setup" values >> bmRequestType=21, bRequest=01, wValue=0900, wIndex=0700, wLength=0005 >> and data of 01,0N,00,00,0a where N=1 for on and N=0 for off >> >> How would I send this same packet from a userspace application? > > Short answer: don't :-) > > The right way to control the LED is to map it as a V4L2 control, and then use > any V4L2 utility to modify the control value. > > The uvcvideo driver supports creating UVC -> V4L2 control mappings at runtime. > You will need the uvcdynctrl tool and the Logitech control mapping XML > description file. The uvcdynctrl package for your distribution should include > both, as well as a udev rule to create mappings automatically when the camera > is plugged in. > Hi Laurent, I would like to do the same for a c920. Maybe the commands are the same?, being both Logitech? Could you please detail a bit more the steps to achieve that. Thanks Andrea -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html