Visit to a blind student's school🧑🦯🧑🦯(community medicine)
OLSR setup
1. How to Setup OLSR and DTN
Help Manual
Prepared by: KISHOJ BAJRACHARYA
June 13, 2011
Installing Ubuntu
Before installing Ubuntu, first make sure that the flash drive is bootable. For making a
flash drive a bootable device for Ubuntu, select “Startup Disk Creator” from System →
Administration → Startup Disk Creator.
Install fresh Ubuntu on the machines. Steps for installing Ubuntu are as follow:
1. Boot from the flash drive and click on ‘Install Ubuntu 10.04 LTS’.
2. Select ‘English’ and click ‘Forward’.
3. Select timezone as ‘Thailand Time’ and click ‘Forward’.
4. Choose a keyboard layout and click ‘Forward’.
5. Choose either ‘Erase and use the entire disk’ or ‘Specify partitions manually (ad-
vanced)’ and click ‘Forward’.
6. Enter the name of the user, login name, password and name of the computer and
then click ‘Forward’.
7. Ubuntu is now ready to install. Click on ‘Install’ for installing Ubuntu.
8. Installation of Ubuntu starts and wait for sometime.
9. Ubuntu will ask users to restart the computer once the installation finishes installing
Ubuntu.
1
2. Installing OLSR on Ubuntu
Before installing OLSR on Ubuntu, install all the packages suggested by Ubuntu updates.
Select “Synaptic Package Manager” from System → Administration → Synaptic Package
Manager.
• Click on ‘Reload’ followed by ‘Mark All Updates’.
• Click on ‘Apply’.
• Reboot the machine and repeat the same process until no more updates available.
• Search for the following packages and install dependencies for them either using synap-
tic or using the command ‘sudo apt-get install package name’.
1. iw
2. hostapad
3. flex
4. bison
5. autoconf
6. build-essential
7. libdb4.7-dev
8. tcl-dev
9. tclx8.4-dev
10. db4.7-util
11. libxerces-c2-dev
12. python-dev
• Download “oasys-1.4.0.tar.gz” and “dtn-2.7.0.tar.gz” from Sourceforge
http://sourceforge.net/projects/dtn/files/
• Set root privileges by typing the following command
“sudo -s -H”
• Extract the zipped file named as ‘olsrd+smon’ from oasys-1.4.0.tar.gz.
• Open the terminal and change the directory to the directory where ‘olsrd-0.6.0’ is
located.
• Type the command “make build-all”.
• Type the command “sudo make install all”.
2
3. • Type the command “less /etc/olsrd.conf” and make ‘wlan1’ as a default interface.
1. wlan0: internal interface.
2. wlan1: external interface.
• Type the command “iwconfig”.
• Type the command “sudo cp olsrd.conf /etc”
• Connect the USB for ‘wlan1’ on the machine.
• Edit to the file named “adhoc start” and set the IP in that file which serves as the
IP for that machine.
• Start the OLSR connection for each machine by typing the following command
“sudo ./adhoc start”.
• Try to ping other machines on the same wireless network. Type the command “ping
IP address”.
• Start the OLSR by using the command “sudo olsrd”.
To browse OLSR information on browser
We can also observe the OLSR information using the browsers like IE, Mozilla, Chrome,
etc. Type the URI http://localhost:8080/ on the browser to get the information of OLSR.
For telnet use the following command
$telnet hostname local address
Using SMON on wireless network
SMON-START
C (C implies change in table)
L: 192.168.1.5 (IP of the local machine)
C (C implies change in table)
L: 192.168.1.5, 192.168.1.9 (Machine with IP 192.168.1.9 joins the wireless network)
If other machines join the wireless network then we can see ‘C’ and to view the IP of the
machine(s), type ‘L’
L: 192.168.1.5, 192.168.1.9, 192.168.1.6
To exit from the SMON, type Ctrl + ]
Installing DTN on Ubuntu
Perform the following operations to install DTN on Ubuntu.
3
4. • Open the terminal for Ubuntu.
• Unzip the folder dtn+dtsolsr.
• Type the command “make clean” inside the folder “dtn-2.7.0” and “oasys”.
• Type the command “cd ../oasys-1.4.0/”
• Type the command “./build-configure.sh”
• Type the command “./configure –with-python=/usr/bin/py” (Python binding for
oasys)
• Type the command “make all” followed by “make install”
• Create a symbolic link to oass-1.4.0 in home directory cd $HOME
In -s oasys-1.4.0 oasys
• Extract DTN, compile and install using following commands
1. tar xzvf dtn-2.7.0.tar.gz
2. cd dtn-2.7.0
3. ./build-configure.sh
4. ./configure
5. make all
6. make install
• Install Python extension
1. cd $HOME/dtn-2.7.0/applib
2. make pythonapi (#this line might complain about having ‘nothing to do’ which
can be safely ignored)
3. make pythinapi install
• Edit /etc/dtn.conf. At least we need to set the ‘route local eid’ line.
• Initializw the dtnd database and test the dtnd daemon:
1. dtnd –inti-db
2. dtnd -l debug
• Provided that dtnd is still running, test the python binding in a separate console.
1. cd $HOME/dtn-2.7.0/applib/python
2. python test-swig-api.py
Python binding like “import dtnapi” can be used in Python using above
4
5. Experiments with DTN
DTN operations commands
1. dtnsend → Used for sending data.
2. dtnrecv → Used to detect the received data.
3. dincp → Used to copy.
4. dtncpd → Demon to wait for received file.
Example
• dtncp olsrd.conf destination dtn for example dtncp olsrd.conf dtn://kishoj.dtn
• dtncp . (Send the file to the current location)
• dtnsend
To send the Message “Hello World” from “dtn://kishoj.dtn” to another dtn “dtn://interlab.dtn”,
type the following commands for source and receivers.
At the source (Here, source dtn is dtn://kishoj.dtn)
• “dtnsend -s dtn://kishoj.dtn/test -d”
• “dtn://interlab.dtn/test” -t m -p “Hello World”.
At the destination (Here, destination dtn is dtn://interlab.dtn)
• “dtnrecv dtn://interlab.dtn/test”
• “Hello World” → message from the source dtn “dtn://kishoj.dtn/test”.
Pinging the DTN
For pinging the dtn, following command is used
dtnping dtn://kishoj.dtn/ping
5