omnet++ 5.4.1 shows xml parser error in inet examples - omnet++

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.

Related

running real application on simulated network on 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

Try to create new project with INET reference, got : "unexpected NAME, expecting $end" in .msg file

I created a project which contains my linklayer and simulation source code.
This project has INET as the project reference.
At build time, I got this error:
Error: syntax error, unexpected NAME, expecting $end
It comes from the message file (which contains types of messages):
import inet.common.INETDefs;
My message file is very similar to the Bmac message file (also tried with Bmac, got the same error).
Any idea please?
INET 4.X uses a new version of message compiler. But OMNeT++ by default sets in new project the old one.
In your project go to Properties, select OMNeT++ | Makemake | src folder | Options... | Custom and add the following line:
MSGC:=$(MSGC) --msg6

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.

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.

Errors in Castalia while importing in Omnet++

i had installed Omnet++ version 4 and also 5.I had imported castalia 3.2 and tested the simulation with radiotest.While running the simulation i am getting an error like
" Exception occurred executing command line.
Cannot run program "D:/MTECH/M.TECH" (in directory "D:\MTECH\M.TECH PROJECT\NEW OMNET++ FILES\Casssss\Simulations\radioTest"): CreateProcess error=2, The system cannot find the file specified"
Not only in radiotest and i am also getting these types of errors for many simulation models.How to resolve it.Help me please.
I had also changed the Environmental variables with java.I am not getting a solution.Please recommend a solution or please tell me which are the perfect versions to use castalia 3.2.
Your path contains spaces. A path for OMNeT++ simulator, projects, etc must not contain spaces nor special characters.

Resources