running real application on simulated network on omnet++ - omnet++

I was trying to run the showcase given by inet4.4 framework using omnet++ version 6.0.1 and was not able to run it - in showcases -> emulation -> videostreaming.
it is a case of Using Real Applications in a Simulated Network.
if there is someone who succeeded to run it in any version of inet and omnet++, I would like to ask how you did it and which versions did you use , and if
an error like the following came up how can I fix it :
<!> Error: Cannot assign parameter 'config': xml(): Parse error: Syntax error at string-content:1 -- at /home/ubuntu/Downloads/omnetpp-6.0.1/samples/inet4.4/showcases/emulation/videostreaming/omnetpp.ini:21 -- in module (inet::Ipv4NatTable) VideoStreamingShowcase.router.ipv4.natTable (id=200), during network setup

Its working for me in Omnet6 with Inet 4.3.
*.router.ipv4.natTable.config = xml("<config> \
<entry type='prerouting' \
packetDataFilter='*Ipv4Header and destAddress=~192.168.2.99' \
srcAddress='192.168.3.99' destAddress='192.168.3.20'/> \
</config>")
Replace this in your ini file and it should run fine

Related

omnet++ 5.4.1 shows xml parser error in inet examples

i try to run Inet framework examples in omnet++ but i get this error and dont know how to solve it
Error: Cannot evaluate parameter 'config': Cannot parse XML
string: XML input is not supported: this copy of OMNeT++ was compiled
without an XML parser (libXML or Expat) -- in module
(inet::Ipv4NetworkConfigurator) Net80211.configurator (id=3), during
network setup
I too got the same error but I found a solution which might be useful. OMNeT++ IDE is not running on the same environment. Just choose the project file and right click "Run As > OMNeT++ simulation", it should run without an error.

Simulte error: LteChannelControl not found

I am trying to run simulte with omnet 5.0 and inet 3.4. I build in with terminal.
When i try to run tutorial simulation via
Right-clicking on simulations/tutorial/omnetpp.ini and "Run as Omnet simulation", it gives me following error
Error in module (omnetpp::cModule) SingleCell (id=1) during network setup:Class "LteChannelControl" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module/Define_Channel().
Now I have also checked LteChannelControl class .cc and it infact has the Define_Module(LteChannelControl) inside.
If you have any idea how to resolve this, it will be eppreciated.
Thanks
the problem was solved by running simulations via terminal. It appears that using Omnet gui for simulte gives alot of problems. Simulte wants to be used via terminal or cmd instead.

Class "Veins::ObstacleControl" not found

I have followed step by step the tutorial to install Veins, but when I tried running the example scenario (final step) I ended up with the above error.
The whole error was:
Error in module (cModule) RSUExampleScenario (id=1) during network
setup: Class "Veins::ObstacleControl" not found -- perhaps its code
was not linked in, or the class wasn't registered with
Register_Class(), or in the case of modules and channels, with
Define_Module()/Define_Channel().
TRAPPING on the exception above, due to a debug-on-errors=true
configuration option. Is your debugger ready?
Simulation terminated with exit code: -2147483645 Working directory:
C:/Users/user/src/veins-4.3/examples/veins Command line:
../../../omnetpp-4.6/bin/opp_run.exe -r 0 -n .;../../src/veins
--tkenv-image-path=../../images -l ../../src/veins omnetpp.ini
I don't think I have missed a step during the tutorial as I have tried it two times. I did not make any change in anything, I've just strictly followed the tutorial like a robot, so I cannot provide an MCVE with more details than the tutorial.
Here is what I'm using:
- Windows 7 Pro 64 bits
- SUMO 0.25.0 64 bits
All other steps of the tutorial successfully worked until the final step.
I assume this error occurs when running Veins via the OMNeT++ IDE. Or, if you have compiled it with GCC (The error does not happen if you use CLANG)
There are two ways to bypass this error:
Use the .run as executable from your examples directory, which calls veins/run and includes all the required libraries:
Use opp_run as executable and set dynamic libraries to the directory where libveins.so is located (usually src/veins)
PS: to answer #ChristopSommer questions: Veins::ObstacleControl appears in opp_run -l src/veins -h classes
This could be a solution too, but I never tested it: Compiler flags in Eclipse

Network setup and class "Veins::ObstacleControl" not found

I will be grateful if you help me to figure out my problems with veins:
I successfully installed veins 4a2 and sumo 0.21.0 and Omnet 4.4 , the simulation example works fine.
Next, I imported Crypto++ 5.6.3 in the workspace as a new project under C/C++ → Existing Code as Makefile Project. Then I linked it to veins as follow:
in Project References I selected the Crypto++
in Makemake options, I select Link → and write Crypto++
I include in my code #include< rsa.h> etc… , it is recognized and there is no syntax errors, but when I run the simulation (omnet.ini), opp_run.exe crash.
The system is Windows 10 and the error is :
<!> Error in module (cCompoundModule) RSUExampleScenario (id=1) during network setup: Class "Veins::ObstacleControl" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel().
TRAPPING on the exception above, due to a debug-on-errors=true configuration option. Is your debugger ready?
Simulation terminated with exit code: -2147483645
Working directory: C:/Simulateur/veins-4a2/veins-veins-4a2/examples/veins
Command line: c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/bin/opp_run.exe -r 0 -n .;../../src/veins --tkenv-image-path=../../images omnetpp.ini
Environment variables:
OMNETPP_ROOT=c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4
PATH=;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\msys\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\mingw\bin;c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/ide/jre/bin/client;c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/ide/jre/bin;c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/ide/jre/lib/i386;.;C:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\msys\local\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\mingw\bin;C:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\msys\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\bin;c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\AMD\ATI.ACE\Core-Static;c:\Windows\system32\config\systemprofile\.dnx\bin;c:\Program Files\Microsoft DNX\Dnvm\;c:\Program Files\Microsoft SQL Server\120\Tools\Binn\;c:\Program Files (x86)\Skype\Phone\;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4;
OMNETPP_IMAGE_PATH=c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\images
Question: How to link another C++ library, like Crypto++, to my veins project?
Veins generates a dynamic library of its simulation modules. When using opp_run you will need to tell it to load this library. Otherwise the simulation will not be able to instantiate any of Veins’ modules.
Try doing the Veins tutorial to see what command line parameters OMNeT++ uses to launch the simulation.

How to build mpich2 with sctp network module in linux?

What configure options a should use to compile mpich2 (ver 1.1.1p1 or 1.2.1p1) with sctp ?
In my try there is a error when linking cpi.c (small example).
/home/op02/mpiopt/sctp/lib/libmpich.a(ch3u_rma_sync.o)(.text+0x20a7): In functio
n `MPIDI_Win_post':
: undefined reference to `PMPI_Group_translate_ranks'
/home/op02/mpiopt/sctp/lib/libmpich.a(ch3u_rma_sync.o)(.text+0x21bd): In functio
n `MPIDI_Win_post':
: undefined reference to `PMPI_Group_free'
/home/op02/mpiopt/sctp/lib/libmpich.a(ch3u_rma_sync.o)(.text+0x25c4): In functio
n `MPIDI_Win_complete':
: undefined reference to `PMPI_Group_translate_ranks'
....
My options was
../mpich2-1.1.1p1/configure --enable-fast=O1 \
--host=x86_64-unknown-linux-gnu \
--target=x86_64-secret-linux-gnu \
--with-device=ch3:sctp --with-pm=hydra \
--with-cross=x8664secret.cross --disable-f77 --disable-f90 \
>conf.log 2>&1
with x8664secret.cross being an output of getcross.c program. Host, target, and this file are here to force a cross-compilation. (it is a requirement for this build)
Is sctp in mpich2 in active state and can it be compiled?
Does sctp network module support cross-building?
Try 1.3.1 instead. I see that Brad Penoff committed a couple of small changes to the build system since 1.2.1p1 was released, so it may be in better shape now. Alternatively, try using (the rather old) MPICH2 1.0.8, where I believe things were still working.
If the cross-compile step is what's really causing the problem and you still need to solve this problem, you can get more interactive support from mpich-discuss#lists.anl.gov. We can dig in over there instead.

Resources