666 lines
11 KiB
HTML
666 lines
11 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Troubleshooting</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="The Webcam HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Framegrabbing Applications"
|
|
HREF="framegrabbers.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Gnu Free Documentation License"
|
|
HREF="appendix.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>The Webcam HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="framegrabbers.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="appendix.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="TROUBLESHOOTING"
|
|
></A
|
|
>5. Troubleshooting</H1
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="IDCHIP"
|
|
></A
|
|
>5.1. 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?</H2
|
|
><P
|
|
>Use <B
|
|
CLASS="COMMAND"
|
|
>lsusb</B
|
|
>; it can give you an idea of what other USB devices are available on your system, too:</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="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</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>The numbers after 'ID' are the Vendor and Product numbers, respectively. They can then be looked up in <A
|
|
HREF="http://www.linux-usb.org/usb.ids"
|
|
TARGET="_top"
|
|
>the Linux USB ID catalog</A
|
|
>.</P
|
|
><P
|
|
>If <B
|
|
CLASS="COMMAND"
|
|
>lsusb</B
|
|
> is not available to you, and you have support for <TT
|
|
CLASS="FILENAME"
|
|
>/proc</TT
|
|
> filesystem support and USB-filesystem
|
|
support, issue the following at the command line: </P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> $ cat /proc/bus/usb/devices</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>You should receive output including (but not necessarily limited
|
|
to) the following:</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="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</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
> The line beginning <SPAN
|
|
CLASS="QUOTE"
|
|
>"T:"</SPAN
|
|
> is the USB bus the
|
|
device is attached to.
|
|
|
|
The <SPAN
|
|
CLASS="QUOTE"
|
|
>"P:"</SPAN
|
|
> indicates (obviously) the vendor and product ID,
|
|
which are catalogued at the <A
|
|
HREF="http://www.linux-usb.org"
|
|
TARGET="_top"
|
|
>linux
|
|
USB Project homepage</A
|
|
>. </P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="NODEV"
|
|
></A
|
|
>5.2. Help, I can't find the camera device in
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/dev</TT
|
|
>!</H2
|
|
><P
|
|
> Assuming your connection type
|
|
is supported, and your camera is working, see <A
|
|
HREF="dev-intro.html#DEV-MANUAL"
|
|
>Section 3.1</A
|
|
>.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="ACCESS"
|
|
></A
|
|
>5.3. Help, I can see the camera device (both in person and as a device node in <TT
|
|
CLASS="FILENAME"
|
|
>/dev</TT
|
|
>), but I
|
|
can't access it!</H2
|
|
><P
|
|
> See <A
|
|
HREF="dev-intro.html#PERMISSIONS"
|
|
>Section 3.2</A
|
|
>.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="SRC"
|
|
></A
|
|
>5.4. Help, my camera has a driver that is source-only,
|
|
i.e., has to be built by me! Where do I start?</H2
|
|
><P
|
|
> 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.)</P
|
|
><P
|
|
>Download the driver source (in this example named
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>src.tar.gz</TT
|
|
>) and uncompress/untar it: </P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> $ tar -xvzf src.tar.gz</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>Then, change to the directory of your kernel source:</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> # cd /usr/src/linux</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>Make the necessary source files:</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> # make oldconfig # make dep</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>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
|
|
<B
|
|
CLASS="COMMAND"
|
|
>modprobe</B
|
|
>.
|
|
|
|
If you have any problems, see <A
|
|
HREF="troubleshooting.html#MOREHELP"
|
|
>Section 5.7</A
|
|
>. </P
|
|
><P
|
|
></P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="DEBSRC"
|
|
></A
|
|
>5.5. I am using Debian GNU/Linux. Is there an easier way to go through all this kernel compiling stuff and building of source modules?</H2
|
|
><P
|
|
>It is far simpler, in your author's humble opinion, to use the automated <TT
|
|
CLASS="FILENAME"
|
|
>kernel-package</TT
|
|
> utility.
|
|
|
|
First, install it and the dependencies using <B
|
|
CLASS="COMMAND"
|
|
>apt-get</B
|
|
>. Next,
|
|
install the kernel source that you want (e.g., <B
|
|
CLASS="COMMAND"
|
|
>apt-get install
|
|
kernel-source-2.X.X</B
|
|
>). Untar the bzip2'd kernel source with <B
|
|
CLASS="COMMAND"
|
|
>tar
|
|
-xvjf</B
|
|
> and then make a symbolic link called <TT
|
|
CLASS="FILENAME"
|
|
>linux</TT
|
|
> that points to the new source: </P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> # ln -s /usr/src/kernel-source-2.X.X /usr/src/linux
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>Then <B
|
|
CLASS="COMMAND"
|
|
>cd /usr/src/linux</B
|
|
> and clean: <B
|
|
CLASS="COMMAND"
|
|
>make-kpkg clean</B
|
|
>, followed
|
|
by <B
|
|
CLASS="COMMAND"
|
|
>make menuconfig</B
|
|
> or <B
|
|
CLASS="COMMAND"
|
|
>make xconfig</B
|
|
> as you would if compiling
|
|
a new kernel. Next, you can use <B
|
|
CLASS="COMMAND"
|
|
>make-kpkg kernel_image</B
|
|
> and then install your new
|
|
kernel package that has been deposited in <TT
|
|
CLASS="FILENAME"
|
|
>/usr/src</TT
|
|
> with <B
|
|
CLASS="COMMAND"
|
|
>dpkg -i ../kernel-image-2.X.X</B
|
|
>. Next, you can get the pre-packaged
|
|
source driver using <TT
|
|
CLASS="FILENAME"
|
|
>apt</TT
|
|
>. So, in the case of the Quickcam Express, the package is <TT
|
|
CLASS="FILENAME"
|
|
>qc-usb-source</TT
|
|
>:</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> # apt-get install qc-usb-source</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>...and untar the archive:</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> # tar -xvzf qc-usb-modules.tar.gz</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>This will uncompress the source into the <TT
|
|
CLASS="FILENAME"
|
|
>/usr/src/modules</TT
|
|
> directory. The final step, while still in <TT
|
|
CLASS="FILENAME"
|
|
>/usr/src/linux</TT
|
|
> is to make the modules with kernel-package:</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> # make-kpkg modules_image</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>Install the new package, in <TT
|
|
CLASS="FILENAME"
|
|
>/usr/src/</TT
|
|
>, called <TT
|
|
CLASS="FILENAME"
|
|
>qc-usb-modules-[arch].deb</TT
|
|
> using <B
|
|
CLASS="COMMAND"
|
|
> dpkg -i</B
|
|
>. Finally, load the module:</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> # modprobe quickcam</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>Check the documentation in /usr/share/doc/kernel-package for any problems.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="PATCH"
|
|
></A
|
|
>5.6. Help, my camera is supported by a driver that
|
|
has to be patched into my kernel! What do I do?</H2
|
|
><P
|
|
> See <A
|
|
HREF="http://tldp.org/HOWTO/Kernel-HOWTO/patching_the_kernel.html"
|
|
TARGET="_top"
|
|
>the
|
|
section on patching</A
|
|
> of the Kernel-HOWTO at <A
|
|
HREF="http://tldp.org"
|
|
TARGET="_top"
|
|
>The Linux Documentation Project</A
|
|
>. </P
|
|
><P
|
|
> The short and unguaranteed version of patching, by your humble
|
|
author, goes as follows: Be sure you have the same prerequisites outlined
|
|
in <A
|
|
HREF="troubleshooting.html#SRC"
|
|
>Section 5.4</A
|
|
> 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 <TT
|
|
CLASS="FILENAME"
|
|
>patch.diff</TT
|
|
>). </P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> # cd /usr/src/linux
|
|
# patch -p1 -E patch.diff</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
> You should see a confirmation that the 'hunks' were successfully
|
|
applied.
|
|
|
|
At this point, you can <B
|
|
CLASS="COMMAND"
|
|
>make menuconfig</B
|
|
> 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 <B
|
|
CLASS="COMMAND"
|
|
>man patch</B
|
|
>
|
|
and <A
|
|
HREF="troubleshooting.html#MOREHELP"
|
|
>Section 5.7</A
|
|
>. </P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="MOREHELP"
|
|
></A
|
|
>5.7. Help--as in, where can I get more of it?</H2
|
|
><P
|
|
> See the video4linux mailing list headquarters at <A
|
|
HREF="https://listman.redhat.com/mailman/listinfo/video4linux-list"
|
|
TARGET="_top"
|
|
>https://listman.redhat.com/mailman/listinfo/video4linux-list</A
|
|
>.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="V4L"
|
|
></A
|
|
>5.8. Help, I want to contribute to Video4Linux
|
|
support in Linux! Who do I get in touch with?</H2
|
|
><P
|
|
> See <A
|
|
HREF="http://www.thedirks.org/v4l2/peopleprojects.htm"
|
|
TARGET="_top"
|
|
>this page</A
|
|
>.</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="framegrabbers.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="appendix.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Framegrabbing Applications</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Gnu Free Documentation License</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |