Hello everyone,
If you are looking for a complete installation reference for omnet++ and Castalia installation, then you have landed up to absolutely correct place. The procedure is adumbrated below as follows:-
Step I: Install the prerequisites packages
If you are looking for a complete installation reference for omnet++ and Castalia installation, then you have landed up to absolutely correct place. The procedure is adumbrated below as follows:-
Step I: Install the prerequisites packages
Enable universe repository by executing command:
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu (lsb_release -sc) universe"
Then, execute the following commands to install prerequisite packages:
$ sudo apt-get install build-essential gcc g++ bison flex perl \tcl-dev tk-dev blt libxml2-dev zlib1g-dev openjdk-6-jre \doxygen graphviz openmpi-bin libopenmpi-dev libpcap-dev
$ sudo apt-get update
$ sudo apt-get install build-essential gcc g++ bison flex perl \tcl-dev tk-dev blt libxml2-dev zlib1g-dev openjdk-6-jre \doxygen graphviz openmpi-bin libopenmpi-dev libpcap-dev
$ sudo apt-get update
$ sudo apt-get install build-essential gcc g++ bison flex perl \tcl-dev tk-dev blt libxml2-dev zlib1g-dev openjdk-6-jre \doxygen graphviz openmpi-bin libopenmpi-dev libpcap-dev
Step II: Download OMNeT++ source code
You can download omnetpp from here:
After downloading, extract the package by executing:
$ tar zxvf omnetpp-4.2.2-src.tgz
$ sudo apt-get install bison byacc (or use synaptic package manager for installing these)
$ sudo apt-get install tcl8.4 tk8.4 tcl8.4-dev tk8.4-dev (Or use synaptic package manager for installing these)
$ sudo apt-get install bison byacc (or use synaptic package manager for installing these)
$ sudo apt-get install tcl8.4 tk8.4 tcl8.4-dev tk8.4-dev (Or use synaptic package manager for installing these)
Step III: Compile OMNeT++
First setup the environment variables:
$ cd omnetpp-4.2.2
$ . setenv
$ sudo apt-get install zlib1g-dev
$ sudo apt-get install libgcrypt11-dev
$ sudo apt-get install zlib1g-dev
$ sudo apt-get install libgcrypt11-dev
For path inclusion execute
$ gedit ~/.bashrc
Add the following line at the end of the file, then save it:
export PATH=$PATH:$HOME/omnetpp-4.6/bin
export PATH=$PATH:$HOME/omnetpp-4.6/lib
export TCL_LIBRARY=/usr/share/tcltk/tcl8.4
You need to close and re-open the terminal for the changes to take effect
Then run configure:
$ ./configure
Finally, compile the simulator:
$ make
After it's done compiling, you should see the following:
Step IV: Testing the Installation
$ cd samples/dyna
$ ./dyna
After clicking through some options, you should see something like:
Exit the demo, then start the OMNeT++ 4 IDE:
$ omnetpp
Step V: Install the INET Framework-Castalia
Download wvsnmodel-v4.tgz from http://cpham.perso.univ-pau.fr/WSN-MODEL/wvsn.html
place it in omnetpp-4.2.2 directory
place it in omnetpp-4.2.2 directory
Automatic Installation Procedure
Open install.bash and copy the content in any editor (notepad, gedit, wordpad, etc).
In line 21, add - make clean->save as install.bash
In line 21, add - make clean->save as install.bash
Then, execute the following commands:
$ chmod 777 install.bash
$ ./install.bash
[Note:- Don't press 'yes' for Castalia Installation]
Castalia-3.2 Installation
Download Castalia-3.2 from here http://castalia.npc.nicta.com.au/ .
Place it in home directory
$ tar xvzf Castalia-3.2.tar.gz
$ cd Castalia-3.2
$ ./makemake
$ make
SDL-LIBRARY Installation
Download SDL from here: http://www.libsdl.org/download-2.0.php
Place it in home directory and execute these commands:
$ sudo apt-get install build-essential xorg-dev libudev-dev libts-dev libgl1-mesa-dev libglu1-mesa-dev libasound2-dev libpulse-dev libopenal-dev libogg-dev libvorbis-dev libaudiofile-dev libpng12-dev libfreetype6-dev libusb-dev libdbus-1-dev zlib1g-dev libdirectfb-dev
/*** Important Step *****/
$ tar zxvf SDL2-2.0.3.tar.gz
$ cd SDL2-2.0.3/
$ ./configure
$ Make
$ sudo make install
Running the Sample Model:
$ ./install.bash
$ cd vidmodel/wvsn-model-omnetpp-v4/
$ cp coverage-60.ned omnetpp.ini out/gcc-debug/
$ cd out/gcc-debug/
$ ./wvsn-model-omnetpp-v4
The appearance of these two windows will confirm correct installation of Castalia.
All the Best!
[Note:- Don't press 'yes' for Castalia Installation]
Castalia-3.2 Installation
Download Castalia-3.2 from here http://castalia.npc.nicta.com.au/ .
Place it in home directory
$ tar xvzf Castalia-3.2.tar.gz
$ cd Castalia-3.2
$ ./makemake
$ make
SDL-LIBRARY Installation
Download SDL from here: http://www.libsdl.org/download-2.0.php
Place it in home directory and execute these commands:
$ sudo apt-get install build-essential xorg-dev libudev-dev libts-dev libgl1-mesa-dev libglu1-mesa-dev libasound2-dev libpulse-dev libopenal-dev libogg-dev libvorbis-dev libaudiofile-dev libpng12-dev libfreetype6-dev libusb-dev libdbus-1-dev zlib1g-dev libdirectfb-dev
/*** Important Step *****/
$ tar zxvf SDL2-2.0.3.tar.gz
$ cd SDL2-2.0.3/
$ ./configure
$ Make
$ sudo make install
Running the Sample Model:
$ ./install.bash
$ cd vidmodel/wvsn-model-omnetpp-v4/
$ cp coverage-60.ned omnetpp.ini out/gcc-debug/
$ cd out/gcc-debug/
$ ./wvsn-model-omnetpp-v4
The appearance of these two windows will confirm correct installation of Castalia.
All the Best!
For any doubt please leave your comment below.
Note: Try to use Ubuntu12.04 for this installation of Omnet++ and Castalia
This work is equally contributed by Author1
For further query please contact Author1 & Author2.
Note: Try to use Ubuntu12.04 for this installation of Omnet++ and Castalia
This work is equally contributed by Author1
For further query please contact Author1 & Author2.



