PLEASE NOTE: This article is somewhat out dated, but I reposted it because people kept hitting my site to find it.

1.0 Introduction

The iRez K1 is a USB webcam manufactured by GlobalMedia based on OmniVision's ov7620 chipset. Thanks to Mark McClelland, the maintainer of the ov511 driver for Linux, we Linux users have the pleasure of using a plethora of products based on many of OmniVision's chipsets. You can visit the ov511 driver website at http://alpha.dyndns.org/ov511/.

2.0 Assumptions

In order to deliver a straight forward approach to getting the Irez K1 WebCam working in Linux, I am going to make a few assumptions about the configuration of your system. The default installs of most recently released versions of Linux by major distributions will satisfy all of the assumptions made in this document. RedHat, Suse, Mandrake, and Debian all fall under this umbrella.

2.1 Kernel Requirements

The first assumption I will make is that your system uses a 2.6.x version of the Linux kernel. The easiest way to check your kernel version, though not the most reliable, is to open a terminal window and type:

nmb@ripley: ~# uname -a
Linux ripley 2.6.7 #1 Thu Sep 16 19:29:56 CDT 2004 i686 GNU/Linux
nmb@ripley: ~#
If you look at the version number after the hostname it should say 2.6.x. If you have a 2.4.x or 2.2.x kernel then you may want to attempt to compile a 2.6.x kernel. Otherwise, you should check to see if your system satisfies the dependencies listed below. It is possible to make the K1 work using a 2.4.x version of the kernel; however for the purpose of keeping this document well scoped I will not cover the intricacies of using a kernel older than 2.6.x.

My suggestion to any Linux user using an older Kernel would be to upgrade, because new versions of the Kernel generally address the short comings of previous versions and usually improve performance as well. For those of you who would like to learn how install a new kernel, you can read these easy to follow tutorials:

http://www.desktop-linux.net/kernel.htm or http://kerneltrap.org/node/view/799

2.2 USB Support

Kernels packaged by most major distributions have USB support included in the kernel configuration. Usually, a default kernel will support USB through kernel modules, which allow the user to load and possibly unload USB support. Most distributions will automatically load these modules during the boot sequence. An easy way to check if your system supports USB is to open a console window and type:

nmb@ripley: ~# /sbin/lsmod
Module                  Size  Used by
i2c_core               18740  0
...
uhci_hcd               29040  0
usbcore                98144  3 uhci_hcd
nmb@ripley: ~#
As you scan your list of currently loaded modules you should see a module called usbcore. If you do not see it, don't panic, it may not have been loaded yet. As root try typing:
root@ripley: ~# /sbin/modprobe usbcore
If no errors occur, when you type /sbin/lsmod you should now see usbcore in your list of modules. If you do get errors, then one of two things may be happening. Your kernel may not support USB or the usbcore module was compiled directly into the kernel. If you did not compile your kernel it is most likely not supported by your kernel. Please take a look at the following guide if USB is not enabled on your system:
http://www.linux-usb.org/USB-guide/c122.html
If you do have USB support, you now need to load the controller. You need to load either UHCI-HCD (Intel PIIX4, VIA, ...) support or OHCI-HCD (Compaq, iMacs, OPTi, SiS, ALi, ...) support. Your choice is based on the type of motherboard you use. Make sure you load the correct module. USB won't work if the incorrect controller is loaded. Once you have loaded usbcore, as root try typing:
   root@ripley: ~# /sbin/modprobe uhci_hcd 
or
   root@ripley: ~# /sbin/modprobe ohci_hcd 
The module was loaded successfully if errors do not appear. To verify that your hardware is recognized, you type:
nmb@ripley: ~# dmesg
...
USB Universal Host Controller Interface driver v2.2
PCI: Found IRQ 11 for device 0000:00:07.2
PCI: Sharing IRQ 11 with 0000:00:03.0
PCI: Sharing IRQ 11 with 0000:00:03.1
uhci_hcd 0000:00:07.2: Intel Corp. 82371AB/EB/MB PIIX4 USB
uhci_hcd 0000:00:07.2: irq 11, io base 0000cce0
uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
...
nmb@ripley: ~# 
If you actually had to load these modules you may want to use the modconf tool to tell you system to load them during the boot sequence. Alternatively, you could edit the file /etc/modules file, which would accomplish the same result.

If none of this works, you may have to recompile your kernel to get USB support. Use the links under section 2.0 "Kernel Requirements" for an in depth guide on recompiling your kernel.

2.3 Video4Linux Support

To make the K1 work you will also need Video4Linux support. To check for video support, first check your /dev directory for video nodes.

nmb@ripley: ~# ls -la /dev/video0
crw-rw----  1 root video 81, 0 Aug 23 13:36 /dev/video0
nmb@ripley: ~#
Note that video0 is readable and writable by the video group. Make sure your user is in the video group by logging in as root and typing:
root@ripley: ~# adduser  video
Once youlog out and login again you can check to see if you are part of the video group by typing:
nmb@ripley: ~# groups
nmb src cdrom audio video
nmb@ripley: ~#
If video nodes do not exist in your /dev directory, then try loading the module. As root type:
root@ripley: ~# modprobe videodev
root@ripley: ~#
If the module loads successfully ( no errors ), check to make sure you have video nodes in the /dev directory as described above.

If none of this works, you may have to recompile your kernel to get Video4Linux support. Use the links under section 2.0 "Kernel Requirements" for an in depth guide on recompiling your kernel.

3.0 The OV511 Driver

The basis for Linux support for the Irez K1 is the ov511 driver. The ov511 driver supports a certain chipset made by OmniVision, and used in a range of USB cameras (notably the Irez K1 WebCam). To make the OV511 driver work, you need to select Video For Linux support (under Multimedia devices and USB OV511 Camera support under USB support). 2.6.x versions of the kernel come with an adequate version of the ov511 driver. However, people who would like to use the K1 must also have the decompression module which seems to be pretty uncommon among Linux distributions.

My suggestion is to recompile the driver and install it. This is a very simple process and you get the added benefit of using a much newer and better driver. Also, the decompression module will be built in to the newly compiled ov511 module. Most newer kernels ship with a 1.5x or a 1.6x driver. They work, but Mark McMcClelland has restructured the driver in version 2.x. I found this driver to be much more stable and support many more features of the camera.

  1. Go to: http://alpha.dyndns.org/ov511/download.html
  2. Download the 2.0 driver for your kernel. ( I chose version 2.28 because I have version 2.6.7 of the kernel. )
  3. Once you have saved the file to the file system, move it to your source directory.
    mv ov511-2.28.tar.bz2 /usr/src/
    
  4. Go to your source directory.
    cd /usr/src/
    
  5. Expand the archive.
    tar -jxvf ov511-2.28.tar.bz2
    
  6. Go to the driver source directory.
    cd ov511-2.2
    
  7. Now you can compile the driver. As root type:
    make clean
    make
    make install
    
  8. Loading the modules:
    modprobe ovcamchip
    
  9. Finally, load the driver itself:
    modprobe ov511
    
More thorough installation instructions are available at: http://alpha.dyndns.org/ov511/install.html

4.0 Bringing it All Together

Now that you have all of the modules needed to run the Irez K1 installed, you should be able to plug the camera into a USB port and your system should recognize the hardware. Plug the K1 in and type:

nabrth@ripley: ~# dmesg
...
/usr/src/ov511-2.28/ovcamchip_core.c: v2.28 : OV camera chip I2C driver
/usr/src/ov511-2.28/ov511_core.c: USB OV518+ video device found
/usr/src/ov511-2.28/ov511_core.c: Device revision 0
/usr/src/ov511-2.28/ov511_core.c: Compression required with OV518...enabling
/usr/src/ov511-2.28/ovcamchip_core.c: Camera chip is an OV7620
/usr/src/ov511-2.28/ov511_core.c: Device at usb-0000:00:07.2-1 registered to
minor 0
...
nabrth@ripley: ~# 
If your system recognizes the camera, that's it! Now launch your favorite video application such as gnomemeeting or xawtv. Xawtv is great for testing because it seems to just work, whereas gnomemeeting requires some configuration. I recommend testing with xawtv and then configuring gnomemeeting. If you do not have either of these applications installed go to http://linux.bytesex.org/xawtv/ or http://www.gnomemeeting.org for instructions on installation. Gnomemeeting comes standard with most distributions using Gnome.

I hope this helps