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 (kernel-2.6.10 is the name of the source code directory. It can vary from system to system.)
The menu will come up. Select
The menu will
come up. Select
Mark the following as <M> in the menu that is shown:
OHCI-1394 Video Support
OHCI-1394 DVI/O Support
RAW IEEE1394 I/O Support
Press ESC to come out of the menu
Save the configuration
tar -xvzf libraw1394-1.2.0.tar.gz
su root (if you haven't already)
tar -xvzf libdc1394-1.1.0.tar.gz
Install the modules
modprobe video 1394
lsmod to view that all the modules (ieee1394, raw1394, ohci1394 and video1394) are now installed.
|Note on dependencies:|
The modules have some dependencies:
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
mknod raw1394 c 171 0
chmod 666 /dev/raw1394
mknod 0 c 171 16
mknod 1 c 171 17
chmod 666 /dev/video1394/*
|Note 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
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
|Note 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:
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:
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 aion>Coriaioation>Coration> provides a nice Graphical User
Interface for libdc1394 to help the user work with the camera more
efficiently. Later we will diapplicatiapplication> helped us for debugging. Next,
we briefly explain how to install Coriander.
Installation of Coriander
Make sure that you have libdc1394 and the Gnome
libraries (Coriander uses
gnome.hilename>) 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.
Download the following tar file from sourceforge.net:
coriander-1.0.1.tar.gz, then proceed as shown below:
tar -xvzf coriander-1.0.1.tar.gz
Run Coriander as follows:
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.