个人工具

“UbuntuHelp:Ov51x”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(New page: {{From|https://help.ubuntu.com/community/Ov51x}} {{Languages|php5}} '''Content:''' There are quite a lot of webcameras that can be made to work using the Ov51x-driver. Note that manual i...)
 
 
(未显示2个用户的6个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/Ov51x}}
 
{{From|https://help.ubuntu.com/community/Ov51x}}
{{Languages|php5}}
+
{{Languages|UbuntuHelp:Ov51x}}
 
'''Content:'''
 
'''Content:'''
 
+
There are quite a lot of webcameras that can be made to work using the Ov51x-driver. Note that manual installation may not be needed for you, so please read [[UbuntuHelp:Webcam|the general webcam page]] and maybe try whether [[UbuntuHelp:EasyCam|EasyCam]] works for you.
 
+
There are quite a lot of webcameras that can be made to work using the Ov51x-driver. Note that manual installation may not be needed for you, so please read [[UbuntuHelp:Webcam|the general webcam page]] and maybe try whether EasyCam works for you.
+
 
+
 
=== Preliminaries ===
 
=== Preliminaries ===
 
This guide has been reported to work with a Hercules Classic Webcam is an el-chepo webcam incorporating 4LEDs for low lighting usage. "lsusb" sees the camera as "Omnivision Technologies, Inc". The drivers needed to make it work are the ov51x and ov519_decomp modules.
 
This guide has been reported to work with a Hercules Classic Webcam is an el-chepo webcam incorporating 4LEDs for low lighting usage. "lsusb" sees the camera as "Omnivision Technologies, Inc". The drivers needed to make it work are the ov51x and ov519_decomp modules.
 
 
Assumed in this description is 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.
 
Assumed in this description is 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.
 
 
Once the cam is seen on the USB bus, the following procedure gives you a fully functional cam on your machine.
 
Once the cam is seen on the USB bus, the following procedure gives you a fully functional cam on your machine.
 
 
=== Installation ===
 
=== Installation ===
 
 
==== Get linux headers ====
 
==== 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
 
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
 
+
<pre><nowiki>
<pre><nowiki>sudo apt-get install build-essential linux-headers-`uname -r`
+
sudo apt-get install build-essential linux-headers-`uname -r`
 
</nowiki></pre>
 
</nowiki></pre>
 
 
==== Get the modules ====
 
==== Get the modules ====
 
Get the modules for your webcam:
 
Get the modules for your webcam:
<pre><nowiki>wget http://www.rastageeks.org/downloads/ov51x-jpeg/ov51x-jpeg-1.0.0.tar.gz
+
<pre><nowiki>
 +
wget http://www.rastageeks.org/downloads/ov51x-jpeg/ov51x-jpeg-1.5.4.tar.gz
 
</nowiki></pre>
 
</nowiki></pre>
 
+
(If this results in an error, check the [http://www.rastageeks.org/downloads/ov51x-jpeg/ rastageeks ov51x-jpeg directory], maybe you have to download a newer version)
 
Ensure the drivers landed into a directory you know...
 
Ensure the drivers landed into a directory you know...
 
 
==== Extract the drivers ====
 
==== Extract the drivers ====
 
Move to the directory where your downloaded drivers are, and extract the source files from the tar files.
 
Move to the directory where your downloaded drivers are, and extract the source files from the tar files.
 
+
<pre><nowiki>
<pre><nowiki>tar -xvf ov51x-jpeg-1.0.0.tar.gz
+
tar -xvf ov51x-jpeg-1.5.4.tar.gz
 
</nowiki></pre>
 
</nowiki></pre>
 
 
and Change directory to where your sources are:
 
and Change directory to where your sources are:
 
+
<pre><nowiki>
<pre><nowiki>cd ov51x-jpeg-1.0.0
+
cd ov51x-jpeg-1.5.4
 
</nowiki></pre>
 
</nowiki></pre>
 
 
==== Prepare the installation files ====
 
==== Prepare the installation files ====
 
+
<pre><nowiki>
<pre><nowiki>make
+
make
 
</nowiki></pre>
 
</nowiki></pre>
 
 
==== Compile ====
 
==== Compile ====
 
Compile the modules:
 
Compile the modules:
 
+
<pre><nowiki>
<pre><nowiki>sudo make install
+
sudo make install
 
</nowiki></pre>
 
</nowiki></pre>
 
 
==== Install ====
 
==== Install ====
 
And install them:
 
And install them:
 
+
<pre><nowiki>
<pre><nowiki>sudo depmod -A
+
sudo depmod -A
sudo modprobe ov51x-jpeg</nowiki></pre>
+
sudo modprobe ov51x-jpeg
 
+
</nowiki></pre>
 
You should now be able to enjoy images from your webcam.
 
You should now be able to enjoy images from your webcam.
 
 
=== If it didn't work ===
 
=== If it didn't work ===
 
==== Installation of < 1.0.0 version ====
 
==== Installation of < 1.0.0 version ====
 
 
'''Credits:''' This guide is based on the [http://ubuntuforums.org/showpost.php?p=2049256&postcount=14 forum post] by gentle_turtle. He based this posting on information earlier in the thread his post is part of and on [[UbuntuHelp:this Ov51x-guide|http://blog.thedarkmere.net/index.ph...peg-guide.html]].  
 
'''Credits:''' This guide is based on the [http://ubuntuforums.org/showpost.php?p=2049256&postcount=14 forum post] by gentle_turtle. He based this posting on information earlier in the thread his post is part of and on [[UbuntuHelp:this Ov51x-guide|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.
The 1.0.0 version is definitely more easy to install, but for those who might for some reason not succeed installing the 1.0.0, here is the shortened version of the guide that was at this location before 1.0.0 was released.
+
 
+
 
First we get the headers:
 
First we get the headers:
<pre><nowiki>sudo apt-get install build-essential linux-headers-`uname -r`
+
<pre><nowiki>
 +
sudo apt-get install build-essential linux-headers-`uname -r`
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Then the modules for your webcam:
 
Then the modules for your webcam:
<pre><nowiki>wget http://www.rastageeks.org/downloads/ov51x-jpeg/old-releases/ov51x-jpeg-0.5.4.tar.gz
+
<pre><nowiki>
 +
wget http://www.rastageeks.org/downloads/ov51x-jpeg/old-releases/ov51x-jpeg-0.5.4.tar.gz
 
</nowiki></pre>
 
</nowiki></pre>
 
 
extract them
 
extract them
<pre><nowiki>tar -xvf ov51x-jpeg-0.5.4.tar.gz
+
<pre><nowiki>
 +
tar -xvf ov51x-jpeg-0.5.4.tar.gz
 
</nowiki></pre>
 
</nowiki></pre>
 
 
and change dir to the contents of the archive
 
and change dir to the contents of the archive
<pre><nowiki>cd ov51x-jpeg-0.5.4
+
<pre><nowiki>
 +
cd ov51x-jpeg-0.5.4
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Compile and install the modules:
 
Compile and install the modules:
<pre><nowiki>sudo make install
+
<pre><nowiki>
 +
sudo make install
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''Note''': if you are using Feisty, remove the lines referring to "linux/config.h" (<code><nowiki>#include <linux/config.h></nowiki></code>) from all .c-files first! (else you will get an error witch prohibits you from continuing these instructions successfully.
 
'''Note''': if you are using Feisty, remove the lines referring to "linux/config.h" (<code><nowiki>#include <linux/config.h></nowiki></code>) 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:
 
And now we can install the modules by hand:
 
+
<pre><nowiki>
<pre><nowiki>sudo modprobe videodev
+
sudo modprobe videodev
 
sudo modprobe i2c_core
 
sudo modprobe i2c_core
 
sudo insmod /lib/modules/`uname -r`/extra/ov51x.ko
 
sudo insmod /lib/modules/`uname -r`/extra/ov51x.ko
sudo insmod /lib/modules/`uname -r`/extra/ov519_decomp.ko</nowiki></pre>
+
sudo insmod /lib/modules/`uname -r`/extra/ov519_decomp.ko
 
+
</nowiki></pre>
 
To test your installation you can use any camera viewing application, such as xawtv.
 
To test your installation you can use any camera viewing application, such as xawtv.
 
 
===== Making modules permanent =====
 
===== Making modules permanent =====
 
 
Also this part is based on the [http://ubuntuforums.org/showpost.php?p=2049256&postcount=14 forum post] by gentle_turtle. He based this posting on information earlier in the thread his post is part of and on [[UbuntuHelp:this Ov51x-guide|http://blog.thedarkmere.net/index.ph...peg-guide.html]].  
 
Also this part is based on the [http://ubuntuforums.org/showpost.php?p=2049256&postcount=14 forum post] by gentle_turtle. He based this posting on information earlier in the thread his post is part of and on [[UbuntuHelp:this Ov51x-guide|http://blog.thedarkmere.net/index.ph...peg-guide.html]].  
 
 
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.
 
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.
 
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.
 
 
====== Load modules at start up ======
 
====== Load modules at start up ======
 
 
Make sure you load the vidoedev and i2c_core modules at bootup: to do this, in the terminal type:
 
Make sure you load the vidoedev and i2c_core modules at bootup: to do this, in the terminal type:
 
+
<pre><nowiki>
<pre><nowiki>sudo vi /etc/modules
+
sudo vi /etc/modules
 
</nowiki></pre>
 
</nowiki></pre>
 
 
or
 
or
 
+
<pre><nowiki>
<pre><nowiki>gksudo gedit /etc/modules
+
gksudo gedit /etc/modules
 
</nowiki></pre>
 
</nowiki></pre>
 
 
At the end of the files, add the following two lines:
 
At the end of the files, add the following two lines:
 
+
<pre><nowiki>
<pre><nowiki>videodev
+
videodev
 
i2c_core
 
i2c_core
 
</nowiki></pre>
 
</nowiki></pre>
 
 
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.
 
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.
 
 
====== Autodetection ======
 
====== Autodetection ======
 
 
Of course we want to tell Ubuntu what to do whenever it notices the camera is plugged in:
 
Of course we want to tell Ubuntu what to do whenever it notices the camera is plugged in:
 
+
<pre><nowiki>
<pre><nowiki>sudo touch /etc/modprobe.d/ov51x
+
sudo touch /etc/modprobe.d/ov51x
 
sudo vi /etc/modprobe.d/ov51x
 
sudo vi /etc/modprobe.d/ov51x
 
</nowiki></pre>
 
</nowiki></pre>
 
 
(instead of vi you may also type gedit, or any other editor...)
 
(instead of vi you may also type gedit, or any other editor...)
 
 
And finally open up add the following lines file the following line:
 
And finally open up add the following lines file the following line:
 
+
<pre><nowiki>
<pre><nowiki>install ov51x /sbin/modprobe --ignore-install ov51x; insmod /lib/modules/`uname -r`/extra/ov519_decomp.ko
+
install ov51x /sbin/modprobe --ignore-install ov51x; insmod /lib/modules/`uname -r`/extra/ov519_decomp.ko
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''Note''': This has to be ONLY on one line.
 
'''Note''': This has to be ONLY on one line.
 
Save the file and quit the editor.
 
Save the file and quit the editor.
 
 
And voila, at next reboot your Hercules Classic webcam is there, ready to use.... Have fun!
 
And voila, at next reboot your Hercules Classic webcam is there, ready to use.... Have fun!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2008年10月20日 (一) 00:15的最新版本

Content: There are quite a lot of webcameras that can be made to work using the Ov51x-driver. Note that manual installation may not be needed for you, so please read the general webcam page and maybe try whether EasyCam works for you.

Preliminaries

This guide has been reported to work with a Hercules Classic Webcam is an el-chepo webcam incorporating 4LEDs for low lighting usage. "lsusb" sees the camera as "Omnivision Technologies, Inc". The drivers needed to make it work are the ov51x and ov519_decomp modules. Assumed in this description is 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. Once the cam is seen on the USB bus, the following procedure gives you a fully functional cam on your machine.

Installation

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`

Get the modules

Get the modules for your webcam:

wget http://www.rastageeks.org/downloads/ov51x-jpeg/ov51x-jpeg-1.5.4.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...

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.4.tar.gz

and Change directory to where your sources are:

cd ov51x-jpeg-1.5.4

Prepare the installation files

make

Compile

Compile the modules:

sudo make install

Install

And install them:

sudo depmod -A
sudo modprobe ov51x-jpeg

You should now be able to enjoy images from your webcam.

If it didn't work

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/old-releases/ov51x-jpeg-0.5.4.tar.gz

extract them

tar -xvf ov51x-jpeg-0.5.4.tar.gz

and change dir to the contents of the archive

cd ov51x-jpeg-0.5.4

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.

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 and on http://blog.thedarkmere.net/index.ph...peg-guide.html. 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.

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.

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!