LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing spca5xx driver for webcam (https://www.linuxquestions.org/questions/linux-newbie-8/installing-spca5xx-driver-for-webcam-725092/)

JOtis02 05-10-2009 10:23 PM

Installing spca5xx driver for webcam
 
I am trying to install the spca5xx driver for a webcam on my Sony Vaio PCG-FR130 notebook with Fedora Core 10 installed. Kernel Version 2.6.27.21-170.2.56.fc10.i686

Here is what I have done so far.

1) lsusb shows Bus 003 Device 004: ID 093a:2460 Pixart Imaging, Inc. Q-TEC WEBCAM 100

2)I looked in http://mxhaard.free.fr/spca5xx.html to see if spca5xx supports my webcam, it does.

3)I downloaded "for kernel up from 2.6.11 : gspcav1-20071224.tar.gz"
-unzipped directory

4)In the read/install file, it said...

- Before trying to compile the driver, ensure that you've configured your kernel, and updated the dependencies:
'make [config|menuconfig|xconfig]; make dep'.

(I do not know what this means)

-Run as root go to gspcav1 directory and run:
./gspca_build

I tried this, and the output was..

REMOVE the old module if present
ERROR: Module gspca does not exist in /proc/modules

CLEAN gspca source tree
rm -r -f *.o decoder/.gspcadecoder.o.cmd decoder/*.o \
.gspca.o.cmd *.o *.ko *.mod.* .[a-z]* core *.i \
*.symvers *.err

COMPILE gspca Please Wait ....!!

INSTALL gspca in the kernel binary tree
mkdir -p /lib/modules/`uname -r`/kernel/drivers/usb/media/
rm -f /lib/modules/`uname -r`/kernel/drivers/usb/media/spca5xx.ko
rm -f /lib/modules/`uname -r`/kernel/drivers/media/video/gspca.ko
install -c -m 0644 gspca.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/
install: cannot stat `gspca.ko': No such file or directory
make: *** [install] Error 1

LOAD gspca in memory
FATAL: Module gspca not found.

PRINT COMPILATION MESSAGES if ERRORS look kgspca.err
make -C /lib/modules/`uname -r`/build SUBDIRS=/home/JOtis/Download/gspca/gspcadir CC=cc modules
make[1]: Entering directory `/usr/src/kernels/2.6.27.21-170.2.56.fc10.i686'
CC [M] /home/JOtis/Download/gspca/gspcadir/gspca_core.o
/home/JOtis/Download/gspca/gspcadir/gspca_core.c:54:27: error: asm/semaphore.h: No such file or directory
/home/JOtis/Download/gspca/gspcadir/gspca_core.c: In function ‘spca5xx_ioctl’:
/home/JOtis/Download/gspca/gspcadir/gspca_core.c:2463: error: implicit declaration of function ‘video_usercopy’
/home/JOtis/Download/gspca/gspcadir/gspca_core.c: At top level:
/home/JOtis/Download/gspca/gspcadir/gspca_core.c:2609: error: unknown field ‘owner’ specified in initializer
/home/JOtis/Download/gspca/gspcadir/gspca_core.c:2609: warning: initialization from incompatible pointer type
/home/JOtis/Download/gspca/gspcadir/gspca_core.c:2611: error: unknown field ‘type’ specified in initializer
/home/JOtis/Download/gspca/gspcadir/gspca_core.c: In function ‘spca50x_create_sysfs’:
/home/JOtis/Download/gspca/gspcadir/gspca_core.c:2769: error: implicit declaration of function ‘video_device_create_file’
/home/JOtis/Download/gspca/gspcadir/gspca_core.c:2780: error: implicit declaration of function ‘video_device_remove_file’
/home/JOtis/Download/gspca/gspcadir/gspca_core.c: In function ‘spca5xx_probe’:
/home/JOtis/Download/gspca/gspcadir/gspca_core.c:4301: error: incompatible types in assignment
make[2]: *** [/home/JOtis/Download/gspca/gspcadir/gspca_core.o] Error 1
make[1]: *** [_module_/home/JOtis/Download/gspca/gspcadir] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.27.21-170.2.56.fc10.i686'
make: *** [default] Error 2


I do not know what any of these errors mean or why they were caused, can anyone help me install this driver?

osor 05-11-2009 01:48 AM

Quote:

Originally Posted by JOtis02 (Post 3536575)
I am trying to install the spca5xx driver for a webcam on my Sony Vaio PCG-FR130 notebook with Fedora Core 10 installed. Kernel Version 2.6.27.21-170.2.56.fc10.i686

Here is what I have done so far.

1) lsusb shows Bus 003 Device 004: ID 093a:2460 Pixart Imaging, Inc. Q-TEC WEBCAM 100

2)I looked in http://mxhaard.free.fr/spca5xx.html to see if spca5xx supports my webcam, it does.

The first question is: are you sure your kernel doesn’t already support this device? The gspca driver is included in vanilla kernels since 2.6.27. Vendor kernels might even include it sooner, but it looks like fedora 10 uses 2.6.27 as their base kernel version.

I suggest you look at the output of
Code:

zgrep GSPCA /proc/config.gz
to make sure that it is included in your vendor build.

If neccessary, just do
Code:

modprobe gspca_pac207
and the driver should be loaded. It will be usable as a normal v4l2 device (with both capture and stream capabilities).

JOtis02 05-11-2009 04:38 PM

Quote:

Originally Posted by osor (Post 3536708)
The first question is: are you sure your kernel doesn’t already support this device? The gspca driver is included in vanilla kernels since 2.6.27. Vendor kernels might even include it sooner, but it looks like fedora 10 uses 2.6.27 as their base kernel version.

I suggest you look at the output of
Code:

zgrep GSPCA /proc/config.gz
to make sure that it is included in your vendor build.

If neccessary, just do
Code:

modprobe gspca_pac207
and the driver should be loaded. It will be usable as a normal v4l2 device (with both capture and stream capabilities).


I am getting the following output from "zgrep GSPCA /proc/config.gz"
gzip: /proc/config.gz: No such file or directory

And it also says modprobe is not a command

NeddySeagoon 05-11-2009 04:46 PM

JOtis02,

You need to be root or use sudo to modprobe. The command is in /sbin
zgrep GSPCA /proc/config.gz failed as your kernel does not export its config file in /proc
Thats a kernel build time option, it does not affect how it works.

Try
Code:

modprobe -l | grep spca
to see if you have any modules with spca in their name.

osor 05-11-2009 08:40 PM

Quote:

Originally Posted by JOtis02 (Post 3537510)
I am getting the following output from "zgrep GSPCA /proc/config.gz"
gzip: /proc/config.gz: No such file or directory

As NeddySeagoon says, this means that “config.gz” support was not enabled in your vendor kernel (an increasing trend among distributions). If you want, you should be able to find your current config elsewhere (e.g., /boot/config-2.6.27.21-170.2.56.fc10.i686 or something similar).

If my analysis is correct (and you are indeed using a 2.6.27 kernel), you should be able to do
Code:

grep GSPCA /boot/config-2.6.27.21-170.2.56.fc10.i686
Successful output should show the driver built as a module (CONFIG_USB_GSPCA=m) or the driver built into the kernel (CONFIG_USB_GSPCA=y). The first case is most likely.

If the driver is built as a module, it will, as pointed out above, show up in
Code:

/sbin/modprobe -l | grep pac207
If it was already loaded automatically, it will show up in:
Code:

/sbin/modprobe | grep pac207
If not you will have to load the module manually (or add it to your init scripts). As pointed out above, you will most likely need root privileges:
Code:

/sbin/modprobe gspca_pac207
Once the module has been loaded (either manually or automatically), you should see a device node named /dev/video0 or similar. Also you might have dmesg output showing the driver loading:
Code:

dmesg | grep -iC5 video

Linux video capture interface: v2.00
pac207: main v2.2.0 registered


sanjaydebnath 05-18-2009 08:09 AM

I am using fedora FC10 with 2.6.29.3-60.fc10.x86_64 with ID 0c45:613c Microdia PC Camera (SN9C120).
Tried to install to gspca (as root) from http://mxhaard.free.fr/spca50x/Investigation/Gspca/
It came up with error:
# ./gspca_build

REMOVE the old module if present
ERROR: Module gspca does not exist in /proc/modules

CLEAN gspca source tree
rm -r -f *.o decoder/.gspcadecoder.o.cmd decoder/*.o \
.gspca.o.cmd *.o *.ko *.mod.* .[a-z]* core *.i \
*.symvers *.err

COMPILE gspca Please Wait ....!!

INSTALL gspca in the kernel binary tree
mkdir -p /lib/modules/`uname -r`/kernel/drivers/usb/media/
rm -f /lib/modules/`uname -r`/kernel/drivers/usb/media/spca5xx.ko
rm -f /lib/modules/`uname -r`/kernel/drivers/media/video/gspca.ko
install -c -m 0644 gspca.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/
install: cannot stat `gspca.ko': No such file or directory
make: *** [install] Error 1

Followed the thread here and checked:

modprobe -l | grep spca
Shows:
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_spca561.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_pac7311.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_spca501.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_t613.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_tv8532.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_finepix.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_mars.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_vc032x.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_sonixj.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_stk014.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_sonixb.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/stv06xx/gspca_stv06xx.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_ov519.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_conex.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_spca506.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_pac207.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_spca508.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_zc3xx.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/m5602/gspca_m5602.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_main.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_sunplus.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_spca500.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_ov534.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_spca505.ko
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_etoms.ko

grep GSPCA /boot/config-2.6.29.3-60.fc10.x86_64
Shows:
CONFIG_USB_GSPCA=m

/sbin/modprobe -l | grep pac207
shows:
/lib/modules/2.6.29.3-60.fc10.x86_64/kernel/drivers/media/video/gspca/gspca_pac207.ko

dmesg | grep -iC5 video
Shows:
Linux video capture interface: v2.00
sn9c102: V4L2 driver for SN9C1xx PC Camera Controllers v1:1.47pre49
usb 2-2: SN9C120 PC Camera Controller detected (vid:pid 0x0C45:0x613C)

I am not sure if everything is OK. I cannot use webcam in skype or not even in amsn.

In skype it says "No devices found".
In amsn it says "Cannot display the webcam's image. Make sure your webcam is well plugged and installed. no grabber device available"
Another thing I noticed that when I try to open Cheese it flashes once and nothing happens.

Any help is greatly appreciated!!!
Cheers

NeddySeagoon 05-18-2009 01:40 PM

sanjaydebnath,
Code:

Linux video capture interface: v2.00
cound be a problem.
Check skype to see if it wants Video For Linux v1 or v2

sanjaydebnath 05-19-2009 03:20 AM

Hi NeddySeagoon

Quote:

Check skype to see if it wants Video For Linux v1 or v2
How do I do that?

sanjaydebnath 05-19-2009 03:21 AM

With cheese, I am getting:

cheese

** (cheese:3598): WARNING **: Unable to connect to dbus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

** (cheese:3598): CRITICAL **: dbus_g_connection_register_g_object: assertion `connection != NULL' failed

** (cheese:3598): CRITICAL **: dbus_g_proxy_new_for_name: assertion `connection != NULL' failed

** (cheese:3598): CRITICAL **: dbus_g_proxy_call: assertion `DBUS_IS_G_PROXY (proxy)' failed

osor 05-19-2009 04:01 PM

Skype is known to have problems with v4l, but it does not look like skype is the problem here. You might have an access or security error preventing you from correctly reading from the video capture device.

To see the permissions, look at the output of “ls -l /dev/video0” where video0 is the name of your capture device.

JOtis02 05-19-2009 09:43 PM

I found that this command loads the necessary libraries and enables the webcam to work with skype. The brightness settings are slightly off, is there a way to adjust brightness levels of the webcam? Skype does not appear to have a brightness control option.

D_PRELOAD=/usr/lib/liv4/v42convert.so skype


All times are GMT -5. The time now is 05:18 PM.