# does the kernel see the webcam? It does now[solved]

## idella4

On the subject of webcams.  Some time ago I procured a Creative Vista plus, a fairly standard cam.

I tried for quite a while to get it going.

From posts from this forum, I have looked though

http://mxhaard.free.fr/spca5xx.html.

It suprisingly lists mine as a match to one of the set of drivers of that family.

This excerpt id from the page.

 *Quote:*   

> 
> 
> SUNPLUS 	  	Vendor Id 	Product Id 	 Sunplus based Cameras 	Pseudo        Bridge 	Sensor     Support    Stream 	   Driver        Quality
> 
> Creative 	   191     0x041e 		0x4028 			Vista Plus 		                      Pac207 	Pac207 	   Yes 	       gbrg 	     spca5xx         ****
> ...

 

which I suppose is helpful, if all the terms were familiar.  So, 

what is the importance of the  columns bridge and sensor?

and what dod you do about it?

In the attempts of some months ago, I had this driver installed and loading,

However, never once did the system co-operate in making a /dev/video0,

which is clearly the step 1 building block to get a webcam stream.

Is it a sign that standard kernels don't cator to the make and model?

Can linux run this cam?

----------

## NeddySeagoon

idella4,

From this page you have a 

```
{USB_DEVICE(0x041E, 0x4028)},   /* Creative Webcam Vista Plus */
```

so it works with the spca5xx driver.

However, your kernel also needs Video For Linux support, either as a module or built in.

The terms bridge and sensor refer the the USB interface in the camera and its sensor chip. They should be of no importance whatsoever, as long as your vendor and device IDs match. However, on occasions, manufactuers change the hardware to be incompatible without changing the device ID, which would indicate that.

----------

## idella4

Neddy,

good, thanks again.  It's starting to become clearer.

The point that must be resolved is having a /dev/video0.

The installing of it is fairlly straight forward.

Ofcourse I shall check my kernel config, but does the fact that the system does not make a /dev/video indicate a kernel config deficit??

Look forward to the next.

----------

## idella4

I've repeated the setup I did before other than adding some entries to the video4l section of the kernel.

this is the relevant portions of kernel .config

```
#

# Video For Linux

#

#

# Video Adapters

#

# CONFIG_VIDEO_ADV_DEBUG is not set

CONFIG_VIDEO_BT848=m

# CONFIG_VIDEO_BT848_DVB is not set

CONFIG_VIDEO_SAA6588=m

CONFIG_VIDEO_PMS=m

CONFIG_VIDEO_BWQCAM=m

CONFIG_VIDEO_CQCAM=m

CONFIG_VIDEO_CPIA=m

CONFIG_VIDEO_CPIA_USB=m

CONFIG_VIDEO_SAA5246A=m

CONFIG_VIDEO_SAA5249=m

# CONFIG_TUNER_3036 is not set

# CONFIG_VIDEO_STRADIS is not set

# CONFIG_VIDEO_ZORAN is not set

CONFIG_VIDEO_SAA7134=m

CONFIG_VIDEO_SAA7134_ALSA=m

# CONFIG_VIDEO_SAA7134_OSS is not set

# CONFIG_VIDEO_SAA7134_DVB is not set

# CONFIG_VIDEO_MXB is not set

CONFIG_VIDEO_DPC=m

# CONFIG_VIDEO_HEXIUM_ORION is not set

# CONFIG_VIDEO_HEXIUM_GEMINI is not set

# CONFIG_VIDEO_CX88 is not set

CONFIG_VIDEO_CX88_VP3054=m

CONFIG_VIDEO_EM28XX=m

CONFIG_VIDEO_OVCAMCHIP=m

CONFIG_VIDEO_AUDIO_DECODER=m

CONFIG_VIDEO_DECODER=m

#

# Digital Video Broadcasting Devices

#

CONFIG_DVB=y

CONFIG_DVB_CORE=m

gstreamer and gqcam are in

this is the output

[code]

No manual entry for gqcam

idella@genny ~ $ sudo gqcam

Password:

Gtk-WARNING **: cannot open display:

idella@genny ~ $ gqcam

/dev/video: Permission denied

[/code]

idella@genny ~ $      

I only have a /dev/video because I made one with 

[code]

mknod /dev/video c 81 0

[/code]

the system's view of things usb, usbview lists the webcam with all details.

```

What does it require for udev to make one on a normal bootup?

----------

## NeddySeagoon

idella4,

On gentoo, /dev/video is a symbolic link to /dev/v4l/video0. Its managed by udev and hotplug.

For usb devices these nodes and symlinks come and go as the device is connected and removed.

The ordinary udev rules take care of it for you.

How does your spca5xx module get loaded ?

Try 

```
modprobe spca5xx
```

then look for /dev/v4l and its contents.

Delete your /dev/video or udev will not be able to make a symlink.

----------

## idella4

Neddy,

looks good.  I'm with you.  I have put the driver in with alsa to be autoloaded.

Am yet to reboot and verify it.

Shall do so and post a ps.

the ps.

Soo soo close.

The diode light has actually come on (on the cam).

here is lsmod

```

idella@genny ~ $ lsmod

Module                  Size  Used by

rtc                    15028  0

reiserfs              330484  1

ntfs                  274744  1

spca5xx               694288  0

videodev               10624  1 spca5xx

snd_via82xx            29588  0

snd_cmipci             35840  2

snd_opl3_lib           12160  1 snd_cmipci

snd_hwdep              10756  1 snd_opl3_lib

snd_mpu401_uart         9216  2 snd_via82xx,snd_cmipci

snd_rawmidi            27168  1 snd_mpu401_uart

```

So, autoload autoloaded., which is very good.

now, see this.

```

idella@genny ~ $ gqcam

/dev/video: No such file or directory

idella@genny ~ $ ls /dev/video

/dev/video

idella@genny ~ $ ls -l /dev/video

lrwxrwxrwx 1 root root 15 Jul  4 03:17 /dev/video -> /dev/v4l/video0

idella@genny ~ $ gqcam

/dev/video: No such file or directory

idella@genny ~ $ ls -l /dev/video

lrwxrwxrwx 1 root root 15 Jul  4 03:17 /dev/video -> /dev/v4l/video0

idella@genny ~ $ sudo ln -fs /dev/v4l/video0 /dev/video

idella@genny ~ $ gqcam

/dev/video: No such file or directory

idella@genny ~ $ sudo gqcam

Gtk-WARNING **: cannot open display:

```

What do you think?  a gui deficit with gtk  ala alsaplayer??

I put me into the video group.

So what puzzles is why gqcam insists there is no /dev/video, as user.

Is it a case of installing an alternate app to gqcam?

look forward to the next post.

----------

## idella4

The system has gone back a step.After a couple of reboots, once again there is no sign of a /dev/v4l/.

I've found contradictory reports on the make and model.

Can anyone supply a method of ensuring udev to make a /dev/v4l/video?

Does its absence suggest that it is not supportable by a linux kernel?

----------

## NeddySeagoon

idella4,

/dev/v4l/... is created when your webcam is detected. It should happen when you 

```
modprobe spca5xx
```

with your cam plugged in, or the other way round.

If the /dev entry does not show - run udevstart to poke udev into rescanning for devices. It should not ned that.

----------

## idella4

Neddy,  thanks for your advice so far.

It is so close.

I don't know what to alter  next.

On initial boot up, udev did not make /dev/v4l/video0

Even prodding it with udevstart resulted in a blank.

I still get

```

idella@genny ~ $ sudo gqcam

Gtk-WARNING **: cannot open display:

```

However, I unplugged and re-plugged in the webcam.  Previous entries were deleted, soudev seems to have made the char device.

The diode light went out.  Then I entered 

```

genny idella # gqcam

```

which promptly caused the diode light to come on.the output is sl. different to previously;

```

/dev/video: Function not implemented

```

This also occurs now as a regular user.  ok.  Gentoo creates the char device in /dev/v4l. Now we also have a /dev/video 

[/code]

genny idella # ls -l /dev/video

lrwxrwxrwx 1 root root 15 Jul  5 00:10 /dev/video -> /dev/v4l/video0

Since all appears in place, I wonder, why is it so???

gqcam is expecting a /dev/video, but a sym link is a sym link.  It should suffice.

I have not yet seen gqcam working, so not sure what to expect

Is there a more reliable choice of app?? if so, which??

I shall try cam stream, otherwise, I am stuck.

----------

## NeddySeagoon

idella4,

What are the permissions on /dev/v4l/vidie0 ?

```
$ ls -l /dev/v4l

total 0

crw-rw---- 1 root video 81,  64 Jul  4 09:36 radio0

crw-rw---- 1 root video 81, 224 Jul  4 09:36 vbi0

crw-rw---- 1 root video 81,   0 Jul  4 09:36 video0

crw-rw---- 1 root video 81,   1 Jul  4 09:37 video1
```

Only root and members of the video group can use these devices.

Do groups and check your membership. Add yourself if required and log out/in to pick up the new group.

Some applications will not follow a symlink properly. I use xawtv for testing and it needs to be be run as 

```
xawtv -c /dev/v4l/vidie0 
```

It works with symlinks sometimes.

I [/code]have a webcam and a TV-Card, hence two devices.

----------

## idella4

Neddy,

the video group was in place   ok

the file attributes in /dev/v4l    ok.

Logically speaking, it's narrowed down to  a very thin list.

At this point, it appears to be working, but without an effective app to display the stream.

One point, I have coldplug, not hot.

It's going down with staunch resistance.              

Camstream and camsource seem to be command line type apps. note:

```

idella@genny ~ $ camstream

CVideoDevice::ResetImagesRGB()

CVideoDevice::ResetImagesYUV()

```

camstream and camsource seem related apps and do everything to fall into the category of apps that don't deal with the sym link.

xawtv is now in place

```

idella@genny ~ $ xawtv -c /dev/v4l/video0

This is xawtv-3.94, running on Linux/i686 (2.6.16-gentoo-r9June-2006)

can't open /dev/v4l/video0: Function not implemented

v4l-conf had some trouble, trying to continue anyway

v4l2: open /dev/v4l/video0: Function not implemented

v4l2: open /dev/v4l/video0: Function not implemented

v4l: open /dev/v4l/video0: Function not implemented

no video grabber device available

idella@genny ~ $ sudo xawtv -c /dev/v4l/video0

Password:

This is xawtv-3.94, running on Linux/i686 (2.6.16-gentoo-r9June-2006)

Error: Can't open display:

idella@genny ~ $ su

Password:

genny idella # xawtv -c /dev/v4l/video0

This is xawtv-3.94, running on Linux/i686 (2.6.16-gentoo-r9June-2006)

can't open /dev/v4l/video0: Function not implemented

v4l-conf had some trouble, trying to continue anyway

v4l2: open /dev/v4l/video0: Function not implemented

v4l2: open /dev/v4l/video0: Function not implemented

v4l: open /dev/v4l/video0: Function not implemented

no video grabber device available

genny idella #        

```

eeh, what's a  video grabber device? Can I pick one up from a local computer shop??

It seems that xawtv on this gentoo has joined camstream and camsource.!!!

----------

## idella4

you can all relax now!  It is done.

The kernel was right, udev was right, mostly.

Apparently there is one minor shortcoming on the part of the kernel or gentoo.

The webcam was plugged into a double adapter extension or hub.  Looking through past posts someone pointed to that as a problem.

The webcam once plugged directly into the computer's usb point finally displayed a stream.

----------

