cupcake
Posts: 59
Joined: Sat Jan 21, 2012 9:00 pm

Webcam troubles: Turns off after a few frames

Mon Aug 06, 2012 8:35 pm

I've connected my RPi to a Microsoft VX-3000 webcam, both powered from a CyberPower CPH420P powered HUB.

I'm able to grab a single snapshot just fine:

Code: Select all

pi@raspberrypi ~ $ streamer -c /dev/video0 -o test.jpeg -s 640x480 -t 1
files / video: JPEG (JFIF) / audio: none
I can open the created jpeg file and it looks as expected. However, if I try to grab several snapshots or record a video, it seems the webcam is turned off somehow:

Code: Select all

pi@raspberrypi ~ $ streamer -c /dev/video0 -o test000.jpeg -s 640x480 -t 5
files / video: JPEG (JFIF) / audio: none
libv4l2: error turning off stream: No such device
ioctl VIDIOC_STREAMOFF: No such device
v4l2: ioctl(fildes = 3 "/dev/video0", request = VIDIOC_REQBUFS, struct v4l2_requestbuffers *data = { count = 0, type = V4L2_BUF_TYPE_VIDEO_CAPTURE, memory = V4L2_MEMORY_MMAP }) failed, Device or resource busy (16, EBUSY) because the video4linux character special device is in use by another process or by the system and this prevents the ioctl VIDIOC_REQBUFS system call from operating
By turned off I mean that the light on the webcam is switched off and that /dev/video0 is no longer available, however /dev/video1 is (probably due to automatic reconnect).

Running dmesg, I see this:

Code: Select all

...
[  359.453247] gspca: ISOC data error: [22] len=0, status=-4004
[  359.453263] gspca: ISOC data error: [23] len=0, status=-4004
[  359.474263] sonixj: reg_w1 err -32
[  359.476854] gspca: ISOC data error: [0] len=0, status=-4004
[  359.476878] gspca: ISOC data error: [1] len=0, status=-4004
...
[  359.861259] gspca: ISOC data error: [22] len=0, status=-4004
[  359.861275] gspca: ISOC data error: [23] len=0, status=-4004
[  359.883987] hub 1-1.2:1.0: port 2 disabled by hub (EMI?), re-enabling...
[  359.884861] gspca: ISOC data error: [0] len=0, status=-4004
[  359.884888] gspca: ISOC data error: [1] len=0, status=-4004
...
[  359.885242] gspca: ISOC data error: [22] len=0, status=-4004
[  359.885259] gspca: ISOC data error: [23] len=0, status=-4004
[  359.886114] usb 1-1.2.2: USB disconnect, device number 5
[  360.153854] usb 1-1.2.2: new full speed USB device number 7 using dwc_otg
[  360.255837] usb 1-1.2.2: New USB device found, idVendor=045e, idProduct=00f5
[  360.255886] usb 1-1.2.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[  360.255908] usb 1-1.2.2: Product: USB camera
[  360.259664] input: sonixj as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/input/input1
I stripped out many of the repeating "ISOC data error" lines.

I also tried it on a different webcam, with similar results.

Is this a power issue? The HUB not being able to feed the webcam with enough power for repeating action? Or is it something else?

fcoiffie
Posts: 1
Joined: Wed Aug 08, 2012 12:09 pm

Thu Aug 09, 2012 4:01 pm

I have exactly the same problem with my Logitech Webcam. But this problem could be caused by my Wifi dongle. I have to test another Webcam and another Wifi dongle to see if it is one of them which makes the problem.

theali
Posts: 1
Joined: Sun Aug 12, 2012 11:32 am

Re: Webcam troubles: Turns off after a few frames

Sun Aug 12, 2012 11:34 am

The same here. It looks like problem with gspca driver. Any solutions (other than buying new webcam)?

Mgros
Posts: 16
Joined: Sun Aug 12, 2012 8:41 pm

Re: Webcam troubles: Turns off after a few frames

Sun Aug 12, 2012 8:49 pm

I have the same thing with a logitech quickcam C910 and old quickcam...
Cheese does not start ...
With software Camorama and guvcview I sometimes one picture then freezes and sometimes a few seconds of video then turns off.
After the camera is no longer recognized.

In all cam lsusb with the camera is detected ...

---

J'ai la même chose avec un webcam logitech c910 et une quickcam ancienne ...
Cheese ne se lance pas ...
Avec les logiciel Camorama et guvcview j'ai parfois 1 image puis fige et parfois quelque secondes de vidéo puis s’éteint.
Aprés la caméra n'est plus reconnue.

Dans tous les cam avec lsusb la camera est bien détecté...

cupcake
Posts: 59
Joined: Sat Jan 21, 2012 9:00 pm

Re: Webcam troubles: Turns off after a few frames

Sun Aug 19, 2012 2:10 am

Problem persists for me. I've tried with 3 different webcams (2x Logitech and 1x Microsoft) and adding/removing all other USB devices.

No luck.

Anyone got any possible solution to this?

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: Webcam troubles: Turns off after a few frames

Sun Aug 19, 2012 6:37 am

I think your first diagnosis was right when you grab it has to require a power requirement at which point something falls over maybe daisy chain a second power hub intipendently powered just for the camera (not as a long term solution just as a diagnostic)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

rogerdahl
Posts: 11
Joined: Thu Sep 06, 2012 10:19 pm

Re: Webcam troubles: Turns off after a few frames

Thu Sep 06, 2012 10:21 pm

Connecting the camera through a powered hub helped slightly for me. Now it runs for a couple of seconds before crashing.

scope
Posts: 1
Joined: Wed Sep 19, 2012 9:42 pm

Re: Webcam troubles: Turns off after a few frames

Wed Sep 19, 2012 9:43 pm

I have the same problem with:
OmniVision Technologies, Inc. OV519 Webcam

any Ideas to repair ?

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: Webcam troubles: Turns off after a few frames

Thu Sep 20, 2012 6:31 am

There are three posibilities here.

With both of these cameras at this time we are limited to a sample of one.

1) So it could be that these cameras are faulty (we eliminate this by testing on alternative hardware) note they could be faulty and still work with alternative hardware i.e. hardware with a more robust USB driver or power supply.

2) The second posibility is a driver issue to test this we need to connect the cameras to systems using the same operating system In this case it would be whatever flavour (distro) of Linux you had the failure on if the hardware passes this test as well at least we have narrowed it down to some issue with the RaspberryPi

3) Any confirmation would come fro a third party managing to get the camera to work with a RPi.

So the call is out do we have an answer to any or all of these posibilities.

And this does not exclude the posibility of two faulty RPi's 2 in a a half million sample is a small incidence.
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

cupcake
Posts: 59
Joined: Sat Jan 21, 2012 9:00 pm

Re: Webcam troubles: Turns off after a few frames

Fri Sep 21, 2012 3:41 pm

Jim JKla wrote:1) So it could be that these cameras are faulty (we eliminate this by testing on alternative hardware) note they could be faulty and still work with alternative hardware i.e. hardware with a more robust USB driver or power supply.
As I briefly mentioned, I've had this problem on 3 different webcams (2 Logitechs and 1 Microsoft). So I doubt it's a problem with the webcam hardware.

I also find it unlikely that it is caused by drivers since I followed the simple webcam driver tutorial from the RPi wiki - which has been used and validated by many others.

I haven't been able to work on my project for a while, but last time I pretty much ended up concluding that it must be a power issue and that I should look into trying a different HUB (I'm using CyberPower CPH420P). It is worth noting, however, that other peripherals such as wifi adapter and wireless keyboard are working fine.

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: Webcam troubles: Turns off after a few frames

Fri Sep 21, 2012 4:15 pm

There is the posibility that you are just the first to find this problem.

You have not been forgotten ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

kaos
Posts: 108
Joined: Mon Mar 26, 2012 8:14 pm

Re: Webcam troubles: Turns off after a few frames

Fri Sep 21, 2012 5:37 pm

cupcake wrote:I also find it unlikely that it is caused by drivers since I followed the simple webcam driver tutorial from the RPi wiki - which has been used and validated by many others.
Do you have a link for that tutorial? I've just been traversing the Elinux wiki, but my search-fu seems to be lacking :(

--
Kári

User avatar
Bencom
Posts: 56
Joined: Wed Mar 07, 2012 10:40 pm
Location: New Zealand
Contact: Website

Re: Webcam troubles: Turns off after a few frames

Fri Sep 21, 2012 6:46 pm

My guess is anyone trying to run an up to date kernal is having the same problem and appears to be somewhere in the drivers. Perhaps v4l2. My kernal hacking skills have fallen way behind since the early slackware days when I rolled my own.

http://www.raspberrypi.org/phpBB3/viewt ... 8&p=178372

Return to “HATs and other add-ons”