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.




hye. can you help me. i cannot extract the castalia file. it says. "an error occur while rxtracting files. error setting owner: operation not permitted". what can i do? thanks in advance.
ReplyDeleteTry as root user.
ReplyDeleteThis comment has been removed by the author.
ReplyDeletesir/madam, now i stuck at running the sample mode. when i write "./install.bash ". the terminal said "no such file or directory". i don't know why. which one of file in SDL i need to download. thank you.
ReplyDeleteHello anish_tnty,
ReplyDeleteyou need to copy the content of install.bash from website http://cpham.perso.univ-pau.fr/WSN-MODEL/distrib/install.bash and save it as install.bash in your working directory before running ./install.bash. And, regarding SDL installation, download any zip file and install.
Hi, I have the same problem. I copied the content of install.bash and add the line 21... bur when I do:
Delete"chmod 777 install.bash" it doesn't work and I got this message :"chmod: cannot access ‘install.bash’: No such file or directory".
please help me.
Hi
ReplyDeletePlease can any one help to simulate a WiMAX network on OMNET++??
pleaase
Hello everybody,
ReplyDeleteI am new to castalia 3.2 and Omnet++ 4.2, I don't know, how can I open files on the Omnet IDE?
How to start work with ? I have Installed all but I cant open or import them on the IDE.
I would be thanking you if anyone can help me.
Thanks
Hello Basma,
ReplyDeleteTo do that first launch omnetpp IDE by typing - "omnetpp" in the Terminal.
Later, use import option given in omnetpp IDE to import files and directories of your work.
Hello Rageeni
ReplyDeletefirst thanks for answering me !!! Please if you have an experience with Castalia could you please say to me how to create a project with it? how can i open castalia and work with it correctly ??
hello Rageeni,
ReplyDeletethank you for your help. now i can run my castalia simulation. i just want to ask you about Guranteed Time slot(GTS) in castalia. does castalia 3.2 have simulation model on GTS? i look for it, but i couldn't find it. i need your help. sorry for troubling you. thanks in advance.
Error during startup: No user interface (Cmdenv, Tkenv, etc.) found.
ReplyDeleteOMNeT++ Discrete Event Simulation (C) 1992-2010 Andras Varga, OpenSim Ltd.
Version: 4.1, build: 100611-4b63c38, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer
End.
hello rageeni,
ReplyDeletecan i install castalia in windows?
Hi Anisha,
DeleteYes, You can install castalia in windows. However, you will have to setup the environment for the same; Which includes installing various software including MinG.
When i'am trying to install SDL by executing the given command it shows
ReplyDeleteE: Unable to locate package libts-dev
Now what to do and also in which directory do we have to execute the Running the Sample Mode commands.
End
Hi Vaibhav,
DeleteKindly see the added information to the blog, this will certainly solve your problem.
Also after exwcuting the last command
ReplyDelete./wvsn-model-omnetpp-v4
error No such file or directory
Well first you need to download SDL package and unzip it in same directory in which you have all files, may be home directory.
ReplyDeletehi i have a problem in castalia's intallation. is it possible for you to solve this ?
ReplyDeletehttp://8pic.ir/images/ztd5djdf556vg042pcoo.jpg
Hi Hamid
ReplyDeletewhat is problem??
When i am running the last step in the running the sample i am getting an error which says no such file or directory? What could be the possible cause for that?
ReplyDeleteHi Pranav,
DeleteThe added info. will solve your error.
Hello Rageeni,
ReplyDeleteI followed installation procedure as given above( On Ubuntu 14.04 to install Omnetpp4.6 and castalia 3.2 )
I could install successfully omnetpp 4.6, I have executed dyna, I can open omnet from command prompt with omnetpp.
Also I have followed same steps and installed castalia 3.2.
But When I tried to execute castalia from shell prompt I get following error
shailendra@shailendra-Inspiron-5558:~/Castalia-3.2$ ./CastaliaBin
OMNeT++ Discrete Event Simulation (C) 1992-2014 Andras Varga, OpenSim Ltd.
Version: 4.6, build: 141202-f785492, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer
Error during startup: Cannot open ini file `omnetpp.ini'.
End.
Also in omnet IDE i was trying to import castalia. But I am getting error like this
Exception occurred executing command line.
Cannot run program "/home/shailendra/omnet/castaliatest/castaliatest" (in directory "/home/shailendra/omnet/castaliatest/Simulations/radioTest"): error=2, No such file or directory
Requesting you to see what can be a problem...
unable to locate libts-dev .... what should i Do???
ReplyDeletehello
ReplyDeletei use the simulator Castalia to simulate leach protocol performance results in wireless sensor networks , I implement the package leach under castalia, we must now try leach:
Default configuration:
1- without activating the central node mobility (base station Sink)
2-activating mobility ...
please help me i'm blocked
thank you