OMNeT++ is a discrete event based network simulation framework which provides modularity in open architecture for simulation of computer and related communication networks. OMNeT++ Modeling and Simulation is being used by many researchers and academicians in recent years. We present here basic step by step guide to use OMNeT++, its installation, configuration and building along with screenshots. The basic guideline is published at http://omnetpp.org/doc/omnetpp41/InstallGuide.pdf.
I am using OMNeT++ for my thesis in Sensor Network, visit the category Sensor Network to read more about this.
Requirements of OMNeT++ Simulator:
The supported OS are Windows XP (32x) and later versions, MAC (32x), Linux (64x) are supported. I still can’t configure OMNeT++ in 64 bit version of Windows 7. Install latest version of Java from java.com prior to OMNeT++, this shall be good when you work in Eclipse-based Simulation IDE for OMNeT++. (To confirm if your computer has already installed Java, click here)
How to install OMNeT++ ?
- Installation of OMNeT++ is rather easy. Download the source code from the official website at http://omnetpp.org for your OS, here I downloaded for 32x version of Windows 7. (I suggest you to download zipped file)
- Copy that just downloaded zip file to the directory where you want to install and work in OMNeT++. Ensure that you don’t have any spaces for the folders (better to have single word folder name like OMNeT, avoid folder names like Program Files)
- Extract the file. For the 4.1 version of OMNeT++, you shall have a new omnetpp-4.1 directory just created after extraction of the archive, inside which you can see many files and folders. (I have 24 files/folders inside the directory D:\OMNeT\omnetpp-4.1 )
- It is a better idea to read the pdf guide inside the location: OMNeT\omnetpp-4.1\doc\InstallGuide.(however this is the same online documentation files which you read on the first paragraph of this article)
How to configure & build OMNeT++?
As you must have already known that what we downloaded and installed in earlier steps was all for the source code of OMNeT++. To have an executing program, we need to configure and build OMNeT++ Simulator out of that source codes.
- Open file mingwenvlocated inside the omnetpp-4.1 folder. You shall be prompted with a welcome screen as shows below.
- Time to build the “thing” we need, enter the following commands serially, which shall build release binaries.
Take a cup of coffee, this might take a couple of minutes to complete. This also installs the sample files and debug the same. Take a look at the screenshot, ensure your installation path of OMNeT++ is okay.
- Verify the installation to test if all sample files are installed correctly, use the following commands for that.
$ cd samples/dyna
All the sample files will be run, you will see the graphical Tkenv GUI environment, as illustrated here.
- Set up an Inifile Configuration (we select “8-client computers”) when prompted in the OMNeT++/Tkenv window.
- You can safely exit from windows interfaces when you are done playing with it.
How to Start/Open/Run OMNeT++ IDE?
We have already installed Java in early steps of this article. OMNeT++ comes with an Eclipse-based Simulation IDE. Open the file mingwenv if you have closed it, then to start the IDE type
Open omnetpp executable file directly from omnetpp-4.1/ide folder. I suggest you to have a shortcut link to start IDE or you can pin it to the taskbar in Windows 7. In my case, the complete path to omnetpp IDE is D:\OMNeT\omnetpp-4.1\ide\omnetpp.exe.
Select the folder for sample files when prompted. You can see the Eclipse-based Simulating Integrated Development Environment for OMNeT++ as illustrated here. Now, time to play around various icons and others.
3 thoughts on “Basic Guide to OMNeT++ : Installation, Configuration and Building”
Thanks for the tutorial. Ekendra, I am facing a problem to initialize the tictoc example. Would you please see my problem and please mention the solution if you have some time to help me. The problem is explained via the following link as I could not attach any snapshot here and so i posted it through a page. The link of the problem is:
Tutorial was good, however my installation did not work as above. When I type ./configure I get the following:
checking build system type… i686-pc-mingw32
checking host system type… i686-pc-mingw32
configure: reading configure.user for your custom settings
checking for icc… no
checking for gcc… gcc
checking for C compiler default output file name… a.exe
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables… .exe
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for icpc… no
checking for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking for g++… g++
checking for ranlib… ranlib
checking whether g++ supports -fno-stack-protector… yes
checking whether g++ supports -Wl,–no-as-needed… yes
checking whether g++ supports -Wl,–as-needed… yes
checking for swapcontext… no
checking if shared libs need -fPIC… no
checking for dlopen with CFLAGS=”” LIBS=””… no
checking if –export-dynamic linker option is supported/needed… test
checking for flags needed to link with static libs containing simple
configure: NOTE: Use the following syntax when linking with static
configure: containing simple modules and other dynamically registered
configure: g++ … -Wl,–whole-archive -Wl,–no-whole-
checking whether linker supports -rpath… yes
checking for bison… bison -y
checking for flex… flex
checking lex output file root… lex.yy
checking lex library… none needed
checking whether yytext is a pointer… no
checking for make… make
checking for perl… perl
checking for swig… not found
checking for math with CFLAGS=”” LIBS=””… yes
checking for standard C++ lib with CFLAGS=”” LIBS=”-lstdc++”… no
checking for standard C++ lib with CFLAGS=”” LIBS=”-lcxx”… no
checking for standard C++ lib with CFLAGS=”” LIBS=”-lcxa”… no
configure: error: Standard C++ library -lstdc++_s or -lstdc++ or -lcxx
or -lcxa not found
Can you please let me know what I might be doing wrong?
Pingback: Choosing the best Simulation or Emulation Software tool for Research