Ubuntu Raring uvcvideo driver

I have a usb webcam that I’m using with uvccapture. The port is seeing that there is something in the usb. I know this because lsusb is detecting the model. It’s also the case that v4l2-ctl lists the device as uvc compliant and good to go. However, when I take a picture using the beagleboneblack, I get an error and the camera hangs. When I instead take it on an ubuntu laptop, it works.

The one major difference I see is from tailing dmesg. There, the bone returns:

3291.148202] usb usb1: bus auto-suspend, wakeup 1
[33336.957502] usb usb1: usb auto-resume
[33336.961609] usb 1-1: usb auto-resume
[33337.001224] usb 1-1: finish resume

but the laptop returns:

[ 6200.952891] usb 2-1.3: new high-speed USB device number 3 using ehci_hcd
[ 6201.071379] uvcvideo: Found UVC 1.00 device USB 2.0 PC Camera (058f:3880)
[ 6201.074951] input: USB 2.0 PC Camera as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/input/input12

It seems that one possibility is that I’m down a driver to detect the camera at some level. I checked modinfo ucvvideo and it returned what looked like a complete module.

Does anyone have an idea of how to fix this? I don’t see anything googling around on extra packages of drivers for ubuntu uvc. Thanks much.

Could it be a power problem, like in your USB port not being able to provide enough power during the actual taking of the picture? How do you power your setup—can you try a powered hub?

I’m not sure that a powering problem would lead to dmesg not showing the right output. In any case, I am powering the bone through the 5v barrel plug and the webcam through the usb host. It’s a simple camera that works fine on my laptop (500mA).

Przemek, from the below report, I suspect that you may be correct. To confirm, how do I check what kind of power the camera is requesting through the usb port?

An update is that I tried rebooting without the ethernet and the device was detected with a caveat (dmesg below). If I’m not mistaken, it looks like it was detected properly but then when the bone checked on power through the usb to the device, it reported signal integrity issues (the babble). Is this a correct diagnosis?

Regardless, I tried taking a picture and got a normal output other than reporting ioctl querycontrol error 22. While debugging in another screen, I was surprised to see that it finished. The quality of the jpg though was really low (mostly green with a sliver of the picture at the top).

dmesg output

[ 12.265714] uvcvideo 1-1:1.0: usb_probe_interface
[ 12.265749] uvcvideo 1-1:1.0: usb_probe_interface - got id
[ 12.287295] uvcvideo: Found UVC 1.00 device USB 2.0 PC Camera (058f:3880)
[ 12.331064] input: USB 2.0 PC Camera as /devices/ocp.2/47400000.usb/musb-hdrc.1.auto/usb1/1-1/1-1:1.0/input/input1
[ 12.357581] usbcore: registered new interface driver uvcvideo
[ 12.357604] USB Video Class driver (1.1.1)

[ 16.528037] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
[ 16.532493] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 2
[ 16.532536] musb-hdrc musb-hdrc.0.auto: supports USB remote wakeup
[ 16.532622] usb usb2: default language 0x0409
[ 16.532658] usb usb2: udev 1, busnum 2, minor = 128
[ 16.532672] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 16.532684] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 16.532695] usb usb2: Product: MUSB HDRC host driver
[ 16.532707] usb usb2: Manufacturer: Linux 3.8.13-bone20 musb-hcd
[ 16.532718] usb usb2: SerialNumber: musb-hdrc.0.auto
[ 16.539337] usb usb2: usb_probe_device
[ 16.539364] usb usb2: configuration #1 chosen from 1 choice
[ 16.539447] usb usb2: adding 2-0:1.0 (config #1, interface 0)
[ 16.539601] hub 2-0:1.0: usb_probe_interface
[ 16.539615] hub 2-0:1.0: usb_probe_interface - got id
[ 16.539637] hub 2-0:1.0: USB hub found
[ 16.539672] hub 2-0:1.0: 1 port detected
[ 16.539684] hub 2-0:1.0: standalone hub
[ 16.539695] hub 2-0:1.0: individual port power switching
[ 16.539706] hub 2-0:1.0: no over-current protection
[ 16.539715] hub 2-0:1.0: Single TT
[ 16.539728] hub 2-0:1.0: TT requires at most 8 FS bit times (666 ns)
[ 16.539738] hub 2-0:1.0: power on to power good time: 10ms
[ 16.539764] hub 2-0:1.0: local power source is good
[ 16.539830] hub 2-0:1.0: enabling power on all ports
[ 16.640631] hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0000
[ 16.640708] hub 2-0:1.0: hub_suspend
[ 16.640740] usb usb2: bus auto-suspend, wakeup 1
[ 16.707052] CAUTION: musb: Babble Interrupt Occurred
[ 16.858325] gadget: high-speed config #1: Multifunction with RNDIS
[ 16.858389] gadget: init rndis
[ 16.858400] gadget: RNDIS RX/TX early activation …
[ 16.858424] usb0: qlen 10

I found that I could see via lsusb -v that the camera was requesting 500mA from the usb hub. That seems normal.

I would first try different power scenarios, particularly a powered
hub that you can test and prove correct with your other computer. This
way you'd eliminate the power issues. Only if that pans out I'd start
investigating the power negotiation protocols, as they are complex and
there's always a chance that you are hitting a bug of some sort.