How to get a webcam working?


11 posts
by ryanteck » Wed Jun 06, 2012 7:58 am
Hi There :)

After using my Pi as a webserver My next project is to make it into a Robot car, while I wait for a Logic Level Converter so I can interface it with my arduino I am trying to get the webcam part of my robot working. After looking in my cable draws I found that I had two cameras, A Logitech (C170 I think) (Doing a google I found NOTE: The C170 is not supported on Windows 98, Windows ME, Windows 2000, Mac OS, UNIX or Linux operating systems. on Logitech website, but it might still be possible) And a EyeToy Camera (First one / PS2 one)

Both cameras show up when typing lsusb into terminal but cheese does not detect them. I also found that in the directory /dev that video0 does not exist.

Does anyone have any tips? I Guess the eyetoy one might have a better chance as it was designed for a games console that normally are based off linux in some way.

Thanks - Ryan ;)
Ryan Walmsley
17 Year Old Student & Geek
User avatar
Posts: 67
Joined: Mon Apr 16, 2012 10:49 am
Location: Stevenage , United Kingdom
by Elegor » Wed Jun 06, 2012 8:12 am
I got the PS3 Eye working, so you could try following what I did: viewtopic.php?p=91076#p91076
Posts: 21
Joined: Sun Aug 28, 2011 10:41 pm
Location: UK
by funnel » Wed Jun 06, 2012 8:15 am
Update your Pi with the latest kernel https://github.com/Hexxeh/rpi-update. They added support for both of your webcams a few days ago. Do a search on the forum there are many threads about the rc car, webcam topic.
Posts: 46
Joined: Sat May 05, 2012 8:00 am
by ryanteck » Wed Jun 06, 2012 8:55 am
Updating it now, Hopefully it will work :3

I did have the eyetoy running off ubuntu at one point so it should work with linux :D

Edit: They both detect :D
Thanks for all the help ;)
Ryan Walmsley
17 Year Old Student & Geek
User avatar
Posts: 67
Joined: Mon Apr 16, 2012 10:49 am
Location: Stevenage , United Kingdom
by ryanteck » Wed Jun 06, 2012 10:08 am
Hmm, Now using motion to stream it shows up with the error : Corrupt JPEG data: premature end of data segment,

This is using the eye toy. The Logitech keeps having other errors :(

Edit: the Eyetoy comes up with [1] ioctl (VIDIOCGCAP): Inappropriate ioctl for device as the error. Does anyone know how to fix?
Ryan Walmsley
17 Year Old Student & Geek
User avatar
Posts: 67
Joined: Mon Apr 16, 2012 10:49 am
Location: Stevenage , United Kingdom
by TenderLoins » Sat Jun 09, 2012 11:50 am
The USB driver in the kernel has packet loss issues; im seeing the same issues as you but with an EyeToy. Not sure if these issues are related but makes sense in my head.

It will stream, but eventually motion closes the webcam, and then reopens the webcam over and over again. I found the problem worse when running through a powered USB hub, but it still happened if I had only the EyeToy plugged directly into the Pi.
Posts: 12
Joined: Tue May 29, 2012 11:48 am
by ryanteck » Sat Jun 09, 2012 11:56 am
By the looks of it arch linux might have better compatibility with the camera so I will be trying that soon,

I found that running it via a USB hub (Not powered) worked worse.
Ryan Walmsley
17 Year Old Student & Geek
User avatar
Posts: 67
Joined: Mon Apr 16, 2012 10:49 am
Location: Stevenage , United Kingdom
by roberto » Sat Jun 09, 2012 5:14 pm
Tried with Hexxeh Patch, now my Logitech C22 is recognized, Motion fully fonctionnal.
Posts: 5
Joined: Wed Jun 06, 2012 12:05 pm
by ryanteck » Wed Jun 13, 2012 9:03 pm
Just tried again, found the logitech one used too much power (requires around 500mA :C )

The eyetoy seems to be crashing out still :(
Ryan Walmsley
17 Year Old Student & Geek
User avatar
Posts: 67
Joined: Mon Apr 16, 2012 10:49 am
Location: Stevenage , United Kingdom
by ryanteck » Thu Jun 14, 2012 8:55 am
Going to post this in troubleshooting as this is now an error.

Thanks :)
Ryan Walmsley
17 Year Old Student & Geek
User avatar
Posts: 67
Joined: Mon Apr 16, 2012 10:49 am
Location: Stevenage , United Kingdom
by ashbash » Fri Jun 15, 2012 10:56 am
ryanteck wrote:Going to post this in troubleshooting as this is now an error.

Thanks :)



Have you updated using hexxeh's f/w script?
Posts: 50
Joined: Fri Jun 01, 2012 9:20 am