3 of 9
3
[Tutorial] PS3 Eye Working on Linux
Posted: 13 February 2009 03:49 PM   [ Ignore ]   [ # 31 ]
Rank
Joined  2007-12-09
Total Posts:  24
New Member

I tried to get the ps3 eye to work on my Ubuntu 8.10 installation (kernel 2.6.27-11-generic).

First I tried installing kaswy’s driver.

I typed on the command line:

cd /usr/src/gspca-ps3eyeMT
sudo make
sudo make install
sudo modprobe gspca_ov534 videomode
=04

Result was:

FATALError inserting gspca_ov534 (/lib/modules/2.6.27-11-generic/kernel/drivers/media/video/gspca/gspca_ov534.ko): Unknown symbol in module, or unknown parameter (see dmesg)

Then I tried installing vw_kubel’s suggestion, same error.

Is this an error from my part or is something else the matter? smile

edit: also, no video devices are detected when I plug in the ps3 eye (I checked using `ls /dev/video*`).
it does, however, detect 1 audio device (why not 4?)

Profile
 
 
Posted: 13 February 2009 04:32 PM   [ Ignore ]   [ # 32 ]
Avatar
Rank
Joined  2008-12-02
Total Posts:  31
New Member

Hi zun,

Could you post the result of:

modinfo gspca_ov534

just to be sure what module is actually installed.
Do not pass videmode param for the original driver, just for the modified one.

Are the results of your “make” and “make install” OK ?

 Signature 

My Setup :http://kaswy.free.fr

Profile
 
 
Posted: 13 February 2009 05:06 PM   [ Ignore ]   [ # 33 ]
Rank
Joined  2008-12-31
Total Posts:  37
New Member

There should only be 1 audio device, not 4. The video device will show up after 1) the driver is correctly loaded and 2) the camera is plugged in.

No need to run make as sudo, just the make install (since it has to actually write files to protected locations). That might or might not have an affect on how it compiled.

Try running modprobe again, the run “dmesg | tail” after it. That should give a little more error information. Kaswy’s “make” and “make install” suggestion is important too.

Profile
 
 
Posted: 13 February 2009 05:22 PM   [ Ignore ]   [ # 34 ]
RankRank
Joined  2008-12-10
Total Posts:  209
Member

I think there are 4 physical audio sources - the PS3 can use that data for position triangulation (assuming you’re making noise at it ) - as of yet I don’t think either the windows nor unix drivers make a distinction, just picking up the first audio source from the cam.

It could be neat to recognize all 4 sources.. I can imaging having a big ‘eye’ follow noises around the room on your MT device.. which you can walk up and poke when it starts to annoy you wink

 Signature 

22” LLP-LCD ftw
TUIO Smoke (Windows / Linux) - http://projects.edencomputing.com/projects/tuiosmoke

Profile
 
 
Posted: 13 February 2009 05:46 PM   [ Ignore ]   [ # 35 ]
Avatar
RankRankRank
Joined  2008-06-16
Total Posts:  330
Sr. Member
cicada - 13 February 2009 05:22 PM

I think there are 4 physical audio sources - the PS3 can use that data for position triangulation (assuming you’re making noise at it ) - as of yet I don’t think either the windows nor unix drivers make a distinction, just picking up the first audio source from the cam.

This is interesting, I wasn’t aware of that. A very exciting feature!
But shouldn’t that just be a single audio device with four channels then?

Anyway I just will paste some Wikipedia quotes, to answer right away my own questions from above on video and audio capabilities:

The PlayStation Eye is capable of capturing standard video with frame rates of 60 hertz at a 640x480 pixel resolution, and 120 hertz at 320x240 pixels.
The PlayStation Eye is capable of outputting video to the console uncompressed, with “no compression artifacts” or with optional JPEG compression.

The PlayStation Eye features a built-in four-capsule microphone array, with which the PlayStation 3 can employ technologies for multi-directional voice location tracking, echo cancellation, and background noise suppression. This allows the peripheral to be used for speech recognition and audio chat in noisy environments without the use of a headset. The PlayStation Eye microphone array operates with each channel processing 16-bit samples at a sampling rate of 48 kilohertz, and a signal-to-noise ratio of 90 decibels

 Signature 

TUIO community site: http://www.tuio.org
reacTIVision framework: http://reactivision.sf.net
TUIO & reacTIVision CVS: http://sf.net/projects/reactivision
reacTIVision forum: http://sf.net/apps/phpbb/reactivision

Profile
 
 
Posted: 13 February 2009 06:42 PM   [ Ignore ]   [ # 36 ]
Rank
Joined  2007-12-09
Total Posts:  24
New Member

Thanks for your suggestions smile This is what I got, no luck so far, though.

I first uninstalled both by doing a

sudo make rminstall

(from both source dirs)

then I did a `sudo make clean` to remove previous build files.

I have to use `sudo make`, because I’m building from /usr/src/ (need to be root for that path), i.e. it can’t generate files otherwise.
To be safe, I copied the source to an user-writable dir and ran the `make` (no sudo) command from there, no errors. I did have some warnings, but they aren’t as bad as errors, right? The warning was the same for all: “warning: format not a string literal and no format arguments”. It finished without errors.

The `sudo make install` also didn’t give any errors

Then I runned the command kaswy suggested:

modinfo gspca_ov534 
filename
:       /lib/modules/2.6.27-11-generic/kernel/drivers/media/video/gspca/gspca_ov534.ko
license
:        GPL
description
:    GSPCA/OV534 USB Camera Driver(kaswy mod for MT use)
author:         Antonio Ospite <ospite@studenti.unina.it>
srcversion:     77B5879429E667F55ECDB80
alias
:          usb:v1415p2000d*dc*dsc*dp*ic*isc*ip*
depends:        gspca_main,usbcore
vermagic
:       2.6.27-11-generic SMP mod_unload modversions 586 
parm
:           videomode:
Set the videomode=xx (int)

Output seems ok to me, but still no video device (it’s plugged in after the driver was installed):

ls /dev/video*
lscannot access /dev/video*: No such file or directory

Then I runned modprobe again:

sudo modprobe gspca_ov534 videomode=04
FATAL
Error inserting gspca_ov534 (/lib/modules/2.6.27-11-generic/kernel/drivers/media/video/gspca/gspca_ov534.ko): Unknown symbol in module, or unknown parameter (see dmesg)

And here’s the dmesg tail:

dmesg tail
[533182.627876] gspca_ov534
disagrees about version of symbol gspca_frame_add
[533182.627885] gspca_ov534
Unknown symbol gspca_frame_add
[533182.628258] gspca_ov534
disagrees about version of symbol gspca_disconnect
[533182.628260] gspca_ov534
Unknown symbol gspca_disconnect
[533182.628343] gspca_ov534
disagrees about version of symbol gspca_resume
[533182.628347] gspca_ov534
Unknown symbol gspca_resume
[533182.628434] gspca_ov534
disagrees about version of symbol gspca_dev_probe
[533182.628434] gspca_ov534
Unknown symbol gspca_dev_probe
[533182.628526] gspca_ov534
disagrees about version of symbol gspca_suspend
[533182.628528] gspca_ov534
Unknown symbol gspca_suspend

Profile
 
 
Posted: 14 February 2009 04:02 AM   [ Ignore ]   [ # 37 ]
Avatar
Rank
Joined  2008-12-02
Total Posts:  31
New Member

Hi zun,

It seems your driver module is correctly installed,
but you have a problem with videodev module or v4l library.

Could you :

cd gspca-xxxxxxxx/v4l2-apps/
make
sudo make install

This make build the good libv4l2.so library and install it in /usr/lib/
Now rebuild the driver like usual and It should work.

if not,
Your loaded videodev module is not the good version (conflict):
1)Move your actual /lib/modules/your kernel/kernel/drivers/media directory to somewhere else (backup)
2)Rebuild and reinstall the gspca driver.

Now, it should really work !
good luck !

 Signature 

My Setup :http://kaswy.free.fr

Profile
 
 
Posted: 14 February 2009 07:26 AM   [ Ignore ]   [ # 38 ]
Rank
Joined  2007-12-09
Total Posts:  24
New Member

Hi kaswy,

I did the make and sudo make install in the v4l2-apps dir, it didn’t work. This is what I tried next:

cd /lib/modules/2.6.27-11-generic/kernel/drivers
mv media media
.bak
cd 
/usr/src/gspca-ps3eyeMT/v4l2-apps/
sudo make clean
cd 
/usr/src/gspca-ps3eyeMT
sudo make clean
sudo make
sudo make install

modinfo gspca_ov534
filename
:       /lib/modules/2.6.27-11-generic/kernel/drivers/media.bak/video/gspca/gspca_ov534.ko
license
:        GPL
description
:    GSPCA/OV534 USB Camera Driver(kaswy mod for MT use)
author:         Antonio Ospite <ospite@studenti.unina.it>
srcversion:     77B5879429E667F55ECDB80
alias
:          usb:v1415p2000d*dc*dsc*dp*ic*isc*ip*
depends:        gspca_main,usbcore
vermagic
:       2.6.27-11-generic SMP mod_unload modversions 586 
parm
:           videomode:
Set the videomode=xx (int)

(*
plugged in camera here*)

ls /dev/video*
lscannot access /dev/video*: No such file or directory

(*unplugged camera*)

sudo modprobe gspca_ov534 videomode=04
FATAL
Error inserting gspca_ov534 (/lib/modules/2.6.27-11-generic/kernel/drivers/media.bak/video/gspca/gspca_ov534.ko): Unknown symbol in module, or unknown parameter (see dmesg)

(*
plugged in camera*)

ls /dev/video*
lscannot access /dev/video*: No such file or directory

(*unplugged camera*)
cd /usr/src/gspca-ps3eyeMT/v4l2-apps/
sudo make
sudo make install

(*plugged in camera here*)

ls /dev/video*
lscannot access /dev/video*: No such file or directory

(*unplugged camera*)

sudo modprobe gspca_ov534 videomode=04
FATAL
Error inserting gspca_ov534 (/lib/modules/2.6.27-11-generic/kernel/drivers/media.bak/video/gspca/gspca_ov534.ko): Unknown symbol in module, or unknown parameter (see dmesg)

(*
plugged in camera*)

ls /dev/video*
lscannot access /dev/video*: No such file or directory

Here’s the dmesg tail again:

dmesg tail -f
[578804.304836] gspca_ov534
disagrees about version of symbol gspca_disconnect
[578804.304839] gspca_ov534
Unknown symbol gspca_disconnect
[578804.304925] gspca_ov534
disagrees about version of symbol gspca_resume
[578804.304927] gspca_ov534
Unknown symbol gspca_resume
[578804.305005] gspca_ov534
disagrees about version of symbol gspca_dev_probe
[578804.305007] gspca_ov534
Unknown symbol gspca_dev_probe
[578804.305090] gspca_ov534
disagrees about version of symbol gspca_suspend
[578804.305092] gspca_ov534
Unknown symbol gspca_suspend
[578934.585022] usb 4
-3reset high speed USB device using ehci_hcd and address 2

I hope this is information you can do something with.

Oh, btw, I got this warning message during the make of v4l2-apps:

In function ‘snprintf’,
    
inlined from ‘pts_to_string’ at ivtv-ctl.c:194,
    
inlined from ‘main’ at ivtv-ctl.c:559:
/
usr/include/bits/stdio2.h:65warningcall to __builtin___snprintf_chk will always overflow destination buffer

It did finish without errors, though.

edit: conclusion, it still doesn’t work rasberry

Profile
 
 
Posted: 14 February 2009 08:04 AM   [ Ignore ]   [ # 39 ]
Avatar
Rank
Joined  2008-12-02
Total Posts:  31
New Member

$ $ modinfo gspca_ov534
filename:  /lib/modules/2.6.27-11-generic/kernel/drivers/media.bak/video/gspca/gspca_ov534.ko

Your media.bak backup should not be here, put it out of /lib/modules/.... (ie:/tmp) , and rebuild/install gspca.

 Signature 

My Setup :http://kaswy.free.fr

Profile
 
 
Posted: 14 February 2009 08:47 AM   [ Ignore ]   [ # 40 ]
Rank
Joined  2007-12-09
Total Posts:  24
New Member

Ok, I moved the media and media.bak directories to /tmp (so there wasn’t any directory named “media”, or variant there of, in there anymore).

then:

sudo make clean
sudo make
sudo make install

modinfo gspca_ov534
filename
:       /lib/modules/2.6.27-11-generic/kernel/drivers/media/video/gspca/gspca_ov534.ko
license
:        GPL
description
:    GSPCA/OV534 USB Camera Driver(kaswy mod for MT use)
author:         Antonio Ospite <ospite@studenti.unina.it>
srcversion:     77B5879429E667F55ECDB80
alias
:          usb:v1415p2000d*dc*dsc*dp*ic*isc*ip*
depends:        gspca_main,usbcore
vermagic
:       2.6.27-11-generic SMP mod_unload modversions 586 
parm
:           videomode:
Set the videomode=xx (int)

So far so good, then I plugged in the cam, it wasn’t detected.

sudo modprobe gspca_ov534 videomode=04
FATAL
Error inserting gspca_ov534 (/lib/modules/2.6.27-11-generic/kernel/drivers/media/video/gspca/gspca_ov534.ko): Unknown symbol in module, or unknown parameter (see dmesg)

Then I tried your other suggestion again:

cd /usr/src/gspca-ps3eyeMT/v4l2-apps/
sudo make
sudo make install

result of sudo make install
:

make -C lib install
make[1]
Entering directory `/usr/src/gspca-ps3eyeMT/v4l2-apps/lib'
mkdir -p /usr/include
cp v4l2.h /usr/include
mkdir -p /usr/lib
cp libv4l2.so libv4l2.a /usr/lib
make[1]: Leaving directory 
`/usr/src/gspca-ps3eyeMT/v4l2-apps/lib'
make -C util install
make[1]: Entering directory `/usr/src/gspca-ps3eyeMT/v4l2-apps/util'
mkdir -/usr/bin
cp v4l2
-ctl v4l2-dbg v4l2-compliance ivtv-ctl cx18-ctl /usr/bin
make[1]
Leaving directory `/usr/src/gspca-ps3eyeMT/v4l2-apps/util'
make -C test install
make[1]: Entering directory 
`/usr/src/gspca-ps3eyeMT/v4l2-apps/test'
make[1]: Nothing to be done for `install'
.
make[1]Leaving directory `/usr/src/gspca-ps3eyeMT/v4l2-apps/test'

Still couldn’t load the driver with modprobe and the cam also is still not detected.

I wonder if my kernel is cursed, lol.

Profile
 
 
Posted: 15 February 2009 02:02 PM   [ Ignore ]   [ # 41 ]
Rank
Joined  2007-12-09
Total Posts:  24
New Member

kaswy and I tried some other solutions in the mean time.

The problem was that their already was a gspca driver loaded, so I’ll explain the steps here in case someone else has the same problem.

First check if you have a gspca driver loaded by giving the following command:

lsmod grep gspca

If you see any output, it means you have a gspca driver loaded (this is not good if you want to use kaswy’s driver).

In my case I saw this:

lsmod grep gspca
gspca_pac207           14848  0 
gspca_main             29312  1 gspca_pac207
videodev               41344  1 gspca_main
usbcore               149360  11 snd_usb_audio
,snd_usb_lib,gspca_pac207,gspca_main,lmpcm_usb,usbhid,usb_storage,libusual,ehci_hcd,uhci_hcd

The following command solves it:

modprobe -r gspca_pac207

(if it says something else than pac207, make sure you adjust the command accordingly)

then, to be on the safe side, I did this:

I moved the dir /lib/modules/2.6.27-11-generic/kernel/drivers/media to a temporary location (as backup, and make sure it’s outside of /lib/modules, e.g. /tmp/media.bak)

go to the source dir and then

make clean
make
sudo make install

you may verify the install by typing

modinfo gspca_ov534

and then the final command:

sudo modprobe gspca_ov534 videomode=04

Now, plug in the camera and it should be recognized!

You can check by doing a

ls /dev/video*

before and after you plugged in the ps3 cam, it should show another device after it’s plugged in!

Thanks and credits to kaswy for the solution grin

Profile
 
 
Posted: 22 February 2009 10:28 PM   [ Ignore ]   [ # 42 ]
RankRank
Joined  2008-12-10
Total Posts:  209
Member

I finally got around to trying this driver in linux, and (after a bit of a fight) I got it up and running, superb work kaswy!

I do have a couple of gripes however - one is surely an intentional change in the driver, the other something that will likely have to be handled by better v4l integration.

1) The image is mirrored at every resolution - the can in the image above should read ‘Diet Sunkist’ and not ‘tsiknuS tieD’ smile

ps3eye-mirrorsunkist.jpg



2) Oh, for the love of fuzz!  The cam image seems to be very lighting-dependent.. the slightest illumination changes can have a drastic effect on the image quality.  I’m sure this is either due to not accessing the ‘raw’ image as kaswy stated in a previous post, or due to the lack of v4l video controls. 

Here’s the cam image with ‘ideal’ lighting, at 320x240 @ 100fps (pretty!)

ps3eye-clear.jpg

And here’s the image with my hand in the frame, altering the lighting somewhat, same settings as above ( not so pretty :( )

ps3eye-fuzzy.jpg


So, still great work kaswy, I’m very happy to have selectable framerate/resolution in linux now.. I feel much more at home smile
Now, anyone have any ideas how to clean up the image in low light?

 Signature 

22” LLP-LCD ftw
TUIO Smoke (Windows / Linux) - http://projects.edencomputing.com/projects/tuiosmoke

Profile
 
 
Posted: 23 February 2009 09:50 PM   [ Ignore ]   [ # 43 ]
Rank
Joined  2008-12-31
Total Posts:  37
New Member

cicada: interesting, thanks for sharing your experience. I don’t have the mirrored problem, my image is inverted. Lighting and fuzziness aren’t problems here either.

My biggest problem (still) is repeated freezing of the image. It does this on two different computers, Windows XP, Windows Vista, Ubuntu, no matter what I try..

I’m going to build the v0.3 right now to test that.. We’ll see.

[edit] ... Shoulda tried the v0.3 earlier… I guess the flipped problem was a known bug, since it works properly now. Freezing is just about good enough to use for MT experimentation, so I’ll test that sometime soon. Still, there has to be a way to make it smoother…

Profile
 
 
Posted: 03 March 2009 07:26 PM   [ Ignore ]   [ # 44 ]
Rank
Joined  2009-03-03
Total Posts:  9
New Member

Wow, this is incredible.  I never realized how slow 30fps looked until seeing 60fps VGA.  And in such a cheap camera too.

I’m using it with the v4l2 module in Pygame SVN.

Profile
 
 
Posted: 10 March 2009 08:08 PM   [ Ignore ]   [ # 45 ]
Rank
Joined  2009-03-10
Total Posts:  22
New Member

Has anyone had lag problems with the camera?  I set up Kaswy’s driver on my laptop, and it looks really smooth at 100+ fps… but the video is lagged by about 1 second.

Profile
 
 
   
3 of 9
3
 
‹‹ Why 5?      Binoculars idea for camera ››