# Setup Genius e-Messenger 112 webcam

## paul_chany

I setup my webcam following the Gentoo wiki page about Webcam http://en.gentoo-wiki.com/wiki/Webcam

I edited /etc/modules.autoload.d/kernel-2.6

```
gspca_pac207 force_rgb=1 gspca_main force_rgb=1
```

I have installed media-libs/libv4l.

I'm using WDM (Wing's Display Manager) with xdm and as a window manager Window Maker.

I edited ~/.xinitrc

```
export LD_PRELOAD=/usr/lib64/libv4l/v4l2convert.so

export LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so
```

and ~/.bash_profile

```
export LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so
```

This way Ekiga can recognize the webcam and can use it.  :Smile: 

I can run just Ekiga without LD_PRELOAD stuff.

I edited /usr/bin/skype

```
export LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so

exec ./skype "$@"
```

so Skype can use webcam too.  :Smile: 

v4l-info command gives to me a lot of informations:

```
### v4l2 device info [/dev/video0] ###

general info

    VIDIOC_QUERYCAP

   driver                  : "pac207"

   card                    : "CIF Single Chip     "

   bus_info                : "usb-0000:00:0b.0-3"

   version                 : 2.9.0

   capabilities            : 0x5000001 [VIDEO_CAPTURE,READWRITE,STREAMING]

standards

inputs

    VIDIOC_ENUMINPUT(0)

   index                   : 0

   name                    : "pac207"

   type                    : CAMERA

   audioset                : 0

   tuner                   : 0

   std                     : 0x0 []

   status                  : 0x0 []

video capture

    VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)

   index                   : 0

   type                    : VIDEO_CAPTURE

   flags                   : 2

   description             : "RGB3"

   pixelformat             : 0x33424752 [RGB3]

    VIDIOC_ENUM_FMT(1,VIDEO_CAPTURE)

   index                   : 1

   type                    : VIDEO_CAPTURE

   flags                   : 2

   description             : "BGR3"

   pixelformat             : 0x33524742 [BGR3]

    VIDIOC_ENUM_FMT(2,VIDEO_CAPTURE)

   index                   : 2

   type                    : VIDEO_CAPTURE

   flags                   : 2

   description             : "YU12"

   pixelformat             : 0x32315559 [YU12]

    VIDIOC_ENUM_FMT(3,VIDEO_CAPTURE)

   index                   : 3

   type                    : VIDEO_CAPTURE

   flags                   : 2

   description             : "YV12"

   pixelformat             : 0x32315659 [YV12]

    VIDIOC_G_FMT(VIDEO_CAPTURE)

   type                    : VIDEO_CAPTURE

   fmt.pix.width           : 176

   fmt.pix.height          : 144

   fmt.pix.pixelformat     : 0x33424752 [RGB3]

   fmt.pix.field           : NONE

   fmt.pix.bytesperline    : 528

   fmt.pix.sizeimage       : 76032

   fmt.pix.colorspace      : SRGB

   fmt.pix.priv            : 1

controls

    VIDIOC_QUERYCTRL(BASE+0)

   id                      : 9963776

   type                    : INTEGER

   name                    : "Brightness"

   minimum                 : 0

   maximum                 : 255

   step                    : 1

   default_value           : 46

   flags                   : 0

### video4linux device info [/dev/video0] ###

general info

    VIDIOCGCAP

   name                    : "CIF Single Chip     "

   type                    : 0x1 [CAPTURE]

   channels                : 1

   audios                  : 0

   maxwidth                : 352

   maxheight               : 288

   minwidth                : 176

   minheight               : 144

channels

    VIDIOCGCHAN(0)

   channel                 : 0

   name                    : "pac207"

   tuners                  : 0

   flags                   : 0x0 []

   type                    : CAMERA

   norm                    : 0

tuner

ioctl VIDIOCGTUNER: Invalid argument

audio

    VIDIOCGAUDIO

   audio                   : 0

   volume                  : 0

   bass                    : 0

   treble                  : 0

picture

    VIDIOCGPICT

   brightness              : 11822

   hue                     : 0

   colour                  : 0

   contrast                : 0

   whiteness               : 25847

   depth                   : 24

   palette                 : RGB24

buffer

ioctl VIDIOCGFBUF: Invalid argument

window

    VIDIOCGWIN

   x                       : 0

   y                       : 0

   width                   : 176

   height                  : 144

   chromakey               : 0

   flags                   : 0
```

v4l2-ctl --all command gives to me the following informations:

```
Driver Info:

   Driver name   : pac207

   Card type     : CIF Single Chip     

   Bus info      : usb-0000:00:0b.0-3

   Driver version: 133376

   Capabilities  : 0x05000001

      Video Capture

      Read/Write

      Streaming

Format Video Capture:

   Width/Height  : 176/144

   Pixel Format  : 'RGB3'

   Field         : None

   Bytes per Line: 528

   Size Image    : 76032

   Colorspace    : SRGB

   Custom Info   : 00000001

Video input : 0 (pac207)

Audio input : 0 (Microphone)
```

The picture that I get with this setup can be seen here: 

http://i520.photobucket.com/albums/w327/csanyipal/FromMyWebCam/Webcam-1281465618.png

I want a better picture! How can I go further in my setup, to achieve my goal?

----------

## lxg

What application with which parameters did you use to create the shot? Does the picture look the same in other applications? Have you tried cheese? What happens if you omit the force_rgb option?

----------

## paul_chany

 *lxg wrote:*   

> What application with which parameters did you use to create the shot? Does the picture look the same in other applications? Have you tried cheese? What happens if you omit the force_rgb option?

 

I used camorama to get this picture. These are the settings in camorama:

Contrast: 0

Brightness: 46

Color: 0

Hue: 0

White Balance: 100

The picture look the same in Ekiga, Skype and Cheese.

Now, if I edit sudo mcedit /etc/modules.autoload.d/kernel-2.6

```
#gspca_pac207 force_rgb=1

#gspca_main force_rgb=1

gspca_pac207

gspca_main
```

and run:

```
$ sudo update-modules force

$ sudo rmmod gspca_pac207

$ sudo rmmod gspca_main

$ sudo modprobe gspca_main

$ sudo modprobe gspca_pac207
```

and run Cheese again, the picture is the same as previously.

----------

## lxg

What kind of a cam (i.e. which model) is this? Can you verify it is 100% supported by Linux? Which kernel (sources, version) are you using?

----------

## paul_chany

 *lxg wrote:*   

> What kind of a cam (i.e. which model) is this? Can you verify it is 100% supported by Linux? Which kernel (sources, version) are you using?

 

How could I know what kind of a cam is this? I try to answer to this question writing down every information readed from the box of the cam:

CrazyTalk Cam Suite

Up to 640 x 480 video

Monitor Security Record anytime

CERTIFIED FOR Windows Vista

Designed for Microsoft Windows XP

True 100k pixel video resolution

Lens type: Manual Focus

White Balance: Auto/Manual

Interface: 1.1

File Format: WMV/JPEG

Still Image Resolution: 640 x 480 (software interpolation), 352 x 288, 320 x 240, 176 x 144, 160 x 120 pixels

Video Resolution:

(1) 352 x 288 pixels / up to 30 fps 

(2) 640 x 480 pixels / up to 15 fps

Supports Windows Vista, XP, 2000, Me, 98SE

The model? Maybe the following informations could be helpful:

e-Messenger 112 / 32200042101

S/N: 157443702681

At http://www.mjmwired.net/kernel/Documentation/video4linux/gspca.txt#243 one can find this model: 

243	pac207		093a:2476	Genius e-Messenger 112

so it is supported, right?

I'm using kernel-genkernel-x86_64-2.6.34-gentoo-r1 installed using the Gentoo installation CD, compiled with genkernel.

----------

## lxg

I actually just meant the model name.  :Wink: 

Could you try upgrading to 2.6.35?

Can you try with an Ubuntu/SuSE/Fedora Live CD?

----------

## paul_chany

 *lxg wrote:*   

> I actually just meant the model name. 
> 
> Could you try upgrading to 2.6.35?
> 
> Can you try with an Ubuntu/SuSE/Fedora Live CD?

 

The command 

```
'emerge -Dup world'
```

 gives me nothing so I can't see that that any upgrade appearing on my world updates list.

Sorry, I don't have such a Live CD.

I have only the SystemRescueCd-x86-1.5.8 downloaded from http://www.sysresccd.org/Download

----------

## lxg

Ok, if you don't see the 2.6.35 kernel, you are probably on stable. You could unmask the testing gentoo-sources package and upgrade your kernel. Maybe the issue is fixed in the current kernel.

As for the live CDs, you could go to ubuntu.com/download, fetch an ISO image and burn it on a CD, then run it as a Live CD. (Ubuntu won't install anything untill you explicitly tell it to do so.) AFAIK, the Live CD also has Cheese, so you could check if Ubuntu manages to detect and set up your cam correctly.

----------

## paul_chany

 *lxg wrote:*   

> Ok, if you don't see the 2.6.35 kernel, you are probably on stable. You could unmask the testing gentoo-sources package and upgrade your kernel. Maybe the issue is fixed in the current kernel.
> 
> As for the live CDs, you could go to ubuntu.com/download, fetch an ISO image and burn it on a CD, then run it as a Live CD. (Ubuntu won't install anything untill you explicitly tell it to do so.) AFAIK, the Live CD also has Cheese, so you could check if Ubuntu manages to detect and set up your cam correctly.

 

I ugraded to the Linux gentoo 2.6.35-gentoo but the picture is the same quality as with 2.6.34.

I tried setup this webcam on Windows XP and get a much better picture.  :Sad: 

As for the Live CD why should I try a Live CD of another Operating system? I'm going not to change Gentoo.  :Question: 

----------

## lxg

Just to see if they have a tweak or a different module for your cam. Sometimes if you see a certain device is well supported in Ubuntu, you can find out how they configure it and use that in Gentoo.

Don't be afraid, this won't be considered cheating on Gentoo.  :Wink: 

----------

## paul_chany

 *lxg wrote:*   

> Just to see if they have a tweak or a different module for your cam. Sometimes if you see a certain device is well supported in Ubuntu, you can find out how they configure it and use that in Gentoo.
> 
> Don't be afraid, this won't be considered cheating on Gentoo. 

 

I must wait the next month to download the 698 MB Ubuntu CD iso image because my Internet Provider's package is short.   :Razz: 

----------

