Introduction
There are quite a lot of webcams that can be made to work using the Ov51x-driver. Note that manual installation may not be needed for you, so please read the Ubuntu wiki webcam page.
1. Preliminaries
This guide has been reported to work with a Hercules Classic Webcam, an el-cheapo webcam incorporating 4LEDs for low lighting usage. The output of lsusb shows the following:
05a9:4519 OmniVision Technologies, Inc.
The drivers needed to make it work are the ov51x and ov519_decomp modules.
This guide assumes that your camera is seen on the USB bus, otherwise you have to activate and make sure that USB works properly by activating the bus. If your cam is seen on the USB bus, the following procedure gives you a fully functional cam on your machine.
2. Installation
2.1. Get linux headers
Get the linux headers for your system, so that you can compile the drivers once you downloaded them. To do this, open a terminal window (Applications -> Terminal on XUbuntu) and type
sudo apt-get install build-essential linux-headers-`uname -r`
2.2. Get the modules
Get the modules for your webcam:
wget http://www.rastageeks.org/downloads/ov51x-jpeg/ov51x-jpeg-1.5.9.tar.gz
(If this results in an error, check the rastageeks ov51x-jpeg directory], maybe you have to download a newer version)
Ensure the drivers landed into a directory you know...
2.3. Extract the drivers
Move to the directory where your downloaded drivers are, and extract the source files from the tar files.
tar -xvf ov51x-jpeg-1.5.9.tar.gz
and Change directory to where your sources are:
cd ov51x-jpeg-1.5.9
2.4. Prepare the installation files
make
2.5. Compile
Compile the modules:
sudo make install
2.6. Install
And install them:
sudo depmod -A sudo modprobe ov51x-jpeg
You should now be able to enjoy images from your webcam.
3. Troubleshooting
3.1. Installation of < 1.0.0 version
Credits: This guide is based on the forum post by gentle_turtle. He based this posting on information earlier in the thread his post is part of and on http://blog.thedarkmere.net/index.ph...peg-guide.html.
The > 1.0.0 versions are definitely more easy to install, but for those who might for some reason not succeed installing the newer versions, here is the shortened version of the guide that was at this location before 1.0.0 was released.
First we get the headers:
sudo apt-get install build-essential linux-headers-`uname -r`
Then the modules for your webcam:
wget http://www.rastageeks.org/downloads/ov51x-jpeg/ov51x-jpeg-1.5.9.tar.gz
extract them
tar -xvf ov51x-jpeg-1.5.9.tar.gz
and change dir to the contents of the archive
cd ov51x-jpeg-0.5.9
Compile and install the modules:
sudo make install
Note: if you are using Feisty, remove the lines referring to "linux/config.h" (#include <linux/config.h>) from all .c-files first! (else you will get an error witch prohibits you from continuing these instructions successfully.
And now we can install the modules by hand:
sudo modprobe videodev sudo modprobe i2c_core sudo insmod /lib/modules/`uname -r`/extra/ov51x.ko sudo insmod /lib/modules/`uname -r`/extra/ov519_decomp.ko
To test your installation you can use any camera viewing application, such as xawtv.
3.1.1. Making modules permanent
Also this part is based on the forum post by gentle_turtle. He based this posting on information earlier in the thread his post is part of.
If you reboot after installing the drivers in the first part, you'll notice the webcam is not detected anymore. Therefore we need to make these modules permanent, so that your machine recognizes the webcam both at bootup as well when you plug it in. The problem here with respect to other module installations is that for some obscure reason, the ov519_decomp module insists in loading the ov511 module when loading through modprobe, and ov511 knows nothing of some of the functions in ov519_decomp and therefore complains.
We will thus load ov51x normally through modprobe, but we will load ov519_decomp through insmod. Let us look at the steps to do this.
3.1.1.1. Load modules at start up
Make sure you load the vidoedev and i2c_core modules at bootup: to do this, in the terminal type:
sudo vi /etc/modules
or
gksudo gedit /etc/modules
At the end of the files, add the following two lines:
videodev i2c_core
Now save the file and quit the editor. This will guarantee that from now on at bootup the videodev and the i2c_core modules are loaded.
3.1.1.2. Autodetection
Of course we want to tell Ubuntu what to do whenever it notices the camera is plugged in:
sudo touch /etc/modprobe.d/ov51x sudo vi /etc/modprobe.d/ov51x
(instead of vi you may also type gedit, or any other editor...)
And finally open up add the following lines file the following line:
install ov51x /sbin/modprobe --ignore-install ov51x; insmod /lib/modules/`uname -r`/extra/ov519_decomp.ko
Note: This has to be ONLY on one line. Save the file and quit the editor.
And voila, at next reboot your Hercules Classic webcam is there, ready to use.... Have fun!
4. External Links
ov51x JPEG hacked Linux driver wiki - The main page for the rastageek driver used on this page.
Working Webcams - A list of webcams supported by this driver.