LDP/LDP/howto/docbook/Webcam-HOWTO.sgml

2310 lines
79 KiB
Plaintext

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <article>
<!-- - - - - - - - - - - - - H e a d e r - - - - - - - - - - - - - - -->
<artheader>
<!-- - - - - - - - - - - - - T i t l e - - - - - - - - - - - - - - -->
<title>The Webcam HOWTO</title> <author><firstname>Howard</firstname>
<surname>Shane</surname> <affiliation>
<address>
<email>hshane[AT]austin.rr.com</email>
</address>
</affiliation>
</author>
<!-- - - - - - - - - - - R e v i s i o n H i s t o r y - - - - -
- -->
<revhistory>
<revision>
<revnumber>1.61</revnumber>
<date>2005-02-21</date><authorinitials>jhs</authorinitials>
<revremark>Update on revived Philips Webcam driver development</revremark>
</revision>
<revision>
<revnumber>1.6</revnumber>
<date>2005-01-02</date> <authorinitials>jhs</authorinitials>
<revremark>Errata fixed, some rewrites for readability, new chipsets and updates</revremark>
</revision>
<revision>
<revnumber>1.1</revnumber>
<date>2004-01-12</date> <authorinitials>jhs</authorinitials>
<revremark>Update for 2.6 series kernel release and info on
NW802-based webcams</revremark>
</revision>
<revision>
<revnumber>1.0</revnumber> <date>2003-12-04</date>
<authorinitials>JP</authorinitials> <revremark>Initial Release /
Reviewed by TLDP</revremark>
</revision>
<revision>
<revnumber>0.5</revnumber> <date>2003-11-07</date>
<authorinitials>jhs</authorinitials> <revremark>Final revision
after v4l mailing list feedback</revremark>
</revision>
<revision>
<revnumber>0.1</revnumber> <date>2003-10-12</date>
<authorinitials>jhs</authorinitials>
<revremark>Initial draft posted</revremark>
</revision>
</revhistory>
<!-- - - - - - - - - - - - - A b s t r a c t - - - - - - - - - - - -
- -->
<abstract>
<para> This document was written to assist the reader in the steps
necessary to configure and use a webcam within the Linux operating system.
</para>
</abstract>
</artheader>
<!-- - - - - - - - - - H e a d e r E n d - - - - - - - - - - - - -
- --> <!-- - - - - - - - - - - S e c t i o n B r e a k - - - - - -
- - - - - -->
<sect1 id="intro"> <title>Introduction</title>
<indexterm><primary>>disk!introduction</primary></indexterm>
<para> This document was written to assist the reader in setting up and
configuring a webcam, digital camera, or other video device in the Linux
operating system.
It outlines how to enable the necessary kernel and/or software support and
various frame-grabber applications that can be used to access your device.
It does not discuss the differences in graphic and video formats, the
features and/or capabilities of particular devices, or the encoding or
conversion of video formats.</para>
<indexterm>
<primary>Video</primary> <secondary>Webcam</secondary>
</indexterm>
<!-- - - - - - - - - - - S e c t i o n B r e a k - - - - - - - - - -
- -->
<sect2 id="copyright"> <title>Copyright Information</title>
<para>
This document is Copyright 2004-2005, by Howard Shane.
</para>
<para> Permission is granted to copy, distribute, and/or modify this
document under the terms of the GNU Free Documentation License, Version
1.2 or any later version published by the Free Software Foundation with
no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license can be found in <xref linkend="appendix">. </para>
</sect2>
<!-- - - - - - - - - - - S e c t i o n B r e a k - - - - - - - - - -
- -->
<sect2 id="disclaimer"> <title>Disclaimer</title>
<para> No liability for the contents of this document can be accepted.
Use the concepts, examples and other content entirely at your own risk.
As this is a new edition, there may be technical or other inaccuracies
that may result in the loss of irreplaceable data.
In any case, proceed with caution, and realize that although errors
are highly unlikely, the author can accept no responsibility for them.
</para>
<para> All copyrights are held by their respective owners, unless
specifically noted otherwise.
Use of a term in this document should not be regarded as affecting the
validity of any trademark or service mark. </para>
<para> Naming of particular products or brands should not be seen as
endorsements. </para> </sect2>
<!-- - - - - - - - - - - S e c t i o n B r e a k - - - - - - - - - -
- -->
<sect2 id="newversions">
<title>New Versions</title>
<indexterm>
<primary>(your index root)!news on</primary>
</indexterm>
<para> This is the fourth release. </para>
<para> The latest version number of this document can be found <ulink
url="http://www.tldp.org/HOWTO/Webcam-HOWTO/">here</ulink>. </para>
</sect2>
<!-- - - - - - - - - - - S e c t i o n B r e a k - - - - - - - - - -
- -->
<sect2 id="credits"> <title>Credits</title>
<para> I would like to thank all of the individuals that have pioneered
video support for Linux, in particular the v4l and v4l2 teams, Gerd Knorr,
and the Metzler Brothers among others. </para>
<para> Also, I would like to thank Marla, who has the grace to accept my
imperfections and idiosyncrasies unconditionally, including my obsession
with projects such as this. </para> </sect2>
<sect2 id="feedback"> <title>Feedback</title> <para> Please send any
additions or comments pertaining to this document to the following email
address: <email>hshane[AT]austin.rr.com</email>.
In particular, if you have information about new devices or interfaces
supported or errata, please contact me so we can keep this document
up-to-date! </para> </sect2>
<!-- - - - - - - - - - - S e c t i o n B r e a k - - - - - - - - - -
- -->
<sect2 id="conventions"> <title>Conventions Used in this Document</title>
<para> The following conventions are used in this document and are
outlined here for those who may not yet have a complete understanding
of how to access and control the underlying operating system in Linux,
which is usually via the Bash shell. </para>
<para> First, filenames are referenced in a paragraph like so:
<filename>/path/file</filename> </para>
<para> Commands in Linux are executed (or 'called') at the command prompt,
otherwise known as the 'command line.'
If you are in the non-graphical (text-based) environment, you will usually
be presented with the Bash shell prompt which is a dollar sign: </para>
<para>
<screen>
$</screen>
</para>
<para>
...or the hash mark:
</para>
<para>
<screen>
#</screen>
</para>
<para> ...if you have logged in as root or have otherwise acquired root, or
'superuser' privileges.
You can also access the Bash shell in the X window
system, otherwise known as X or X11, with an <ulink
url="http://invisible-island.net/xterm/">xterm</ulink> or similar
X-terminal-emulator.
Commands to be performed at the Bash prompt, but referenced in a paragraph
of this document, usually look like this: <command>do this now</command>
</para>
<para> Commands and/or the resulting output of commands may also be
outlined with screen output in their own paragraph or heading: </para>
<para>
<screen>
$ date
Sun Jul 27 22:37:11 CDT 2003</screen> </para>
<para>
When a command is written in front of the Bash prompt (e.g.,
<command>$ date</command> above), it is assumed the [Return]
or [Enter] key has been pressed after the command, possibly
followed by the output on a new line (e.g., as in the date in
the above example). </para>
</sect2>
</sect1>
<!-- - - - - - - - - - - S e c t i o n B r e a k - - - - - - - - - -
- -->
<sect1 id="hardware">
<title>Enabling Support for Your (Webcam) Hardware in Linux</title>
<sect2 id="driver-intro">
<title>Drivers and Modules</title>
<para> For your webcam to work you will need support for the connection and support for the actual camera hardware. Those who are already versed in kernels and modules and how to load them should skip to <xref linkend="connection">, which addresses support of the connection type. If you know your USB, IEEE 1394 or whatever bus you will be connecting your camera to is already configured and working, you should move on to the list of specific webcam hardware listed in <xref linkend="models">.
</para>
<para>
Webcam drivers are usually available one of three ways: within the kernel, as a compilable stand alone module, or available as a pre-compiled (packaged) binary driver from your Linux distribution.</para>
<sect3 id="kernel-modules">
<title>Module or In-Kernel?</title>
<para>
As a rule, often the stock kernel, or working part of the operating system, of your initial installation may already have support for what you need. Your Linux distribution vendor has likely enabled the most common options already, including the bus, or connection type, and drivers for common camera models. The driver exists either as a loadable module or within the already running kernel.
</para>
<para>
An easy way to tell if the driver is enabled is to use the <command>dmesg</command> command piped into <command>less</command> (for easy paging) to look for an acknowledgement that it was loaded when your system started up:</para>
<para>
<screen>
$ dmesg | less
</screen>
</para>
<para>
...which may yield something like the following, depending on your hardware:
</para>
<para>
<screen>
Dec 18 17:35:18 localhost kernel: hub 5-0:1.0: USB hub found
Dec 18 17:35:18 localhost kernel: hub 5-0:1.0: 2 ports detected
Dec 18 17:35:18 localhost kernel: Linux video capture interface: v1.00
Dec 18 17:35:18 localhost kernel: quickcam: QuickCam USB camera found (driver version QuickCam USB $Date$)
Dec 18 17:35:18 localhost kernel: quickcam: Kernel:2.6.7 bus:1 class:FF subclass:FF vendor:046D product:0840
Dec 18 17:35:18 localhost kernel: quickcam: Sensor HDCS-1000/1100 detected
Dec 18 17:35:18 localhost kernel: quickcam: Registered device: /dev/video0
Dec 18 17:35:18 localhost kernel: usbcore: registered new driver quickcam
</screen>
</para>
<para>
If you don't see it, the particular driver may exist as a loadable module. If you know what that module is named, try using <filename>find</filename>; in this example we are looking for the 'ibmcam' module:</para>
<screen>
$ find /lib/modules -name ibmcam.o
</screen>
<para>Note that up until the 2.4 series modules had the suffix <filename>.o</filename>; for 2.6+ series kernels this was replaced with <filename>.ko</filename>.</para>
<para>
You can get a list of all modules available by typing the following at the command line:</para>
<para>
<screen>
$ ls -R /lib/modules/`uname -r`/kernel </screen>
</para>
<para> Where <command>`uname -r`</command>, surrounded by forward tick marks, is your kernel version number.
The following output is an example of what you might find in a USB
webcam-ready kernel , where everything is loaded as a module (all
but the relevant lines have been edited for brevity):</para>
<para>
<screen>
./usb: usbvideo.o usbcore.o ibmcam.o
</screen> </para>
<para>
Once you know which module your camera needs you can find out if it is already loaded
by typing the following at the command line:
</para>
<para>
<screen>
# lsmod</screen></para>
<para> As shown by the prompt above, you will need to have root privileges
to do this.
You should get output similar to the following:</para>
<para>
<screen>
cdrom 29312 0 (autoclean) [sr_mod]
usb-ohci 17888 0 (unused)
usbcore 56768 0 [scanner ibmcam usbvideo usb-ohci]
ibmcam 39680 0
</screen>
</para>
<para> Most stock kernels are compiled with <filename>kmod</filename>, which enabling automatic loading of necessary modules when the appropriate hardware is detected. It may not always do so, however, so if you don't have the particular module you're seeking loaded and
you think the module may be available, try loading
it manually with <command>modprobe</command>, as in the following using the <filename>ibmcam</filename> module as an example:</para>
<para>
<screen>
# modprobe -v ibmcam</screen>
</para>
<para>
Drivers for specific webcam models, or links to project pages hosting code for drivers, are outlined in <xref linkend="models">. The drivers are usually available one of three ways: within the kernel, as a compilable stand alone module, or available as a pre-compiled binary from your Linux distribution.
</para>
<para>If the support for your driver is not found either enabled statically within the kernel or as a module, don't despair. Drivers for numerous models are in the Linux kernel source (available directly from <ulink url="http://www.kernel.org">kernel.org</ulink> source code repository), or in code offered separately from the kernel that can be configured to work with your current setup as oulined in <xref linkend="binary">. If your webcam driver is available in the kernel source but not enabled as a module or otherwise in your default system, you can either recompile the kernel from the source code you have or obtain a new version of the kernel source, either pre-packaged by your Linux distributor or directly from the previous link (as a so-called <quote>vanilla</quote> kernel).
If you are unfamiliar with the prerequisites and procedure of compiling your own kernel, I direct you to the <ulink
url="http://www.tldp.org/HOWTO/Kernel-HOWTO.html">Kernel HOWTO</ulink>
for more information. </para>
</sect3>
<sect3 id="binary">
<title>Patching, Source-Only or Precompiled Binary?</title>
<para>
You may find that your webcam is supported by only a kernel patch, by a source-only driver not requiring a kernel recompile, or you may even be lucky enough to have a distribution that makes a pre-compiled and packaged binary driver available for your computer's architecture. The procedure involved in the former is largely beyond the scope of this document and is probably best outlined in the documentation available on the web page of your particular model's driver found in <xref linkend="models">. Some further more general documentation on these processes are, however, addressed in <xref linkend="troubleshooting"></para>
</sect3>
</sect2>
<!-- - s e c t i o n b r e a k - -->
<sect2 id="connection">
<title>Supporting the Connection Type</title>
<sect3 id="usb-type">
<title>USB Webcams</title>
<para> If you have a USB webcam, it is likely a Linux driver has been written for your device.
There are two ways of supporting USB devices in Linux.
One is the more traditional kernel support, and the other is through
libusb.
For at least one webcam category, the STV0680-based models, working
libusb support is recommended, at least according to <ulink
url="http://stv0680-usb.sourceforge.net/">the Sourceforge page
on the subject</ulink>.</para>
<para>
Unless you know your driver requires libusb support, you should probably
stick with the more conventional in-kernel support for USB devices beginning
in <xref linkend="usb-kernel">. </para>
<sect4 id="libusb">
<title>Libusb</title>
<para> Libusb is a library that allows access to the USB functions in
Linux through userspace and without the need to enable kernel support
and insert modules.
Most distributions, at this point, are offering <ulink
url="http://libusb.sourceforge.net/">libusb</ulink> in their stable
branches (and some install it by default), so if you don't already have
kernel support for USB devices, then you may only have to install the
libusb package in order to access your device.
You must have USB device filesystem support enabled in your kernel,
which most distributions do.
To find out for sure, issue the following at the command line: </para>
<para>
<screen>
$ cat /proc/filesystems</screen></para>
<para>You should see (among others):</para> <para> <screen>
nodev usbdevfs
nodev usbfs
</screen> </para>
<para> You may need to mount usbdevfs to enable it and see the device
files, which you can do at the command line with <command>mount -t
usbdevfs none /proc/bus/usb</command>.
Don't try to use libusb while your particular <emphasis>kernel</emphasis>
webcam support is enabled either statically or the module loaded; you
can only use one at a time.</para>
<para> You can obtain the libusb package in <filename>.rpm</filename>,
<filename>.tgz</filename> or <filename>.deb</filename> format from your
Linux distribution.</para>
</sect4>
<sect4 id="usb-kernel">
<title>Linux Kernel USB Support</title>
<para> Kernel support is required for USB webcam support if not using
libusb (outlined above).</para>
<para>For 2.2 and 2.4 series kernels, your USB webcam may require the module <filename>usbvideo</filename>
to function. This is not required in the 2.6+ series.</para>
<para> For generic USB bus support in Linux, you will need USB subsystem
support in your kernel, whether usb-ohci, usb-ehci, or whatever flavor
of USB driver your system prefers.
USB subsystem support has been present in the Linux kernel since the
late 2.2 series.
For a more in-depth discussion of USB support in general, I direct you to
the <ulink url="http://www.linux-usb.org/">Linux-usb project site</ulink>.
If you want to find out which modules are loaded, at the command line
or in an xterm, type the following:</para>
<para>
<screen>
# lsmod
</screen>
</para>
<para> As shown by the prompt above, you will need to have root privileges
to do this.
You should get output similar to the following:</para>
<para>
<screen>
cdrom 29312 0 (autoclean) [sr_mod]
usb-ohci 17888 0 (unused)
usbcore 56768 0 [scanner ibmcam usbvideo usb-ohci]
ibmcam 39680 0
</screen>
</para>
<para> If you don't have the particular module you're seeking loaded and
you think the module may be available, try loading
it directly (using the usb ibmcam module as an example):</para>
<para>
<screen>
# modprobe -v ibmcam</screen>
</para>
<para> ...at which point you should see something like the
following:</para>
<para> <screen>
Using /lib/modules/2.4.20/kernel/drivers/usb/ibmcam.o</screen></para>
<para> By placing the entry <filename>ibmcam</filename> (for example) in
<filename>/etc/modules</filename> (note that this varies by distribution),
you can have the module load at boot-time automatically.
You can then confirm the module was loaded by checking the syslog or in
the boot-time record with <command>dmesg | less</command>), where you
should see an entry such as the following:</para>
<para>
<screen>
Oct 18 12:43:12 K7 kernel: hub.c: new USB device 00:02.3-2, assigned address 3
Oct 18 12:43:12 K7 kernel: ibmcam.c: IBM PC Camera USB camera found (model 2, rev. 0x030a)
Oct 18 12:43:12 K7 kernel: usbvideo.c: ibmcam on /dev/video1: canvas=352x240 videosize=352x240
</screen>
</para>
</sect4>
</sect3>
<sect3 id="IEEE1394">
<title>IEEE 1394 (<trademark>Firewire</trademark>,
<trademark>i.Link</trademark>)</title>
<para> IEEE 1394 webcams require an IEEE 1394 PCI card or an IEEE 1394
bus port on your mainboard.
The IEEE interface has been supported in Linux since the early 2.4-series
kernel.
If you are lucky enough to own such a device, generic information
on support of the IEEE 1394 bus in Linux can be found at <ulink
url="http://www.linux1394.org">www.linux1394.org</ulink>.
If you have a kernel older than 2.4.2, you will need to
patch your kernel with one of the patches found on <ulink
url="http://download.sourceforge.net/linux1394">this page</ulink>
matched to your kernel version.
In addition, you will require <ulink
url="http://download.sourceforge.net/libraw1394">libraw1394</ulink>.
The previously referenced linux1394.org site has a great installation
guide.</para>
<para> The <ulink
url="http://www.tele.ucl.ac.be/PEOPLE/DOUXCHAMPS/ieee1394/cameras/">IEEE1394
Digital Camera List</ulink>, by Damien Douxchamps, offers an outstanding
summary of the capabilities of IEEE 1394 cameras as well as the current
status of support for individual models. </para>
</sect3>
<sect3 id="parport-general">
<title>Generic Parallel Port Support for Parport Webcams</title>
<para> For 2.2 and 2.4 kernel systems, parallel-port support must be
enabled statically or as a module (stock kernels usually have this
enabled by default).
You may want to read <ulink url="http://www.torque.net/linux-pp.html">more
generic info about parallel-port device support under the Linux
kernel</ulink> before starting this process.
To find out for sure if the module <filename>parport</filename> is loaded,
you can check the <filename>dmesg</filename> file or use <command>
lsmod </command> as outlined above.
Using <command>dmesg | less</command>, you should see (among many other
lines) the following: </para>
<para>
<screen>
Mar 3 08:00:25 K7 kernel: parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
Mar 3 08:00:25 K7 kernel: parport0: irq 7 detected
</screen>
</para>
<para> If you are compiling your own kernel, enable 'Parallel Port
support'.
You should enable 'IEEE 1284 transfer modes', and if you have x86 type
architecture, you should also enable 'PC-style hardware'. </para>
<para> If modprobe returns an error when you attempt to load the module,
note that you may need to determine and supply the hardware address when
invoking <command>modprobe</command>.
The most common address is 0x378 for an x86 system; 0x278 and 0x3BC are
other possibilities for integrated or ISA parallel ports.
Add-in PCI parallel ports may have unusual base addresses.
You can also arrange multiple devices with either the parport_pc or
parport_arc modules, though that topic is beyond the scope of this
document.
</para>
<warning><para>WARNING: Be sure you have the correct address before
entering this information at the command line or else your machine may
become unstable, crash or otherwise implode.</para></warning>
<para> Your parallel port should be set to preferably <quote>EPP</quote>
mode, or alternatively ECP/EPP.
<quote>Bidirectional</quote> (also known as <quote>BPP</quote> or
<quote>PS/2</quote>) may work, albeit much more slowly.
<quote>Unidirectional</quote> mode is unsuitable for scanning.
The above setting can usually be accessed through your BIOS menu, at
least on x86 systems.</para>
</sect3>
</sect2>
<sect2 id="models">
<title>Specific Webcam Models</title>
<para> Note that this information is frequently changing.
The <ulink url="http://www.qbik.ch/usb/devices/index.php">Linux-USB
Device Overview</ulink> site is a great place to look if you have a
USB webcam.
Also, you will want to check for your model's homepage at <ulink
url="http://www.exploits.org/v4l/">http://www.exploits.org/v4l/</ulink>.
The information compiled below on specific webcam models is from the
same source, so you may find more up-to-date information through the
previous link.
If you can't find an entry for your particular hardware, you can find
links to resources on how to write your own driver!</para>
<important><para>It is important to note that if your camera isn't listed,
the easiest way to find out if your camera is supported is to find out
what chipset is used in its manufacture.</para></important>
<para>
This information is usually present in the specifications published in
your webcam's manual or on the manufacturer's website. </para>
<para> If you can't find your camera model listed
and aren't sure what chipset your camera is made with,
you should consider searching and/or subscribing to <ulink
url="https://listman.redhat.com/mailman/listinfo/video4linux-list">the
video4linux-list mailing list hosted by Redhat.</ulink> </para>
<sect3 id="threecom">
<title>3com HomeConnect PC Digital Webcam</title>
<para> This driver is supported with the kernel patch located at
<ulink url="http://homeconnectusb.sourceforge.net/">the homeconnectusb
project</ulink> web page.
It may require a kernel recompile after patching depending on your
kernel version. </para>
</sect3>
<sect3 id="CPiA">
<title>CPiA based Webcams</title>
<para> Please see the <ulink url="http://webcam.sourceforge.net/">project
home page</ulink> for up-to-date information.
This chipset has been used in the manufacture of both USB and parallel
port webcams including the following: </para>
<para>
<itemizedlist spacing=compact>
<listitem> <para>
Aiptek HyperVcam Fun USB (non-OV511 based)
</para> </listitem>
<listitem> <para> Creative Video Blaster WebCam II USB
and parallel-port </para> </listitem>
<listitem> <para>
CVideo-Mail Express parallel-port
</para> </listitem>
<listitem> <para> Digicom Galileo USB and Digicom Galileo
Plus </para> </listitem>
<listitem> <para>
Dynalink Digital Camera
</para> </listitem>
<listitem> <para> Ezonics EZCam (not Pro or Plus)
</para> </listitem>
<listitem> <para>
I-View NetView NV200M
</para> </listitem>
<listitem> <para> Microtek EyeStar USB </para> </listitem>
<listitem> <para>
Pace Color Video Camera USB
</para> </listitem>
<listitem> <para>
SuperCam WonderEye
</para> </listitem>
<listitem> <para>
TCE Netcam 310 USB
</para> </listitem>
<listitem><para>
Terracam USB (non-OV511 based or Terracam Pro)
</para>
</listitem>
<listitem><para>
Trust SpaceC@m Lite USB and SpaceC@m 100 </para>
</listitem>
<listitem><para>
Utopia USB Camera </para>
</listitem>
<listitem><para>
ZoomCam USB and parallel-port
</para> </listitem>
</itemizedlist>
</para>
</sect3>
<sect3 id="se401">
<title>SE401, SE402 and EP800 based USB webcams</title> <para> This
project is a work in progress.
The drivers and other useful information are
available at the project homepage located <ulink
url="http://members.brabant.chello.nl/~j.vreeken/se401">here</ulink>.
As of writing this, it is necessary to patch and recompile your kernel
in order to obtain support for these models.
The driver supports the following: </para>
<para> SE401 chipset via the 'se401' driver: </para>
<para>
<itemizedlist spacing=compact>
<listitem><para>
Aox SE401 camera </para>
</listitem>
<listitem><para>
Philips PCVC665 USB VGA webcam 'Vesta Fun'</para>
</listitem>
<listitem><para>
Kensington VideoCAM PC Camera (Models
67014-67017)</para>
</listitem>
</itemizedlist>
</para>
<para> SE402 and EP 800 chipsets via the 'epcam' driver
<itemizedlist spacing=compact>
<listitem><para>
Spypen Actor</para>
</listitem>
<listitem><para>
Rimax Slim Multicam </para>
</listitem>
<listitem><para>
Concord Eye-Q Easy </para>
</listitem>
<listitem><para>
Creative PD1001</para>
</listitem>
<listitem><para>
Chicony DC-100</para>
</listitem>
<listitem><para>
Endpoints SE402 and EP800</para>
</listitem>
</itemizedlist>
</para>
</sect3>
<sect3 id="ov511">
<title>OmniVision based Webcams</title> <para> This category includes a
multitude of webcam and video-capture devices manufactured by Omnivision,
including the OV511(+), OV518(+), OV6620, OV6630, OV7610, and OV7620AE.
The project homepage is <ulink
url="http://alpha.dyndns.org/ov511">here</ulink>.
Supported models include: </para>
<para>
<itemizedlist spacing=compact>
<listitem><para>
Aiptek HyperVcam Home and Mobile</para>
</listitem> <listitem><para>
Amitech AWK-300</para>
</listitem> <listitem><para>
I-view NetView NV300M</para>
</listitem> <listitem><para>
TEVion MD9308</para>
</listitem> <listitem><para>
Intel Me2Cam</para>
</listitem> <listitem><para>
Dlink DSB C100, C300</para>
</listitem> <listitem><para>
Hawking Tech. UC-110, UC-300 and UC-310</para>
</listitem> <listitem><para>
Puretek PT-6007</para>
</listitem> <listitem><para>
Alpha Vision Tech AlphaCam SE model AC-520</para>
</listitem> <listitem><para>
Creative Labs WebCam model PD1001 with OV518
chipset</para>
</listitem> <listitem><para>
Creative Labs WebCam 3, WebCam Go, Webcam Go
Plus</para>
</listitem> <listitem><para>
Elecom UCAM-C1C20</para>
</listitem> <listitem><para>
Elta WEBCam 8211 PCC</para>
</listitem> <listitem><para>
Ezonics EZPhone Cam</para>
</listitem> <listitem><para>
Philips ToUCam XS (old version with OV518)</para>
</listitem> <listitem><para>
LG Electronics LPC-UM10</para>
</listitem> <listitem><para>
Lifeview various USB Life TV models</para>
</listitem> <listitem><para>
Genius VideoCam Express</para>
</listitem> <listitem><para>
AverMedia Intercam Elite</para>
</listitem> <listitem><para>
Maxxtro Cam22U</para>
</listitem> <listitem><para>
MediaForte MV300, PC Vision 300</para>
</listitem> <listitem><para>
Terratec TerraCam PRO and some TerraCam
models</para>
</listitem> <listitem><para>
OmniVision (except those with OV519)</para>
</listitem> <listitem><para>
TRENDNet TV-PC301</para>
</listitem> <listitem><para>
Trust Sp@ceC@m USB</para>
</listitem> <listitem><para>
Lifetec LT9388</para>
</listitem> <listitem><para>
BestBuy EasyCam U</para>
</listitem> <listitem><para>
Maxell Maxcam</para>
</listitem> <listitem><para>
TCE NetCam 310u</para>
</listitem> <listitem><para>
Medion MD9388</para>
</listitem> <listitem><para>
Webeye 2000B</para>
</listitem> <listitem><para>
Suma eON</para>
</listitem> <listitem><para>
Prochips PCA-3100</para>
</listitem> <listitem><para>
Ezonics EZ USB Cam II (the OV511+ models)</para>
</listitem> <listitem><para>
Waytech I-Pac VIC-30</para>
</listitem> <listitem><para>
Zoom Telephonics ZoomCam III USB (model
1598)</para>
</listitem>
</itemizedlist>
</para>
</sect3>
<sect3 id="qcam"> <title>Logitech (formerly Connectix) Quickcam
Support</title>
<para> The QuickCam VC USB and parallel port model
webcams are supported by the driver offered <ulink url="
http://digilander.libero.it/demarchidaniele/qcamvc/quickcam-vc.html">here</ulink>.
A kernel patch and recompile are necessary for support of this model.
</para>
<para> The Quickcam driver is represented by two different projects that offer two different flavors
of driver for certain Quickcam models, both of which are stand-alone
drivers that do not require a kernel patch or recompile.
The <ulink url="http://qce-ga.sourceforge.net/">qce-ga</ulink> and <ulink
url="http://www.ee.oulu.fi/~tuukkat/quickcam/quickcam.html">qc-usb</ulink>
drivers support the following models: </para>
<para>
<itemizedlist spacing=compact>
<listitem><para>
Logitech (earlier models of) Quickcam Express</para>
</listitem>
<listitem><para>
Quickcam Web</para>
</listitem>
<listitem><para>
Legocam</para>
</listitem>
<listitem><para>
Dexxa Webcam</para>
</listitem>
<listitem><para>
Labtec Webcam</para>
</listitem>
</itemizedlist>
</para>
<para> The qc-usb driver is more experimental but reportedly works better
on some models such as the Quickcam Web. Also, I have recieved correspondence that newer versions of the
Logitech Quickcam Express no longer work with the above drivers; instead <ulink url="http://home.tiscali.dk/tomasgc/labtec/">this page</ulink> offers an experimental driver that claims to support the newer model.</para><para>
Note to Redhat users: The qce-ga driver doesn't compile properly using the
modified kernel source provided in Redhat 9, but a fix is available <ulink
url="http://www.ee.oulu.fi/~tuukkat/quickcam/FAQ">here</ulink>. </para>
<para> Some Logitech camera models are supported by the Philips driver
in <xref linkend="philips">.</para>
</sect3>
<sect3 id="icm532">
<title>ICM532 Based Webcams</title>
<para>One driver for this chipset, <ulink url="http://icm532.sourceforge.net/home.html">homepage here,</ulink> is now merged into the 2.6 kernel source; the other is (per the developer's own description) experimental and available <ulink url="http://home.tiscali.dk/tomasgc/labtec/">here</ulink>. Either or both claim to support the following models:</para>
<para><itemizedlist spacing=compact>
<listitem><para>
IC-Media Corp Pencam</para>
</listitem>
<listitem><para>
Newer versions of the Logitech Quickcam Express </para>
</listitem>
<listitem><para>
Newer versions of the Labtec Webcam</para>
</listitem>
<listitem><para>
Biolux 654 microscope</para>
</listitem>
<listitem><para>
Ezonics EZCam USB II (uvt8532)</para>
</listitem>
<listitem><para>
Ezonics EZCam USB III</para>
</listitem>
<listitem><para>
TerraCam USB</para>
</listitem>
<listitem><para>
Stick Webcam</para>
</listitem>
<listitem><para>
Mini WebCam</para>
</listitem>
<listitem><para>
Tucan PenCam</para>
</listitem>
<listitem><para>
Che-ez! Webbie</para>
</listitem>
<listitem><para>
SNAKE EYE SI-8480/8481</para>
</listitem>
<listitem><para>
PC CAM CP03</para>
</listitem>
<listitem><para>
WEB Camera PBC0006</para>
</listitem>
<listitem><para>
Clipcam</para>
</listitem>
</itemizedlist>
</para>
</sect3>
<sect3 id="nw802">
<title>NW802 Based Webcams</title>
<para> This chipset, manufactured by DIVIO, is supported by the driver
found <ulink url="http://nw802.sourceforge.net">here</ulink>.
The models supported include the following: </para>
<para>
<itemizedlist spacing=compact>
<listitem><para>
BTC SurfCam CMOS300k</para>
</listitem> <listitem><para>
Mustek WCam 300</para>
</listitem> <listitem><para>
Logitech QuickCam Pro USB (the earlier "dark
focus ring" model)</para>
</listitem>
</itemizedlist>
</para>
</sect3>
<sect3 id="philips">
<title>Philips USB Webcams</title>
<para>
Because of the expiration of the Non-Disclosure-Agreement between Philips Corporation and the former maintainer of the <filename>pwc</filename> driver, the previous kernel support for Philips PWC-chip-based webcams has been removed. Luckily a new, still experimental driver that does not require a proprietary module is under development. The old site, with a discussion of the change, can be seen at <ulink url="http://www.smcc.demon.nl/webcam/">http://www.smcc.demon.nl/webcam/</ulink>; the new driver is maintained at <ulink url="http://www.saillard.org/linux/pwc/">saillard.org</ulink> with more information at the <ulink url="">PWC Documentation Project</ulink>.</para>
<para> Philips models supported by the above include the following.
</para>
<para>
<itemizedlist spacing=compact>
<listitem><para>
PCA645VC</para>
</listitem>
<listitem><para>
PCA646VC</para>
</listitem>
<listitem><para>
PCVC675K Vesta, Vesta Pro and Vesta Scan</para>
</listitem>
<listitem><para>
PCVC720K/40 ToUCam XS, ToUCam Fun, ToUCam Pro
and ToUCam Scan</para>
</listitem>
<listitem><para>
Askey VC010</para>
</listitem>
<listitem><para>
Creative Labs Webcam 5, Pro Ex</para>
</listitem>
<listitem><para>
Logitech 3000 and 4000 Pro, Notebook Pro,
and Zoom</para>
</listitem>
<listitem><para>
Samsung MPC-C10 and MPC-C30</para>
</listitem>
<listitem><para>
Sotec Afina Eye</para>
</listitem>
<listitem><para>
Visionite VCS UM100 and UC300</para>
</listitem>
</itemizedlist>
</para>
</sect3>
<sect3 id=spca50x>
<title>SPCA50X USB Camera Linux Driver</title>
<para>Information regarding this chipset can be found <ulink url="http://spca50x.sourceforge.net/spca50x.php">here</ulink>, and is under heavy development and includes partial or complete support for the following models:</para>
<para>
<itemizedlist spacing=compact>
<listitem><para>
Kodak DVC-325 and EZ200
</para></listitem>
<listitem><para>Creative PC-CAM 300, 600, 750
</para></listitem>
<listitem><para>Genius VideoCAM Express V2
</para></listitem>
<listitem><para>Micro Innovation IC 200/IC 150
</para></listitem>
<listitem><para>Logitech ClickSmart 310, 420, 510, 820 and Cordless models
</para></listitem>
<listitem><para>Logitech Pocket750
</para></listitem>
<listitem><para>Benq DC 1016, 1300, 1500, 3410
</para></listitem>
<listitem><para>Flexcam 100
</para></listitem>
<listitem><para> Aiptek MegaCam, [1.3 Megapixel] Mini PenCam and PocketCam 1.3M Smart
</para></listitem>
<listitem><para>Finet Technology Palmpix DC-85
</para></listitem>
<listitem><para>Pure DigitalDakota
</para></listitem>
<listitem><para>3Com Home Connect lite
</para></listitem>
<listitem><para>Megapix V4
</para></listitem>
<listitem><para>Mustek gSmart: Mini, Mini2, Mini3, LCD 2, LCD 3
</para></listitem>
<listitem><para>Digital Dream Enigma 1.3, Epsilon 1.3
</para></listitem>
<listitem><para>Maxwell Compact Pc PM3
</para></listitem>
<listitem><para>Jenoptik models
</para></listitem>
<listitem><para> Minton S-Cam F5
</para></listitem>
<listitem><para>D-Link DSC-350
</para></listitem>
<listitem><para>Trust FamilyC@m 300 Movie
</para></listitem>
<listitem><para> Aiptek Pocket DV, PocketDVII, DV3100+, mini PenCam 2, PocketCam 3M, Pencam SD 2, Pocket DV3500
</para></listitem>
<listitem><para>Hama Sightcam 100
</para></listitem>
<listitem><para> Micro Innovations IC50C, IC400c
</para></listitem>
<listitem><para>FlyCam USB100
</para></listitem>
<listitem><para>Arowana USB Camera 300 K
</para></listitem>
<listitem><para>Intel Easy PC Camera, CS120 (Easy PC Share), PC Camera Pro (CS431), Pocket PC Camera (CS630)
</para></listitem>
<listitem><para>Grandtec V.cap
</para></listitem>
<listitem><para>Sigma-Apo Petcam
</para></listitem>
</itemizedlist></para>
</sect3>
<sect3 id="stv"> <title>STV0680 based Models</title>
<para> The USB version of webcams made with this chipset are supported by
the 2.4.18 and above kernel with the <filename>stv680.o</filename> module.
Alternatively, you can obtain the source from <ulink
url="http://stv0680-usb.sourceforge.net">the project homepage</ulink>.
This driver supports models including the Aiptek Pencam and the Nisis
Quickpix 2. </para>
<para> If you have a serial version, the main one
of which is the Scan e-Studio, you should go <ulink
url="http://stv0680.sourceforge.net">here</ulink>. </para>
</sect3>
<sect3 id="w9966cf"> <title>Winbond w9966cf</title>
<para> This is a driver for the parallel-port interface that supports
the Philips SAA7111 CCD-control chip as found on the Lifeview Flycam
SUPRA webcam. It is included in the late 2.4 kernel series and later
under the heading 'video4linux' support.
The homepage for this project is <ulink
url="http://hem.fyristorg.com/mogul/w9966.html">here.</ulink></para>
</sect3>
<sect3 id="xirlink"> <title>Xirlink <trademark>C-it</trademark> HDCS-1000
based Webcams</title>
<para> This driver is for the USB webcams manufactured by Xirlink, IBM
(PC Camera) and Veo Stingray model webcams.
Support has been in the Linux kernel USB section since 2.2.12.
The homepage is at <ulink
url="http://www.linux-usb.org/ibmcam">http://www.linux-usb.org/ibmcam</ulink>.
</para> </sect3> </sect2></sect1>
<!-- - - - - - - - - - - S e c t i o n B r e a k - - - - - - - - - -
- -->
<sect1 id="dev-intro">
<title>Accessing the Video Device</title> <para> The following
section applies to all connection types. </para>
<sect2 id="dev-manual">
<title>The Video Devices Node</title>
<para>The Linux kernel requires a virtual device node be created to access and control the device in question. It may have already been created for you at boot-up; <command>ls -l /dev/video*</command> (with an asterisk) or alternatively <command>find /dev -name video*</command> or even visual inspection of the <filename>/dev</filename> directory with your favorite file manager can give you an idea if the video devices exist. If so you can proceed to <xref linkend="permissions">; if not you will need to create them manually.</para>
<para>An easy way to create them, if available with your Linux distribution, is use of the <filename>MAKEDEV</filename> script, which may be located in <filename>/dev</filename> or the usual places for storing executable commands (<filename>/bin</filename>,<filename>/sbin</filename> and so on). The manual page for <filename>MAKEDEV</filename> (<command>man MAKEDEV</command>) can guide you further, but be aware of the device-specific command options. If <filename>MAKEDEV</filename> doesn't work or doesn't exist, or you just prefer doing things the hard way, move on to the next paragraph.
</para>
<para>
A device can be created as a block (such as a drive), a fifo
(file-in-file-out or pipe, as in xconsole) or a character device, which
represents other hardware.
Each device has a major and a minor number <quote>coordinate</quote>
to tell the kernel what it is and where to access it.
These numbers are not arbitrary. The major number 81 with minor number 0, 1, 2, and so on are by convention assigned to Video4linux devices, including TV tuner boards and webcams. In order to create the video device <filename>/dev/video0</filename>, use <command>mknod</command> at the command line:
</para>
<para>
<screen>
# mknod /dev/video0 c 81 0
</screen>
</para>
<para>
where <command>c</command> represents a character device.</para>
<para>
You can use the following script, which I
have borrowed from the kernel source (located in
<filename>linux/Documentation/video4linux/bttv/MAKEDEV</filename> of
the source tree):</para>
<para>
<screen>
#!/bin/bash
function makedev () {
for dev in 0 1 2 3; do echo "/dev/$1$dev:
char 81 $[ $2 + $dev ]" rm -f /dev/$1$dev
mknod /dev/$1$dev c 81 $[ $2 + $dev ] chmod
666 /dev/$1$dev
done
# symlink for default device
rm -f /dev/$1 ln -s /dev/${1}0 /dev/$1
}
# see http://roadrunner.swansea.uk.linux.org/v4lapi.shtml
echo "*** new device names ***" makedev video
0 makedev radio 64 makedev vtx 192 makedev vbi 224
# "*** old device names (for compatibility only) ***"
#makedev bttv 0 #makedev bttv-fm 64 #makedev bttv-vbi 224
</screen>
</para>
<para> Simply copy and paste the above into your favorite editing program,
save it as MAKEDEV or whatever name you like, make it executable
(i.e., <command>chmod u+x MAKEDEV</command>), and then execute it as root: </para>
<para>
<screen>
# ./MAKEDEV
</screen>
</para>
</sect2>
<sect2 id="permissions">
<title>Groups and Permissions</title>
<para> It is a good idea to be sure that your user account can access
the device once all modules are loaded and device nodes created.
The most security-conscious way to do that is to add access for a
particular group.
On my system, the members of the group 'video' are allowed to use the
webcam, scanner and other photographic devices.
The way to accomplish this is to first change the ownership of the
devices in <filename>/dev</filename> like so (as root): </para>
<para>
<screen>
# chown root.video /dev/usb/video*
</screen>
</para>
<para> ...where <command>root.video</command> are the owner and group
the device will now belong to.
Obviously, the specific command will vary by your system and the type
of device.
It is important that you change the ownership of the device node itself
and not the symlink; symlinks' ownerships are affected only by changing
the parent devices or files they point to. </para>
<para> To see if your user account is a member of the group in question,
as root issue the following command:
<command>grep -e video /etc/group</command>.
You should see something like the following:</para>
<para>
<screen>
video:x:44:
</screen>
</para>
<para> ...where '44' is the group number.
Since no members follow the last colon in the 'video' group, we can add
them, let's say user 'jhs' with the command</para>
<para>
<screen>
# adduser jhs video
</screen>
</para>
<para> After this, it's simply a matter of allowing read and write access
for the user in question of the device like so: </para>
<para>
<screen>
# chmod g+rw /dev/v4l/video0
</screen>
</para>
<para> ...where <command>g+rw</command> means add <command>r</command>ead
and <command>w</command>rite access for <command>g</command>roup.
See the documentation for chmod (<command>man chmod</command> or
<command>info chmod</command>) for further info.</para> </sect2> </sect1>
<!-- - - - - - - - - - - S e c t i o n B r e a k - - - - - - - - - -
- -->
<sect1 id="framegrabbers">
<title>Framegrabbing Applications</title>
<para>
</para>
<sect2 id="command">
<title>Command Line Programs</title>
<para>As implied by the title these do not require the X Window System to operate your camera and capture images.
</para>
<sect3 id="Streamer"> <title>Streamer</title>
<para> Streamer is a versatile program that allows a capture from a
webcam or video device using only the command line.
It may be offered in your Linux distribution's Xawtv package, or may need to be fetched separately as in Debian. You can find it and more information at <ulink url="http://www.bytesex.org/xawtv">Gerd Knorr's Xawtv homepage</ulink>.</para>
<para>To take a standard JPEG picture from the command line where
the camera is accessed through <filename>/dev/video0</filename>: </para>
<para>
<screen>
$ streamer -c /dev/video0 -b 16 -o outfile.jpeg
</screen>
</para>
<para> ...where <command>-b</command> is the number of colors (in bpp,
whether 15, 16, 24 or 32) and <command>-o</command> is the output
filename that will be dropped into the current directory (specify
<command> -o </command><filename>/path/outfile.jpg</filename> to place
it elsewhere). If you are going to capture multiple images be sure to append the output file name with zeros, as streamer can name the capture files in sequence, i.e., <command>-o </command><filename>outfile000.jpeg</filename> becomes <filename>outfile001.jpeg</filename>, <filename>outfile002.jpeg</filename>, and so on.</para>
<para> To make an .avi file: </para>
<para>
<screen>
$ streamer -q -c /dev/video0 -f rgb24 -r 3 -t 00:30:00 -o /home/jhs/outfile.avi
</screen>
</para>
<para> ...where <command>-q</command> is for 'quiet' execution (no message
output), <command>-f</command> is 'format' (rgb24 is TrueColor avi),
<command>-r</command> is the frames per second and <command>-t</command>
is the time of recording (30 minutes).
Streamer can capture raw and <trademark>Quicktime</trademark>
(non-Sorensen) formats and can capture audio as well.
See <command>streamer --help</command> for more information. </para>
</sect3>
<sect3 id="camE"> <title>camE</title>
<para> CamE is a command-line program that works in daemon mode to
capture frames from your v4l device for archive or upload (to a webserver,
for example) via ftp or scp.
You can overlay other graphics, timestamp the frames, or add other dynamic
text all by altering the appropriate line in the configuration file.
See <ulink url="http://linuxbrit.co.uk/camE/">the camE homepage</ulink>
for more information. </para>
</sect3>
<sect3 id="motion"> <title>Motion</title>
<para> Motion is a brilliant program that is able to monitor the video
signal from one or several webcams.
It can record periodic snapshots, and when motion is detected, record an
mpeg and/or perform another action such as sending an email or executing
a command.
It can track and graphically mark the motion it detects, feed files via an
http server to your website, stream them to another application and more.
The number
of command line options may be intimidating; there is however, a <ulink
url="http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuide">Wiki
available online</ulink> that outlines the various command and
configuration file options nicely.
The motion homepage can be found <ulink
url="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome">here</ulink>.
</para>
</sect3>
<sect3 id="webcam"><title>Webcam</title>
<para>Webcam is an automated command line tool for operating a webcam that is also available from
<ulink url="http://www.bytesex.org/xawtv">the Xawtv homepage</ulink>. It is excellent for automated operation such as from a cron job, as it requires no
command line options, only a previously edited configuration file (usually <filename>~/.webcamrc</filename>). It is similar to camE above in that one can captures images and upload them to a Web-Server via ftp or ssh.
</para>
</sect3>
<sect3 id="sane"> <title>SANE</title>
<para> SANE, or Scanner Access Now Easy, supports access of v4l devices including webcams in later versions.
If you are familiar with using a photographic scanner device in Linux,
you may be interested in using SANE for image capture, especially since
a few devices double as both scanners and digital cameras.
See the relevant sections of the Scanner-HOWTO <ulink
url="http://tldp.org/HOWTO/Scanner-HOWTO/sane.html#getting-SANE">here</ulink>.
</para>
</sect3>
</sect2>
<sect2 id="gui">
<title>GUI(Grapical User Interface)-Based Programs</title>
<sect3 id=xawtv>
<title>Xawtv</title>
<para> Xawtv is an X-based program for accessing video devices
in Linux including TV tuning devices and webcams.
The home page is at <ulink
url="http://bytesex.org/xawtv">http://bytesex.org/xawtv</ulink>.</para>
<para> When you first try out your webcam, and you think things are
configured right, use the -hwscan option: </para>
<para>
<screen>
$ xawtv -hwscan This is xawtv-3.72, running on Linux/i686 (2.4.21) looking for available devices
/dev/v4l/video0: OK [ -device /dev/v4l/video0 ] type : v4l name : BT878(Hauppauge (bt878)) flags: overlay capture tuner
/dev/v4l/video1: OK [ -device /dev/v4l/video1 ] type : v4l name : IBM USB Camera flags: capture
</screen>
</para>
<para> ...so now you can see the available devices (your output may
differ substantially).
Try opening an xterm and running xawtv, grabbing from your webcam video
device: </para>
<para>
<screen>
$ xawtv -c /dev/video1 This is xawtv-3.72, running on Linux/i686 (2.4.21)
</screen>
</para>
<para> ...and (hopefully) your camera will begin capturing to a window
on your desktop.
You may see some error messages in your xterm if things don't work that
can be helpful to diagnose configuration problems.
If you aren't interested in all that, and things work for you, launch
from your window manager's menu next time.
You can read about more xawtv options with <command>man xawtv</command>.
</para>
</sect3>
<sect3 id="gqcam">
<title>Gqcam</title>
<para> <ulink url="http://cse.unl.edu/~cluening/gqcam/">Gqcam</ulink>
is a graphical GTK+-based application originally written to access
Connectix QuickCams but now supports nearly all Video4Linux compatible
webcam devices.
It has an intuitive interface that makes viewing, taking snapshots,
and configuring webcam settings blissfully easy.
It is highly recommended for those who only want to take a picture here and there without editing a
configuration file or using the command line. </para>
</sect3>
<sect3 id="camorama"><title>Camorama</title>
<para>Camorama is a graphical GTK+2.0-based application very similar to gqcam written for the Gnome2 desktop. The home page is <ulink url="http://camorama.fixedgear.org/">here</ulink>.</para>
</sect3>
<sect3 id="gnomemeeting"> <title>GnomeMeeting</title>
<para>GnomeMeeting is a VOIP/IP-Telephony application for the Gnome2 desktop that also supports videoconferencing with a webcam. The homepage can be found at <ulink url="http://www.gnomemeeting.org/">gnomemeeting.org</ulink>.
</para></sect3> </sect2> </sect1>
<!-- - - - - - - - - - - S e c t i o n B r e a k - - - - - - - - - -
- -->
<sect1 id="troubleshooting"> <title>Troubleshooting</title> <sect2
id="idchip">
<title>Help, I have a USB webcam and don't know exactly what model it is and/or who the manufacturer is. What do I do?</title> <para>
Use <command>lsusb</command>; it can give you an idea of what other USB devices are available on your system, too:
</para>
<para><screen>
$ lsusb
Bus 007 Device 001: ID 0000:0000
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 003: ID 0545:8080 Xirlink, Inc. IBM C-It WebCam
Bus 003 Device 002: ID 046d:0840 Logitech, Inc. QuickCam Express
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 003: ID 051d:0002 American Power Conversion Back-UPS Pro 500/1000/1500
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
</screen></para>
<para>The numbers after 'ID' are the Vendor and Product numbers, respectively. They can then be looked up in <ulink url="http://www.linux-usb.org/usb.ids">the Linux USB ID catalog</ulink>.</para>
<para>If <command>lsusb</command> is not available to you, and you have support for <filename>/proc</filename> filesystem support and USB-filesystem
support, issue the following at the command line: </para>
<para>
<screen>
$ cat /proc/bus/usb/devices
</screen>
</para>
<para>
You should receive output including (but not necessarily limited
to) the following:
</para>
<para>
<screen>
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=3 Spd=12 MxCh=0
D: Ver= 1.01 Cls=ff(vend.) Sub=ff Prot=ff MxPS=8 #Cfgs=1
P: Vendor=0545 ProdID=8080 Rev= 3.0a
S: Product=USB IMAGING DEVICE
</screen>
</para> <para> The line beginning <quote>T:</quote> is the USB bus the
device is attached to.
The <quote>P:</quote> indicates (obviously) the vendor and product ID,
which are catalogued at the <ulink url="http://www.linux-usb.org">linux
USB Project homepage</ulink>. </para>
</sect2>
<sect2 id="nodev"> <title>Help, I can't find the camera device in
<filename>/dev</filename>!</title> <para> Assuming your connection type
is supported, and your camera is working, see <xref linkend="dev-manual">.
</para>
</sect2>
<sect2 id="access"> <title>Help, I can see the camera device (both in person and as a device node in <filename>/dev</filename>), but I
can't access it!</title> <para>
See <xref linkend="permissions">.
</para>
</sect2>
<sect2 id="src"> <title>Help, my camera has a driver that is source-only,
i.e., has to be built by me! Where do I start?</title> <para> First, check
if your Linux distribution offers a pre-compiled binary of the driver. You
can then load it as you normally would for a module.
If that is not the case, be sure you have kernel sources installed.
You will also need at a minimum GNU make, gcc, binutils and perhaps
other programs installed depending on your distribution.
(Debian users should see the next section for instructions specific
to that distribution.)
</para>
<para>
Download the driver source (in this example named
<filename>src.tar.gz</filename>) and uncompress/untar it: </para>
<para>
<screen>
$ tar -xvzf src.tar.gz
</screen>
</para>
<para>
Then, change to the directory of your kernel source:
</para>
<para>
<screen>
# cd /usr/src/linux
</screen>
</para>
<para>
Make the necessary source files:
</para>
<para>
<screen>
# make oldconfig # make dep
</screen>
</para>
<para>
Now, change to the directory where you unpacked the driver source and
read the README and/or INSTALL files for instructions on how to make
the driver.
Usually this involves some combination of "make" "make all" and/or
"make install."
Assuming it compiles correctly, you can simply load the new module with
<command>modprobe</command>.
If you have any problems, see <xref linkend="morehelp">. </para>
</sect2>
<sect2 id="debsrc">
<title>I am using Debian GNU/Linux. Is there an easier way to go through all this kernel compiling stuff and building of source modules?</title>
<para>
It is far simpler, in your author's humble opinion, to use the automated <filename>kernel-package
</filename> utility.
First, install it and the dependencies using <command>apt-get</command>. Next,
install the kernel source that you want (e.g., <command>apt-get install
kernel-source-2.X.X</command>). Untar the bzip2'd kernel source with <command>tar
-xvjf</command> and then make a symbolic link called <filename>linux</filename> that points to the new source:
</para>
<para>
<screen>
# ln -s /usr/src/kernel-source-2.X.X /usr/src/linux
</screen>
</para>
<para>
Then <command>cd /usr/src/linux</command> and clean: <command>make-kpkg clean</command>, followed
by <command>make menuconfig</command> or <command>make xconfig</command> as you would if compiling
a new kernel. Next, you can use <command>make-kpkg kernel_image</command> and then install your new
kernel package that has been deposited in <filename>/usr/src</filename> with <command>dpkg -i ../kernel-image-2.X.X</command>. Next, you can get the pre-packaged
source driver using <filename>apt</filename>. So, in the case of the Quickcam Express, the package is <filename>qc-usb-source</filename>:
</para>
<para>
<screen>
# apt-get install qc-usb-source
</screen>
</para>
<para>
...and untar the archive:
</para>
<para>
<screen>
# tar -xvzf qc-usb-modules.tar.gz
</screen>
</para>
<para>
This will uncompress the source into the <filename>/usr/src/modules</filename> directory. The final step, while still in <filename>/usr/src/linux</filename> is to make the modules with kernel-package:
</para>
<para>
<screen>
# make-kpkg modules_image
</screen>
</para>
<para>
Install the new package, in <filename>/usr/src/</filename>, called <filename>qc-usb-modules-[arch].deb</filename> using <command> dpkg -i</command>. Finally, load the module:
</para>
<para>
<screen>
# modprobe quickcam
</screen>
</para>
<para>
Check the documentation in /usr/share/doc/kernel-package for any problems.</para>
</sect2>
<sect2 id="patch"> <title>Help, my camera is supported by a driver that
has to be patched into my kernel! What do I do?</title> <para>
See <ulink
url="http://tldp.org/HOWTO/Kernel-HOWTO/patching_the_kernel.html">the
section on patching</ulink> of the Kernel-HOWTO at <ulink
url="http://tldp.org">The Linux Documentation Project</ulink>. </para>
<para> The short and unguaranteed version of patching, by your humble
author, goes as follows: Be sure you have the same prerequisites outlined
in <xref linkend="src"> installed.
First, on the command line or in an xterm change to the source directory
of the kernel version you are (or will be) running with the camera patch
(in this example named <filename>patch.diff</filename>). </para>
<para>
<screen>
# cd /usr/src/linux
# patch -p1 -E patch.diff
</screen>
</para>
<para> You should see a confirmation that the 'hunks' were successfully
applied.
At this point, you can <command>make menuconfig</command> or whatever
program you use to recompile, enabling the appropriate support.
If any of the hunks failed, or you run into any problems in addition to
the link referenced above you, should consult <command>man patch</command>
and <xref linkend="morehelp">.</para>
</sect2>
<sect2 id="morehelp">
<title>Help--as in, where can I get more of it?</title>
<para> See the video4linux mailing list headquarters at <ulink
url="https://listman.redhat.com/mailman/listinfo/video4linux-list">https://listman.redhat.com/mailman/listinfo/video4linux-list</ulink>.
</para> </sect2>
<sect2 id="v4l"> <title>Help, I want to contribute to Video4Linux
support in Linux! Who do I get in touch with?</title> <para> See <ulink
url="http://www.thedirks.org/v4l2/peopleprojects.htm">this page</ulink>.
</para> </sect2> </sect1>
<!-- - - - - - - - - - - S e c t i o n B r e a k - - - - - - - - - -
- -->
<appendix id="appendix"> <title>Gnu Free Documentation License</title>
<para>
Version 1.2, November 2002
</para>
<para>
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone
is permitted to copy and distribute verbatim copies of this
license document but changing it is not allowed.
</para>
<para> 0. PREAMBLE </para>
<para>
The purpose of this License is to make a manual, textbook,
or other functional and useful document "free" in the sense of
freedom: to assure everyone the effective freedom to copy and
redistribute it, with or without modifying it, either commercially
or noncommercially. Secondarily, this License preserves for the
author and publisher a way to get credit for their work, while
not being considered responsible for modifications made by others.
</para>
<para>
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense.
It complements the GNU General Public License, which is a copyleft
cense designed for free software.
</para>
<para>
We have designed this License in order to use it for manuals for
free software, because free software needs free documentation: a
free program should come with manuals providing the same freedoms
that the software does. But this License is not limited to
software manuals; it can be used for any textual work, regardless
of subject matter or whether it is published as a printed book.
We recommend this License principally for works in which its
purpose is instruction or reference.
</para>
<para> 1. APPLICABILITY AND DEFINITIONS </para>
<para>
This License applies to any manual or other work, in any medium,
that contains a notice placed by the copyright holder saying
it can be distributed under the terms of this License. Such a
notice grants a world-wide, royalty-free license, unlimited in
duration, to use that work under the conditions stated herein.
The "Document", below, refers to any such manual or work.
Any member of the public is a licensee and is addressed as "you".
You accept the license if you copy, modify, or distribute the
work in a way, thus requiring permission under copyright law.
</para>
<para>
A "Modified Version" of the Document means any work containing
the Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
</para>
<para>
A "Secondary Section" is a named appendix or a front-matter
section of the Document that deals exclusively with the
relationship of the publishers or authors of the Document to the
Document's overall subject (or to related matters) and contains
nothing that could fall directly within that overall subject.
(Thus, if the Document is in part a textbook of mathematics,
a Secondary Section may not explain any mathematics.) The
relationship could be a matter of historical connection with
the subject or with related matters, or of legal, commercial,
philosophical, ethical, or political position regarding them.
</para>
<para>
The "Invariant Sections" are certain Secondary Sections in which
titles are designated, as being those of Invariant Sections,
in the notice that says that the Document is released under
this License. If a section does not fit the above definition of
Secondary, then it is not allowed to be designated as Invariant.
The Document may contain zero Invariant Sections. If the Document
does not identify any Invariant Sections, then there are none.
</para>
<para>
The "Cover Texts" are certain short passages of text that are
listed, as Front-Cover Texts or Back-Cover Texts, in the notice
that says that the Document is released under this License.
A Front-Cover Text may be at most five words, and a Back-Cover
Text may be at most 25 words.
</para>
<para>
A "Transparent" copy of the Document means a machine-readable
copy, represented in a format where its specification is available
to the general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images
composed of pixels) generic paint programs or (for drawings) some
widely available drawing editor, and that is suitable for input
to text formatters or for automatic translation to a variety of
formats suitable for input to text formatters. A copy made in an
otherwise Transparent file format in which its markup, or absence
of markup, has been arranged to thwart or discourage subsequent
modification by readers is not Transparent. An image format
is not Transparent if used for any substantial amount of text.
A copy that is not "Transparent" is called "Opaque".
</para>
<para>
Examples of suitable formats for Transparent copies include
plain ASCII without markup, Texinfo input format, LaTeX
input format, SGML or XML using a publicly available DTD, and
standard-conforming simple HTML, PostScript or PDF designed for
human modification. Examples of transparent image formats include
PNG, XCF, and JPG. Opaque formats include proprietary formats
that can be read and edited only by proprietary word processors,
SGML or XML for which the DTD and/or processing tools are not
generally available, and the machine-generated HTML, PostScript
or PDF produced by some word processors for output purposes only.
</para>
<para>
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the
material this License requires to appear in the title page.
For works in formats, which do not have any title page as such,
"Title Page" means the text near the most prominent appearance of
the work's title, preceding the beginning of the body of the text.
</para>
<para>
A section "Entitled XYZ" means a named subunit of the Document
in which its title either is precisely XYZ or contains XYZ
in parentheses following text that translates XYZ in another
language. (Here XYZ stands for a specific section name mentioned
below, such as "Acknowledgements", "Dedications", "Endorsements",
or "History".) To "Preserve the Title" of such a section,
when you modify the Document, means that it remains a section
"Entitled XYZ", according to this definition.
</para>
<para>
The Document may include Warranty Disclaimers next to the notice
which states that this License applies to the Document. These
Warranty Disclaimers are considered to be included by reference
in this License, but only as regards disclaiming warranties:
any other implication that these Warranty Disclaimers may have
is void and has no effect on the meaning of this License.
</para>
<para> 2. VERBATIM COPYING </para>
<para>
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License
applies to the Document are reproduced in all copies, and that
you add no other conditions whatsoever to those of this License.
You may not use technical measures to obstruct or control the
reading or further copying of the copies you make or distribute.
However, you may accept compensation in exchange for copies.
If you distribute a large enough number of copies you must also
follow the conditions in section 3.
</para>
<para>
You may also lend copies, under the same conditions stated above,
and you may publicly display copies.
</para>
<para> 3. COPYING IN QUANTITY </para>
<para>
If you publish printed copies (or copies in media that commonly
have printed covers) of the Document, numbering more than 100,
and the Document's license notice requires Cover Texts, you must
enclose the copies in covers that carry, clearly and legibly,
all these Cover Texts: Front-Cover Texts on the front cover,
and Back-Cover Texts on the back cover. Both covers must also
clearly and legibly identify you as the publisher of these copies.
The front cover must present the full title with all words of the
title equally prominent and visible. You may add other material
on the covers in addition. Copying with changes limited to the
covers, as long as they preserve the title of the Document and
satisfy these conditions, can be treated as verbatim copying in
other respects.
</para>
<para>
If the required texts for either cover are too voluminous to
fit legibly, you should put the first ones listed (as many as
fit reasonably) on the actual cover, and continue the rest onto
adjacent pages.
</para>
<para>
If you publish or distribute Opaque copies of the
Document numbering more than 100, you must either include a
machine-readable Transparent copy along with each Opaque copy,
or state in or with each Opaque copy a computer-network location
from which the general network-using public has access to download
using public-standard network protocols a complete Transparent
copy of the Document, free of added material. If you use the
latter option, you must take reasonably prudent steps, when
you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the
stated location until at least one year after the last time you
distribute an Opaque copy (directly or through your agents or
retailers) of that edition to the public.
</para>
<para>
It is requested, but not required, that you contact the authors
of the Document well before redistributing any large number of
copies, to give them a chance to provide you with an updated
version of the Document.
</para>
<para> 4. MODIFICATIONS </para>
<para>
You may copy and distribute a Modified Version of the Document
under the conditions of sections 2 and 3 above, provided that
you release the Modified Version under precisely this License,
with the Modified Version filling the role of the Document,
thus licensing distribution and modification of the Modified
Version to whoever possesses a copy of it. In addition, you
must do these things in the Modified Version:
</para>
<para>
A. Use in the Title Page (and on the covers, if any) a title
distinct from that of the Document, and from those of previous
versions (which should, if there were any, be listed in the
History section of the Document). You may use the same title
as a previous version if the original publisher of that version
gives permission.
</para>
<para>
B. List on the Title Page, as authors, one or more persons or
entities responsible for authorship of the modifications in the
Modified Version, together with at least five of the principal
authors of the Document (all of its principal authors, if it has
fewer than five), unless they release you from this requirement.
</para>
<para>
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
</para>
<para>
D. Preserve all the copyright notices of the Document.
</para>
<para>
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
</para>
<para>
F. Include, immediately after the copyright notices, a license
notice giving the public permission to use the Modified Version
under the terms of this License, in the form shown in the
Addendum below.
</para>
<para>
G. Preserve in that license notice the full lists of Invariant
Sections and required Cover Texts given in the Document's
license notice.
</para>
<para>
H. Include an unaltered copy of this License.
</para>
<para>
I. Preserve the section Entitled "History", Preserve its Title,
and add to it an item stating at least the title, year, new
authors, and publisher of the Modified Version as given on
the Title Page. If there is no section Entitled "History"
in the Document, create one stating the title, year, authors,
and publisher of the Document as given on its Title Page, then
add an item describing the Modified Version as stated in the
previous sentence.
</para>
<para>
J. Preserve the network location, if any, given in the Document
for public access to a Transparent copy of the Document and
likewise the network locations given in the Document for previous
versions it was based on. These may be placed in the "History"
section. You may omit a network location for a work that was
published at least four years before the Document itself, or
if the original publisher of the version it refers to gives
permission.
</para>
<para>
K. For any section Entitled "Acknowledgements" or "Dedications",
Preserve the Title of the section, and preserve in the section all
the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
</para>
<para>
L. Preserve all the Invariant Sections of the Document, unaltered
in their text and in their titles. Section numbers or the
equivalent are not considered part of the section titles.
</para>
<para>
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
</para>
<para>
N. Do not retitle any existing section to be Entitled
"Endorsements" or to conflict in title with any Invariant Section.
</para>
<para>
O. Preserve any Warranty Disclaimers. If the Modified Version
includes new front-matter sections or appendices that qualify
as Secondary Sections and contain no material copied from the
Document, you may at your option designate some or all of these
sections as invariant. To do this, add their titles to the list
of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section Entitled "Endorsements", provided it
contains nothing but endorsements of your Modified Version by
various parties--for example, statements of peer review or that
the text has been approved by an organization as the authoritative
definition of a standard.
</para>
<para>
You may add a passage of up to five words as a Front-Cover
Text, and a passage of up to 25 words as a Back-Cover Text,
to the end of the list of Cover Texts in the Modified Version.
Only one passage of Front-Cover Text and one of Back-Cover Text
may be added by (or through arrangements made by) any one entity.
If the Document already includes a cover text for the same cover,
previously added by you or by arrangement made by the same
entity you are acting on behalf of, you may not add another;
but you may replace the old one, on explicit permission from
the previous publisher that added the old one.
</para>
<para>
The author(s) and publisher(s) of the Document do not by this
License give permission to use their names for publicity for or
to assert or imply endorsement of any Modified Version.
</para>
<para> 5. COMBINING DOCUMENTS </para>
<para>
You may combine the Document with other documents released under
this License, under the terms defined in section 4 above for
modified versions, provided that you include in the combination
all of the Invariant Sections of all of the original documents,
unmodified, and list them all as Invariant Sections of your
combined work in its license notice, and that you preserve all
their Warranty Disclaimers.
</para>
<para>
The combined work need only contain one copy of this License,
and multiple identical Invariant Sections may be replaced with
a single copy. If there are multiple Invariant Sections with
the same name but different contents, make the title of each
such section unique by adding at the end of it, in parentheses,
the name of the original author or publisher of that section if
known, or else a unique number. Make the same adjustment to the
section titles in the list of Invariant Sections in the license
notice of the combined work.
</para>
<para>
In the combination, you must combine any sections Entitled
"History" in the various original documents, forming one section
Entitled "History"; likewise combine any sections Entitled
"Acknowledgements", and any sections Entitled "Dedications".
You must delete all sections Entitled "Endorsements".
</para>
<para> 6. COLLECTIONS OF DOCUMENTS </para>
<para>
You may make a collection consisting of the Document and other
documents released under this License, and replace the individual
copies of this License in the various documents with a single
copy that is included in the collection, provided that you follow
the rules of this License for verbatim copying of each of the
documents in all other respects.
</para>
<para>
You may extract a single document from such a collection and
distribute it individually under this License, provided you
insert a copy of this License into the extracted document and
follow this License in all other respects regarding verbatim
copying of that document.
</para>
<para> 7. AGGREGATION WITH INDEPENDENT WORKS </para>
<para>
A compilation of the Document or its derivatives with other
separate and independent documents or works, in or on a volume of
a storage or distribution medium, is called an "aggregate" if the
copyright resulting from the compilation is not used to limit the
legal rights of the compilation's users beyond what the individual
works permit. When the Document is included in an aggregate,
this License does not apply to the other works in the aggregate
which are not themselves derivative works of the Document.
</para>
<para>
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one
half of the entire aggregate, the Document's Cover Texts may be
placed on covers that bracket the Document within the aggregate,
or the electronic equivalent of covers if the Document is in
electronic form. Otherwise, they must appear on printed covers
that bracket the whole aggregate.
</para>
<para> 8. TRANSLATION </para>
<para>
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of
section 4. Replacing Invariant Sections with translations
requires special permission from their copyright holders, but
you may include translations of some or all Invariant Sections
in addition to the original versions of these Invariant Sections.
You may include a translation of this License, and all the license
notices in the Document, and any Warranty Disclaimers, provided
that you also include the original English version of this License
and the original versions of those notices and disclaimers.
In case of a disagreement between the translation and the
original version of this License or a notice or disclaimer,
the original version will prevail.
</para>
<para>
If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to
Preserve its Title (section 1) will typically require changing
the actual title.
</para>
<para> 9. TERMINATION </para>
<para>
You may not copy, modify, sublicense, or distribute the Document
except as expressly provided for under this License. Any other
attempt to copy, modify, sublicense, or distribute the Document
is void and will automatically terminate your rights under
this License. However, parties who have received copies, or
rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
</para>
<para> 10. FUTURE REVISIONS OF THIS LICENSE </para>
<para>
The Free Software Foundation may publish new, revised versions of
the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version
but may differ in detail to address new problems or concerns.
See http://www.gnu.org/copyleft/.
</para>
<para>
Each version of the License is given a distinguishing version
number. If the Document specifies that a particular numbered
version of this License "or any later version" applies to it,
you have the option of following the terms and conditions either
of that specified version or of any later version that has
been published (not as a draft) by the Free Software Foundation.
If the Document does not specify a version number of this License,
you may choose any version ever published (not as a draft)
by the Free Software Foundation.
</para>
<para> ADDENDUM: How to use this License for your documents </para>
<para>
To use this License in a document you have written, include
a copy of the License in the document and put the following
copyright and license notices just after the title page:
</para>
<para>
Copyright (c) YEAR YOUR NAME. Permission is granted to copy,
distribute, and/or modify this document under the terms of the
GNU Free Documentation License, Version 1.2 or any later version
published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy
of the license is included in the section entitled "GNU Free
Documentation License".
</para>
<para>
If you have Invariant Sections, Front-Cover Texts and Back-Cover
Texts, replace the "with...Texts." line with this: with the
Invariant Sections being LIST THEIR TITLES, with the Front-Cover
Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit
the situation.
</para>
<para>
If your document contains nontrivial examples of program code,
we recommend releasing these examples in parallel under your
choice of free software license, such as the GNU General Public
License, to permit their use in free software.
</para>
</appendix>
</article>
<!-- Keep this comment at the end of the file Local variables:
mode: sgml sgml-omittag:t sgml-shorttag:t sgml-namecase-general:t
sgml-general-insert-case:lower sgml-minimize-attributes:nil
sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:nil
sgml-parent-document:nil sgml-exposed-tags:nil sgml-local-catalogs:nil
sgml-local-ecat-files:nil End: -->