LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   webcam install (https://www.linuxquestions.org/questions/linux-hardware-18/webcam-install-216964/)

d1l2w3 08-12-2004 10:29 PM

webcam install
 
Trying to install Micro Webcam IC150C.
Continusously get the error message:
Could not connnect to video device /dev/video0.
Please check connection.

/dev/video0 exists.
Any ideas on solving this problem.

dlw

slackist 08-13-2004 05:31 AM

What are the file permissions on /dev/video0?

Post the output of ls -l /dev/video0

d1l2w3 08-13-2004 09:05 AM

permissions for /dev/video0 are 'don:video"
ls -l /dev/video gives the following:
crw------- 1 don video 81, 0 Aug 13 06:28 /dev/video0

d1l2w3 08-13-2004 09:12 AM

This is what happens when I try to use 'xawtv'.
This is xawtv-3.91, running on Linux/i686 (2.6.3-7mdk)
can't open /dev/v4l/video0: No such file or directory
v4l-conf had some trouble, trying to continue anyway
v4l2: open /dev/v4l/video0: No such file or directory
v4l2: open /dev/v4l/video0: No such file or directory
v4l: open /dev/v4l/video0: No such file or directory
no video grabber device available

Are the two related.
How do I find out if v4l exists?

dlw

slackist 08-13-2004 09:21 PM

Here is my set-up
Code:

mark@~/$ ls -l /dev/video0
crw-rw-rw-    1 root    sys      81,  0 Mar 10  2003 /dev/video0

so try (as root) chmod 766 /dev/video0 to give read and write permissions to others and world but I don't think that is the problem,

I'm not really up on this stuff, esp Mandrake, is user don a member of the group video?

As for the v4l part I really can't say, when I installed xawtv (version 3.93 BTW) I only had to change permissions on /dev/video0 to give rw to others since it belonged to root and it worked, that's why I suggested looking at the permissions first.

To find out if v4l exists do locate v4l
Maybe the manual pages on v4l will give you some ideas?

Sorry I can't help more,

mark

NEWSFLASH I just tried my camera out and it doesn't work any more :scratch: :cry: hopefully somebody who knows what they are doing will chime in lol :o

slackist 08-14-2004 06:09 AM

This is leaving me :scratch:

After a bit of googling if I run xawtv -noxv my webcam (creative webcam3 works fine)
so I think I am going to have to hit the man pages and google more, sorry I couldn't help you more,

mark

d1l2w3 08-14-2004 10:01 AM

Webcam problem
 
Has anyone been able to get a Micro IC150C working with MDK 10?
I keep getting a cannot connect to '/dev/video0' error.
'/dev/video0' is there. I have permission.
'sane-find-scanner' shows it as a 0x0461 0x0815 libusb:002:003

Any ideas on how to solve this.

dlw

Slyder42 08-20-2004 10:00 AM

Re: Webcam problem
 
Quote:

Originally posted by d1l2w3
Has anyone been able to get a Micro IC150C working with MDK 10?
I keep getting a cannot connect to '/dev/video0' error.
'/dev/video0' is there. I have permission.
'sane-find-scanner' shows it as a 0x0461 0x0815 libusb:002:003

Any ideas on how to solve this.

dlw

I might be of SOME help, but you won't get anywhere looking for that.... Assuming you are running X-desktop...If you go to hardware browser... that maybe the model number... but who is the chipset manufactured by? It definitely is NOT Micro Innovations. I got almost the same webcam and trying to find the same thing. I'll keep posting and see what I can find.

wytiger 08-20-2004 05:19 PM

I have the same thing! So I'll share what I have so far...

The spca50x driver supposedly works with it (http://spca50x.sourceforge.net), and more importantly, if you are running a 2.6.x kernel, use the driver here:
http://mxhaard.free.fr/download.html

I can compile the driver on my FC2 box, and it is recognized as an IC200C (not an IC150C, but I imagine that may not be an issue), but the screen only shows black using gspy, gqcam, etc.

Maybe you can have better luck with a different OS? Please let me know.

wytiger 08-24-2004 06:18 PM

You need the spca50x drivers, located here: http://mxhaard.free.fr/download.html

sevi 09-11-2004 01:53 PM

genius VideoCam Express V2
 
hi, i was trying to install the spca driver.
I've done the "make", and "make install" commands.

Quote:

If you have made install, do as root: modprobe spca50x
When I tried, i get the error message:

Quote:

modprobe: command not found
Where is the modprobe command???

I'm using Fedora Core 2, and a Genius Videocam Express v2 camera
The camera is on the list of supported cameras (in the spca readme file)
How to install the v4l driver? I have gnome-meeting with v4l plugin installed
Sorry, if its a silly queston, i'm a newbie :) Thx for the help

sorri for the bed inglishness :D:D

d1l2w3 09-12-2004 11:07 AM

Sorry about the delay. Went on vacation.
Downloaded 'spca' as suggested.
These are the instructions on how to install.

Kernel 2.4.x
configure your kernel
make dep
go to the spca5xx directories
make clean (to be sure)
make
if all goes right as root :
make install


Here is what happens when attemping to install.

[root@localhost /]# make dep
make: *** No rule to make target `dep'. Stop.

Tried as 'user' and 'root.'

How do I solve this?

dlw

wytiger 09-13-2004 11:26 PM

SUCCESS! Well, almost...

Even though the IC150 and IC200 share vendor and product IDs, they are different chipsets. I will have more info tomorrow since I did the work at the office, but changing the source to use the spca561 bridge worked for me.

Michel Xhaard has some info here, showing that the IC150 is in test, so I made some changes to the source to reflect this (latest release 10092004), and I am now able to see video through my IC150 using spcaview.

wytiger 09-13-2004 11:31 PM

For those that may be watching this thread instead of this one, I have had some success with the IC150. Since I did the work at the office, I will post my findings tomorrow for you.

XavierP 09-14-2004 01:16 AM

Moved: This thread is more suitable in Linux-Hardware and has been moved accordingly to help your thread/question get the exposure it deserves. I have asked for this post to be merged with your other, identical one, to keep the discussion in one place.

Next time it will be closed.

wytiger 09-14-2004 05:50 PM

OOps... messed up the patch.... sorry for those that read it... will repost with correct patch momentarily....

wytiger 09-14-2004 06:24 PM

My previous post's patch missed a pair of line changes. Here is the repost. Apologies for any confusion if you read the previous...

This patch will work for the spca5xx-10092004 release. It has been tested successful for me on FC2, but YMMV.

Please note that this patch will replace some lines meant for the IC200, so do not use if you have an IC200 as well as an IC150. It's not perfect, it's not pretty, but it does appear to work!

Save the following code as spca50x_ic150.patch:

Code:

--- spca50x.c.orig        2004-09-14 19:14:53.013147860 -0400
+++ spca50x.c        2004-09-14 19:16:26.894062976 -0400
@@ -388,6 +388,7 @@
        DeMonUSBCapture,
        CreativeVista,
        PolaroidPDC2030,        /* 64 */
+        MicroInnovationIC150,
        LastCamera
 };
 static struct cam_list clist[] = {
@@ -456,6 +457,7 @@
        {DeMonUSBCapture,"3DeMON USB Capture"},
        {CreativeVista,"Creative Webcam Vista"},
        {PolaroidPDC2030,"Polaroid PDC2030"},
+        {MicroInnovationIC150, "Micro Innovation IC150"},
        {-1, NULL}
 };
 
@@ -523,6 +525,7 @@
        {USB_DEVICE (0x041E, 0x4018)},        /* Creative Webcam Vista (PD1100) */
        {USB_DEVICE (0x0546, 0x3273)},        /* Polaroid PDC2030*/
        {USB_DEVICE (0x0000, 0x0000)},        /* MystFromOri Unknow Camera */
+        {USB_DEVICE (0x0461, 0x0815)},  /* Micro Innovation IC150 */
        {}                        /* Terminating entry */
 };
 
@@ -7161,19 +7164,19 @@
                case 0x0461:        /* MicroInnovation  */
                        switch (dev->descriptor.idProduct) {
                                case 0x0815:
-                                        spca50x->desc = MicroInnovationIC200;
-                                        spca50x->bridge = BRIDGE_SPCA508;
+                                        spca50x->desc = MicroInnovationIC150;
+                                        spca50x->bridge = BRIDGE_SPCA561;
                                        spca50x->sensor = SENSOR_PB100_BA;
                                        spca50x->header_len =
-                                                SPCA508_OFFSET_DATA;
+                                                SPCA561_OFFSET_DATA;
                                       
                                        spca50x->i2c_ctrl_reg =
                                                SPCA50X_REG_I2C_CTRL;
                                        spca50x->i2c_base =
-                                                SPCA508_INDEX_I2C_BASE;
+                                                SPCA561_INDEX_I2C_BASE;
                                        spca50x->i2c_trigger_on_write = 1;
-                                        spca50x->cameratype = YUVY;
-                                        info ("USB SPCA5XX camera found. Type MicroInnovation IC200 (SPCA508+PB100)");
+                                        spca50x->cameratype = GBRG;
+                                        info ("USB SPCA5XX camera found. Type MicroInnovation IC150 (SPCA561+PB100)");
                                        break;
                                default:
                                        goto error;

Untar the spca5xx-10092004 code, then browse to spca5xx-10092004/drivers/usb. Copy the patch here. Next, run the following command to patch spca50x.c:

Code:

patch spca50x.c spca50x_ic150.patch
You should see a message stating:

Code:

patching file spca50x.c
Then, go back to spca5xx-10092004/ and do a make clean && make && make install as su (i use sudo):

Code:

sudo make clean
sudo make
sudo make install

Then plug in your IC150. Check dmesg for the following line:

Code:

spca5xx driver 0.51 registered
You should be able to use your Micro Innovations IC150 webcam! Good luck!

wytiger 09-16-2004 11:31 AM

Quote:

Originally posted by d1l2w3
Kernel 2.4.x

[root@localhost /]# make dep
make: *** No rule to make target `dep'. Stop.
If you are using MDK10, shouldn't you be following directions for kernel 2.6.x?

Simply:

make clean
make
make install

d1l2w3 09-17-2004 06:20 PM

Downloaded spca5xx-10092004
This is what happens.


[don@localhost spca5xx-10092004]$ make clean
rm -r -f drivers/usb/*.o drivers/usb/.spcadecoder.o.cmd \
drivers/usb/.spca50x.o.cmd *.o *.ko *.mod.* .[a-z]* core *.i
[don@localhost spca5xx-10092004]$ make
Building SPCA5XX driver for 2.5/2.6 kernel.
PLEASE IGNORE THE "Overriding SUBDIRS" WARNING
Remember: you must have read/write access to your kernel source tree.
make -C /lib/modules/`uname -r`/build SUBDIRS=/home/don/software/spca5xx-10092004 modules
make: *** /lib/modules/2.6.3-7mdk/build: No such file or directory. Stop.
make: *** [default] Error 2
[don@localhost spca5xx-10092004]$

d1l2w3 09-17-2004 06:34 PM

This is what happens with the patch.
patch spca50x.c spca50x_ic150.patch

[don@localhost usb]$ patch spca50x.c spca50x_ic150.patch
patching file spca50x.c
Hunk #1 FAILED at 388.
Hunk #2 FAILED at 457.
Hunk #3 FAILED at 525.
patch unexpectedly ends in middle of line
Hunk #4 FAILED at 7164.
4 out of 4 hunks FAILED -- saving rejects to file spca50x.c.rej
[don@localhost usb]$

wytiger 09-17-2004 10:38 PM

Do you have the kernel source installed? That message makes me think not if the directory does not exist...

Also, as far as the patch is concerned, I suspect that your created file may be word-wrapped which could explain errors with the lines not syncing.... just a SWAG, though.

Email me at wytiger at linuxquestions dot net and i can e-mail you a copy of the patch, otherwise let me know an alternate way to get it to you....

d1l2w3 09-18-2004 10:17 AM

Do you have the kernel source installed? That message makes me think not if
the directory does not exist...

I do not know if it is or not.
How do I find out?
How do I install it if it isn't installed?
_
_Also, as far as the patch is concerned, I suspect that your created file may
be word-wrapped which could explain errors with the lines not syncing....
just a SWAG, though.

Attached is the patch.
_
_Email me at wytiger at linuxquestions dot net and i can e-mail you a copy of
the patch, otherwise let me know an alternate way to get it to you...

e-mail address is:

dlw@hei.net

rvijay17 09-20-2004 12:06 AM

wytiger, it worked
 
I got IC100 webcam and was just trying my hand with spca drivers. Initially it did not work though everything installed smoothly, the patch, the drivers everything was smooth. But it did not work. I thought that the chipset of IC100 would be different and that's why its not working.

Then I went to /lib/modules/2.6.x/drivers/usb/media and saw that the spca driver had permissions 600. I then changed it to 711, rmmod'ed the spca driver and again insmod'ed it and this time it worked.

My Micro IC100 webcam works. But the picture is not at all SHARP and there's no way i can increase the sharpness in spcagui. And one more thing, gnomemeeting is able to detect the webcam but is unable to open it. By "open it", i mean it shows nothing. Any pointers to this.

I got FC2 with the kernel source present.

regards,
vijay.

wytiger 09-20-2004 08:13 PM

d1l2w3:
Patch e-mailed to you. Also, run the following command, and list the results to the forum:
Code:

rpm -qa | grep kernel
You should be looking for something that looks like kernel-source...
If you do not see it, try and run this as root:
Code:

urpmi kernel-source
(Please bear in mind that I am not a Mandrake user, and therefore cannot attest to the accuracy of the above command)


rvijay17:
Does Gnomemeeting show a black window where the video feed should be, or does it not register that there is a camera at all? If it is a black window, maybe the brightness on the camera is too low (seems to be a common complaint among spca5xx users.) Shine a bright flashlight into it while looking at the black window, and let me know if it registers any light.

wytiger 09-20-2004 08:20 PM

rvijay17:
Wait, I re-read your post -- did you say that my patch worked for an IC100, as well as the IC150 it was intended for?

rvijay17 09-21-2004 12:24 AM

Yes, I got IC100 and it works. But xawtv, spcagui and gnomemeeting shows it as IC150. As long as it works, I got no problem. The only problem is that the picture's quality is very poor. I need to increase the sharpness. Anyone got any idea how to increase the sharpness. I tried to increase the frame rate but no success.

And with gnomemeeting, it does work but only if I work as root. Its able to detect the webcam working as a normal user but no picture. Not a brightnes issue.

Please, any pointers on how to increase the sharpness of the image.

regards,
vijay.

d1l2w3 09-21-2004 12:02 PM

installed new patch.
This is what happens as root and as user.

[root@localhost usb]# /home/don/software/spca5xx-10092004/drivers/usb/spca50x.c spca50x_ic150.patch
/home/don/software/spca5xx-10092004/drivers/usb/spca50x.c: line 1: /bin: is a directory
/home/don/software/spca5xx-10092004/drivers/usb/spca50x.c: line 2: syntax error near unexpected token `('
/home/don/software/spca5xx-10092004/drivers/usb/spca50x.c: line 2: ` * SPCA50x based usb camera driver (currently suppor ts'



[don@localhost don]$ rpm -qa | grep kernel
kernel-2.6.3.7mdk-1-1mdk
[don@localhost don]$ su
Password:
[root@localhost don]# rpm -qa | grep kernel
kernel-2.6.3.7mdk-1-1mdk
[root@localhost don]#

wytiger 09-21-2004 12:28 PM

You definitely don't have the kernel source, then, accourding to the output. Try to urpmi the kernel-source. You will need that to compile.

Also, it looks like the patch command was not run right, did you run patch spca50x.c spca50x_ic150.patch?

wytiger 09-21-2004 12:30 PM

rvijay17:

Regretfully, i don't have any pointers on how to update the sharpness software-wise. my IC150 has a manual focus around the lens, I assumed that your IC100 would too.

d1l2w3 09-21-2004 10:39 PM

Quote:

Originally posted by wytiger
You definitely don't have the kernel source, then, accourding to the output. Try to urpmi the kernel-source. You will need that to compile.

What is and how do I 'urpmi the kernel-source'?

Also, it looks like the patch command was not run right, did you run patch spca50x.c spca50x_ic150.patch?

[don@localhost usb]$ patch spca50x.c spca50x_ic150.patch
patching file spca50x.c
patch: **** malformed patch at line 4: ________DeMonUSBCapture,

[don@localhost usb]$ su
Password:
[root@localhost usb]# patch spca50x.c spca50x_ic150.patch
patching file spca50x.c
patch: **** malformed patch at line 4: ________DeMonUSBCapture,

[root@localhost usb]#

wytiger 09-22-2004 04:54 PM

d1l2w3:

I have e-mailed you a copy of the patched drivers. Do all the following commands as root:

Code:

urpmi kernel-source
This will install the kernel source, which is needed to compile. Install any dependencies listed.

Once this is complete, do the following:

Code:

cd /lib/modules/2.6.3-7mdk
ln -s /usr/src/linux-2.6.3-7mdk build

This will create the symbolic link for the "build" directory.

Next, change to the folder you downloaded the tar file to and do the following:

Code:

tar xzf spca5xx-10092004-patched.tar.gz
cd spca5xx-10092004-patched

make clean
make
make install

The IC150 should work now.

If you have gnomemeeting installed (I think MDK does this by default), you may even see a shortcut automagically appear on your desktop.

Please let me know of your success or failure.

d1l2w3 09-22-2004 08:54 PM

Still not working.

[root@localhost spca5xx-10092004-patched]# make clean
rm -r -f drivers/usb/*.o drivers/usb/.spcadecoder.o.cmd \
drivers/usb/.spca50x.o.cmd *.o *.ko *.mod.* .[a-z]* core *.i
[root@localhost spca5xx-10092004-patched]# make
Building SPCA5XX driver for 2.5/2.6 kernel.
PLEASE IGNORE THE "Overriding SUBDIRS" WARNING
Remember: you must have read/write access to your kernel source tree.
make -C /lib/modules/`uname -r`/build SUBDIRS=/home/don/Documents/spca5xx-10092004-patched modules
make[1]: Entering directory `/usr/src/linux-2.6.3-7mdk'
CC scripts/empty.o
MKELF scripts/elfconfig.h
HOSTCC scripts/file2alias.o
HOSTCC scripts/modpost.o
HOSTLD scripts/modpost
SPLIT include/linux/autoconf.h -> include/config/*
*** Warning: Overriding SUBDIRS on the command line can cause
*** inconsistencies
CC arch/i386/kernel/asm-offsets.s
CHK include/asm-i386/asm_offsets.h
CC [M] /home/don/Documents/spca5xx-10092004-patched/drivers/usb/spca50x.o
CC [M] /home/don/Documents/spca5xx-10092004-patched/drivers/usb/spcadecoder.o
LD [M] /home/don/Documents/spca5xx-10092004-patched/spca50x.o
Building modules, stage 2.
MODPOST
CC /home/don/Documents/spca5xx-10092004-patched/spca50x.mod.o
LD [M] /home/don/Documents/spca5xx-10092004-patched/spca50x.ko
make[1]: Leaving directory `/usr/src/linux-2.6.3-7mdk'
[root@localhost spca5xx-10092004-patched]# make install
install -c -m 0644 spca50x.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/
/sbin/depmod -ae
[root@localhost spca5xx-10092004-patched]#

gnomeeting looks for a /dev/video1 or /dev/video2.
I have neither.
Mine is /proc/bus/usb/002/003
sane-find-scanner lists it as 'libusb:002:003'

wytiger 09-24-2004 09:05 AM

The install looks good from my perspective... check dmesg to verify that the spca50x driver registered.

If you have xawtv installed, you can try xawtv -hwscan as root and as yourself. If your device is really registered, it should show up there.

Also, try v4l-info, which should give you more info on your devices.

d1l2w3 09-24-2004 11:45 AM

It is working.
Thank you for your time and effort.
Below is what 'dmesg' has to say.
Does the 'kernel tainted' mean anything?

Linux video capture interface: v1.00
spca50x: no version for "struct_module" found: kernel tainted.
/home/don/Documents/spca5xx-10092004-patched/drivers/usb/spca50x.c: USB SPCA5XX camera found. Type MicroInnovation IC150 (SPCA561+PB100)
/home/don/Documents/spca5xx-10092004-patched/drivers/usb/spca50x.c: [spca50x_probe:7323] Camera type GBRG

I have another problem now.
I don't know if any of what I did caused it.
I use KDE. However, after getting gnomemeeting working an icon for gnomemeeting appears on one of my desktops and that desktop is now Gnome whereas the others are KDE. Seems weird to me.

Anyway, that's another matter.
Once again I thank you.
dlw

wytiger 09-24-2004 01:20 PM

My pleasure. I'm glad that we were able to get it working! :)

As far as the 'kernel tainted' message is concerned, I wouldn't worry too much. That message is typically associated with non-GPL code being inserted into the kernel. While the spca50x driver is GPL, it does not explicitly state it, which may be the reason for the message.

Enjoy your webcam! :D


All times are GMT -5. The time now is 11:38 PM.