832 lines
11 KiB
HTML
832 lines
11 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Installation</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="Libdc1394 Library Support for IEEE 1394 Cameras HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Requirements"
|
|
HREF="req.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Concepts and Basic Programs "
|
|
HREF="concepts.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"
|
|
>Libdc1394 Library Support for IEEE 1394 Cameras HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="req.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="concepts.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="install"
|
|
></A
|
|
>3. Installation</H1
|
|
><P
|
|
>Prerequisite: Make sure that the kernel is compiled with IEEE1394 built-in support. This is critical!</P
|
|
><P
|
|
>You can add support for the IEEE1394 devices by compiling the kernel again. Don't panic! Here are the steps to compile the kernel:</P
|
|
><P
|
|
>Go to the directory where your kernel source code is
|
|
present. Normally it is in <TT
|
|
CLASS="filename"
|
|
>/usr/src</TT
|
|
>. We suggest that you download
|
|
a fresh copy of the kernel source code (2.6.10) from <A
|
|
HREF="http://www.kernel.org/"
|
|
TARGET="_top"
|
|
>www.kernel.org</A
|
|
>.</P
|
|
><P
|
|
>Thus, <B
|
|
CLASS="command"
|
|
>cd /usr/src/kernel-2.6.10</B
|
|
> (<TT
|
|
CLASS="filename"
|
|
>kernel-2.6.10</TT
|
|
> is the name of the source code directory. It can vary from system to system.)</P
|
|
><P
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>make menuconfig</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>The menu will come up. Select <SPAN
|
|
CLASS="guimenuitem"
|
|
>Device Drivers</SPAN
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>The <SPAN
|
|
CLASS="guimenu"
|
|
>Device Drivers</SPAN
|
|
> menu will
|
|
come up. Select <SPAN
|
|
CLASS="guimenuitem"
|
|
>IEEE1394 (Firewire) Support</SPAN
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Mark the following as <M> in the menu that is shown:</P
|
|
><P
|
|
></P
|
|
><OL
|
|
TYPE="a"
|
|
><LI
|
|
><P
|
|
>OHCI-1394 support</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>OHCI-1394 Video Support</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>OHCI-1394 DVI/O Support</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>RAW IEEE1394 I/O Support</P
|
|
></LI
|
|
></OL
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Press <B
|
|
CLASS="keycap"
|
|
>ESC</B
|
|
> to come out of the menu</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Save the configuration</P
|
|
></LI
|
|
></OL
|
|
><P
|
|
></P
|
|
><P
|
|
><B
|
|
>Install libraw1394-1.2.0</B
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>su root</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>tar -xvzf libraw1394-1.2.0.tar.gz</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>cd libraw1394-1.2.0</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>./configure</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>make</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>make install</B
|
|
></P
|
|
></LI
|
|
></OL
|
|
><P
|
|
></P
|
|
><P
|
|
><B
|
|
>Install libdc1394-1.1.0</B
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>su root</B
|
|
> (if you haven't already)</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>tar -xvzf libdc1394-1.1.0.tar.gz</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>cd libdc1394-1.1.0</B
|
|
> </P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>./configure</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>cd libdc1394</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>make</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>make install</B
|
|
></P
|
|
></LI
|
|
></OL
|
|
><P
|
|
></P
|
|
><P
|
|
><B
|
|
>Install the modules</B
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>modprobe ohci1394</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>modprobe video 1394</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>modprobe ieee1394</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>modprobe raw1394</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>lsmod</B
|
|
> to view that all the modules (ieee1394, raw1394, ohci1394 and video1394) are now installed.</P
|
|
></LI
|
|
></OL
|
|
><DIV
|
|
CLASS="note"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="note"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/note.gif"
|
|
HSPACE="5"
|
|
ALT="Note"></TD
|
|
><TH
|
|
ALIGN="LEFT"
|
|
VALIGN="CENTER"
|
|
><B
|
|
>Note on dependencies:</B
|
|
></TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
> </TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
>The modules have some dependencies:
|
|
<P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
>ohci1394 to video1394</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>ieee1394 to video1394, ohci1394, and raw1394</P
|
|
></LI
|
|
></UL
|
|
>
|
|
So if you are installing modules with <B
|
|
CLASS="command"
|
|
>insmod</B
|
|
>, video1394 and raw1394 have to be installed first, followed by ohci1394 and ieee1394.</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><P
|
|
></P
|
|
><P
|
|
><B
|
|
>Create proper 1394 devices</B
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>cd /dev</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>mknod raw1394 c 171 0</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>chmod 666 /dev/raw1394</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>mkdir video1394</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>cd video1394</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>mknod 0 c 171 16</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>mknod 1 c 171 17</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>chmod 666 /dev/video1394/*</B
|
|
></P
|
|
></LI
|
|
></OL
|
|
><DIV
|
|
CLASS="note"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="note"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/note.gif"
|
|
HSPACE="5"
|
|
ALT="Note"></TD
|
|
><TH
|
|
ALIGN="LEFT"
|
|
VALIGN="CENTER"
|
|
><B
|
|
>Note on automating module start-up:</B
|
|
></TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
> </TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
>Every time the system is restarted, the nodes are destroyed and the modules are removed automatically. So we wrote a script to automate this installation task at start-up, to undo all the damage done during rebooting!</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><P
|
|
></P
|
|
><P
|
|
><B
|
|
>Set user paths</B
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>su user</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Check for the
|
|
<TT
|
|
CLASS="envar"
|
|
>LD_LIBRARY_PATH</TT
|
|
>. It should contain <TT
|
|
CLASS="filename"
|
|
>/usr/local/lib</TT
|
|
>. This is necessary
|
|
to run the applications with the help of the shared
|
|
<TT
|
|
CLASS="filename"
|
|
>libdc1394_cotrol.so.13</TT
|
|
> object
|
|
file.</P
|
|
></LI
|
|
></OL
|
|
><DIV
|
|
CLASS="note"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="note"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/note.gif"
|
|
HSPACE="5"
|
|
ALT="Note"></TD
|
|
><TH
|
|
ALIGN="LEFT"
|
|
VALIGN="CENTER"
|
|
><B
|
|
>Note on setting path:</B
|
|
></TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
> </TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
>You can also set the path by adding <TT
|
|
CLASS="filename"
|
|
>/usr/local/lib</TT
|
|
> in <TT
|
|
CLASS="filename"
|
|
>/etc/ld.so.conf</TT
|
|
>.</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><P
|
|
>This completes the installation phase.</P
|
|
><P
|
|
>In order to make sure the installation is correct, connect the
|
|
camera to the IEEE1394 card (assuming that the IEEE1394 card is
|
|
already installed on the system) and just run <B
|
|
CLASS="command"
|
|
>testlibraw</B
|
|
>:</P
|
|
><P
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
>$ testlibraw</B
|
|
></TT
|
|
></P
|
|
><P
|
|
>This tests for the presence of the host card, camera and other related parameters. Below is a typical output from testlibraw:</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> Successfully got handle
|
|
current generation number: 17
|
|
1 card(s) found
|
|
nodes on bus: 2, card name: ohci1394
|
|
using first card found: 2 nodes on bus, local ID is 0, IRM is 1
|
|
|
|
doing transactions with custom tag handler
|
|
trying to send read request to node 0... completed with value 0x23127bac
|
|
trying to send read request to node 1... completed with value 0x60217dac
|
|
|
|
using standard tag handler and synchronous calls
|
|
trying to read from node 0... completed with value 0x04477dac
|
|
trying to read from node 1... completed with value 0xd37380ac
|
|
|
|
testing FCP monitoring on local node
|
|
got fcp command from node 0 of 8 bytes: 01 23 45 67 89 ab cd ef
|
|
got fcp response from node 0 of 8 bytes: 01 23 45 67 89 ab cd ef
|
|
|
|
polling for leftover messages
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>The <TT
|
|
CLASS="filename"
|
|
>libdc1394-1.1.0</TT
|
|
> library comes with
|
|
some example programs which are very helpful in understanding how
|
|
the programs are to be written. There is a Makefile available in the
|
|
<TT
|
|
CLASS="filename"
|
|
>examples</TT
|
|
> folder of the tar file. To compile and execute the programs:</P
|
|
><P
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
>cd libdc1394-1.1.0/examples</B
|
|
></TT
|
|
></P
|
|
><P
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
>make</B
|
|
></TT
|
|
></P
|
|
><P
|
|
>You can get programs exclusively written for the Point Grey
|
|
cameras at <A
|
|
HREF="http://www.ptgrey.com/support/kb/data/grabdma.tgz"
|
|
TARGET="_top"
|
|
>http://www.ptgrey.com/support/kb/data/grabdma.tgz</A
|
|
>.</P
|
|
><P
|
|
>Fortunately, we have an open source graphical application
|
|
developed for the IEEE1394 cameras, known as <SPAN
|
|
CLASS="application"
|
|
><B
|
|
CLASS="command"
|
|
>Coriander</B
|
|
></SPAN
|
|
> that provides a nice Graphical User
|
|
Interface for libdc1394 to help the user work with the camera more
|
|
efficiently. Later we will discuss how <SPAN
|
|
CLASS="application"
|
|
>Coriander</SPAN
|
|
> helped us in debugging. Next,
|
|
we briefly explain how to install <SPAN
|
|
CLASS="application"
|
|
>Coriander</SPAN
|
|
>.</P
|
|
><P
|
|
></P
|
|
><P
|
|
><B
|
|
>Installation of <SPAN
|
|
CLASS="application"
|
|
>Coriander</SPAN
|
|
></B
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
>Make sure that you have libdc1394 and the Gnome
|
|
libraries (<SPAN
|
|
CLASS="application"
|
|
>Coriander</SPAN
|
|
> uses
|
|
<TT
|
|
CLASS="filename"
|
|
>gnome.h</TT
|
|
>) installed on your Linux
|
|
machine. For more details regarding the requirements, look into the user
|
|
manual provided by <SPAN
|
|
CLASS="application"
|
|
>Coriander</SPAN
|
|
>: <A
|
|
HREF="http://damien.douxchamps.net/ieee1394/coriander/manual.php"
|
|
TARGET="_top"
|
|
>http://damien.douxchamps.net/ieee1394/coriander/manual.php</A
|
|
>.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Download the following tar file from sourceforge.net:
|
|
<TT
|
|
CLASS="filename"
|
|
>coriander-1.0.1.tar.gz</TT
|
|
>, then proceed as shown below:</P
|
|
><P
|
|
></P
|
|
><OL
|
|
TYPE="a"
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>su root</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>tar -xvzf coriander-1.0.1.tar.gz</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>cd coriander-1.0.1</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>./configure</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>cd src</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>make</B
|
|
></P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><B
|
|
CLASS="command"
|
|
>make install</B
|
|
></P
|
|
></LI
|
|
></OL
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Run <SPAN
|
|
CLASS="application"
|
|
>Coriander</SPAN
|
|
> as follows:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> cd coriander-1.0.1/coriander-1.0.1/src
|
|
./coriander
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>Fortunately, the installation of the libdc1394 and related modules is simple and does not pose any major problems. Some minor problems you may face are due to mistakes such as not installing it as root or not changing the permissions of the newly created IEEE1394 devices.</P
|
|
></LI
|
|
></OL
|
|
></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="req.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="concepts.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Requirements</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Concepts and Basic Programs</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |