Tuesday, December 25, 2012

DTN2 on the raspberry pi

What is DTN2

DTN2 is an implmentation of the Bundle Protocol (RFC5050) which describes communication when disruption is the norm and not the exception. I won't go into a whole lot of detail but here is a short YouTube video which provides the basic idea.


Download Source

First, create a directory for everything and called it DTN

> mkdir DTN
> cd DTN

Next, get the source code for DTN and Oasys

> wget http://sourceforge.net/projects/dtn/files/DTN2/dtn-2.9.0/dtn-2.9.0.tgz
> wget http://sourceforge.net/projects/dtn/files/oasys/oasys-1.6.0/oasys-1.6.0.tgz

Next, unzip this two

> gunzip -c oasys-1.6.0.tgz | tar xvf -
> gunzip -c dtn-2.9.0.tgz | tar xvf -

Install Oasys

First, install some pre-requisites. On my system I had to install the following additional pre-requisites. The list of pre-requisites could differ on each system for take this as a guide. If you are missing a pre-requisite, then the configure step will highlight it. 

sudo apt-get install tcl tcl-dev libdb-dev libxerces-c2-dev libxerces-c28 libxerces-c3.1 libxerces2-java tcl-tclreadline

Now configure Oasys

>cd oasys-1.6.0
> sh configure

If there are any missing libraries, then this is the step at which you will see them. Install them one by one until the configure is happy (ie. you should see no errors)

Next compile and install
> make
> sudo make install

Install DTN

Now, go to your dtn-2.9.0 directory and issue the following commands:

> cd dtn-2.9.0
> sh configure -C
> make
> make install

Similarly, the configure step will tell you if anything is missing. Install and missing dependencies until it is happy (ie. no errors).

If everything went OK, then you should see the following applications installed under /usr/bin

pi@raspberrypi /usr/bin $ ls -l | grep dtn
-rwxr-xr-x 1 root root       81255 Dec 25 00:51 dtncat
-rwxr-xr-x 1 root root       70268 Dec 25 00:51 dtncp
-rwxr-xr-x 1 root root       71767 Dec 25 00:51 dtncpd
-rwxr-xr-x 1 root root    20346777 Dec 25 00:51 dtnd
-rwxr-xr-x 1 root root        3368 Dec 25 00:51 dtnd-control
-rwxr-xr-x 1 root root        7567 Dec 25 00:51 dtnhttpproxy
-rwxr-xr-x 1 root root       79028 Dec 25 00:51 dtnpeek
-rwxr-xr-x 1 root root      133488 Dec 25 00:51 dtnperf-client
-rwxr-xr-x 1 root root       83297 Dec 25 00:51 dtnperf-server
-rwxr-xr-x 1 root root       72117 Dec 25 00:51 dtnping
-rwxr-xr-x 1 root root       90454 Dec 25 00:51 dtnpublish
-rwxr-xr-x 1 root root       81048 Dec 25 00:51 dtnrecv
-rwxr-xr-x 1 root root      126657 Dec 25 00:51 dtnsend
-rwxr-xr-x 1 root root       72531 Dec 25 00:51 dtntraceroute
-rwxr-xr-x 1 root root      631425 Dec 25 00:51 dtntunnel




4 comments:

  1. I'm trying to install DTN2 on a Raspberry Pi but I'm not being successful. When I run the "sh configure" command on DTN folder, in some lines appear permission denied. Which OS did you use? What could be the problem? Thanks in advance

    ReplyDelete
    Replies
    1. Have you tried running chmod on your directory? What are the errors?

      Delete