Page 1 of 1

Webcam - EyeToy

Posted: Tue Jun 12, 2012 3:28 pm
by TenderLoins
I've taken a shining to Raspbian, but I have an issue which occurs with the original Debian image, the new Wheezy image, and every edition of Raspbian I can find.

When using a Namtai PS2 EyeToy (50ma current), the newest firmware drivers from Hexxeh pick up the camera immediately, and I see an entry as /dev/video0; perfect. It also picks up the fact that the cam has a mic built-in although I haven't tested, nor require its use.

I have a Belkin powered hub, which I've used to power the RPi, or an iPad charger. Both methods give me a TP1-TP2 reading thats within spec.

Now, I install motion via apt-get install motion, and it completes everything. I then play about with the config file to allow the capture to be streamed to another machine on my network.

Now, when I start motion (with motion -n) it'll find the webcam, then start sending messages about corrupted JPEG data every second or so, then it'll complain about a webcam fatal error, then it'll try and restart the camera. In the times when its saying corrupted JPEG data, I can get a picture out of the cam on my laptop, but it then crashes, and tries to re-open the connection.

After a few, or sometimes many times of crashing, and the retrying, it'll lock the camera in 'on' mode with its red LED on, and then say there is an IOCTL error (sic), and you cannot reconnect to the camera until you unplug and plug it back in.

I've tried plugging this directly into the RPi with nothing else (removing the keyboard), or through a powered hub. Same results.

I've read about USB packet loss which would make sense if some of the camera data is being lost when transferred, but other people have got webcams working fine.

Is there anything else I can try?

Re: Webcam - EyeToy

Posted: Tue Jun 12, 2012 4:06 pm
by funnel
I have same issues on Debian. Sometimes it works flawlessly and sometime fails and I need to unplug it and replug it to work again. I dumped the raw data from /dev/video0 and looked at it from a hexeditor. The normal jpeg size should be 0x8000 but sometimes, around 25% of the time, the jpeg is corrupted with a different size. I don't know why is doing that.

Re: Webcam - EyeToy

Posted: Tue Jun 12, 2012 5:16 pm
by TenderLoins
A little more information, if I press left on my keyboard, it'll repeat the characters every once in a while, which seems to match up with when the webcam fails.

TP1-TP2 is confirmed at a solid 4.9v throughout (just measured with a calibrated multimeter).

Attached is a screenshot, and a video of the exact loop (didn't have the IOCTL error). Video is with Wheezy, but applies to Raspbian.

Image
http://www.youtube.com/watch?v=k9WTo4Q9SHI