CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

3. Installation

Prerequisite: Make sure that the kernel is compiled with IEEE1394 built-in support. This is critical!

You can add support for the IEEE1394 devices by compiling the kernel again. Don't panic! Here are the steps to compile the kernel:

Go to the directory where your kernel source code is present. Normally it is in /usr/src. We suggest that you download a fresh copy of the kernel source code (2.6.10) from www.kernel.org.

Thus, cd /usr/src/kernel-2.6.10 (kernel-2.6.10 is the name of the source code directory. It can vary from system to system.)

  1. make menuconfig

  2. The menu will come up. Select Device Drivers

  3. The Device Drivers menu will come up. Select IEEE1394 (Firewire) Support

  4. Mark the following as <M> in the menu that is shown:

    1. OHCI-1394 support

    2. OHCI-1394 Video Support

    3. OHCI-1394 DVI/O Support

    4. RAW IEEE1394 I/O Support

  5. Press ESC to come out of the menu

  6. Save the configuration

Install libraw1394-1.2.0

  1. su root

  2. tar -xvzf libraw1394-1.2.0.tar.gz

  3. cd libraw1394-1.2.0

  4. ./configure

  5. make

  6. make install

Install libdc1394-1.1.0

  1. su root (if you haven't already)

  2. tar -xvzf libdc1394-1.1.0.tar.gz

  3. cd libdc1394-1.1.0

  4. ./configure

  5. cd libdc1394

  6. make

  7. make install

Install the modules

  1. modprobe ohci1394

  2. modprobe video 1394

  3. modprobe ieee1394

  4. modprobe raw1394

  5. lsmod to view that all the modules (ieee1394, raw1394, ohci1394 and video1394) are now installed.

NoteNote on dependencies:
 

The modules have some dependencies:

  • ohci1394 to video1394

  • ieee1394 to video1394, ohci1394, and raw1394

So if you are installing modules with insmod, video1394 and raw1394 have to be installed first, followed by ohci1394 and ieee1394.

Create proper 1394 devices

  1. cd /dev

  2. mknod raw1394 c 171 0

  3. chmod 666 /dev/raw1394

  4. mkdir video1394

  5. cd video1394

  6. mknod 0 c 171 16

  7. mknod 1 c 171 17

  8. chmod 666 /dev/video1394/*

NoteNote on automating module start-up:
 

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!

Set user paths

  1. su user

  2. Check for the LD_LIBRARY_PATH. It should contain /usr/local/lib. This is necessary to run the applications with the help of the shared libdc1394_cotrol.so.13 object file.

NoteNote on setting path:
 

You can also set the path by adding /usr/local/lib in /etc/ld.so.conf.

This completes the installation phase.

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 testlibraw:

$ testlibraw

This tests for the presence of the host card, camera and other related parameters. Below is a typical output from testlibraw:


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

The libdc1394-1.1.0 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 examples folder of the tar file. To compile and execute the programs:

cd libdc1394-1.1.0/examples

make

You can get programs exclusively written for the Point Grey cameras at http://www.ptgrey.com/support/kb/data/grabdma.tgz.

Fortunately, we have an open source graphical application developed for the IEEE1394 cameras, known as Coriander that provides a nice Graphical User Interface for libdc1394 to help the user work with the camera more efficiently. Later we will discuss how Coriander helped us in debugging. Next, we briefly explain how to install Coriander.

Installation of Coriander

  1. Make sure that you have libdc1394 and the Gnome libraries (Coriander uses gnome.h) installed on your Linux machine. For more details regarding the requirements, look into the user manual provided by Coriander: http://damien.douxchamps.net/ieee1394/coriander/manual.php.

  2. Download the following tar file from sourceforge.net: coriander-1.0.1.tar.gz, then proceed as shown below:

    1. su root

    2. tar -xvzf coriander-1.0.1.tar.gz

    3. cd coriander-1.0.1

    4. ./configure

    5. cd src

    6. make

    7. make install

  3. Run Coriander as follows:
    
cd coriander-1.0.1/coriander-1.0.1/src
    ./coriander
    

    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.