LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-06-2014, 02:40 PM   #1
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Rep: Reputation: Disabled
Error IIN PATCHING OLSR (Ns2.35 ubuntu 12.04)


Hi Everyone
i m working on ns2.35 ubuntu 12.04
when i follow these steps for olsr patching
all commands ran without error

cd ns-allinone-2.35/ns-2.35/
tar zxvf um-olsr-1.0.tgz
ln -s ./um-olsr-1.0 ./um-olsr
patch -p1 < um-olsr/um-olsr_ns-2.35_v1.0.patch

but while running the olsr.tcl
it again shows the same error
invalid command name "Agent/OLSR"
while executing
"Agent/OLSR set use_mac_ true"
(file "olsr.tcl" line 38)
please help me , thnx in advance

Last edited by Nindu; 10-06-2014 at 02:41 PM.
 
Old 10-07-2014, 07:38 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,620

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
The most common error / mistake is :
Using an executable 'ns' with no OLSR.
( Or you have a failed build.)

The safe way : Make a copy of the right 'ns' to 'ns-olsr' :
$ cd ns-2.35/
$ cp ns ns-olsr
$ sudo cp ns-olsr /usr/local/bin/
... Then you can run all the olsr simulations like :
$ ns-olsr ddebbie90-scenario.tcl
OLSR examples : umolsr-examples-04.2014.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
( "olsr.tcl" is an unknown file.)

OLSR info http://www.linuxquestions.org/questions/tags/olsr/

-

Last edited by knudfl; 10-07-2014 at 07:41 AM.
 
1 members found this post helpful.
Old 10-07-2014, 11:39 AM   #3
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Original Poster
Rep: Reputation: Disabled
Thank u so much for ur reply sir

sorry to bother u, (this question might seem silly to u )
but how to run simulation i couldnt understand (Then you can run all the olsr simulations like : $ ns-olsr ddebbie90-scenario.tcl
OLSR examples : umolsr-examples-04.2014.tar.gz)

in aodv and aomdv: i use gedit aodv.tcl and then ns aodv.tcl after that i added awk script
 
Old 10-07-2014, 01:00 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,620

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
← #3 .
Quote:
but how to run simulation
You will have to do these commands :
$ cd ns-2.35/
$ cp ns ns-olsr
$ sudo cp ns-olsr /usr/local/bin/
... and if you don't have a failed build of OLSR+ns235,
you can run $ ns-olsr ddebbie90-scenario.tcl
... and all the other examples in "umolsr-examples-04.2014.tar.gz"

Download the package https://drive.google.com/file/d/0B7S...ew?usp=sharing
.. Unpack anywhere with $ tar xvf umolsr-examples-04.2014.tar.gz
You will get a folder 'umolsr-examples-04.2014/{ddebbie90-scenario.tcl,
mezyana-30.tcl, olsr_example2.tcl, olsr_example.tcl, olsr_test2.tcl,
olsr_test.tcl, simulation.tcl, test-1.tcl }'
Then : $ cd umolsr-examples-04.2014/
Simulation ... : $ ns-olsr ddebbie90-scenario.tcl


Quote:
In aodv and aomdv :
I use gedit aodv.tcl and then ns aodv.tcl after that I added awk script
You can probably not edit any random file.tcl, and expect it to work.
"aodv.tcl" : Is usually not a file you can use for simulation.
Is known as a configuration file only.
https://www.google.com/webhp?hl=all&...all&q=aodv.tcl
A simulation file.tcl ends with $ns run
A configuration file ends with " } "


-

Last edited by knudfl; 10-07-2014 at 01:21 PM.
 
Old 10-07-2014, 02:10 PM   #5
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Original Poster
Rep: Reputation: Disabled
Again thank u for helping me & for ur quick reply
i follow all steps which u have told but when i used
ns-olsr ddebbie90-scenario.tcl
then it shows
num_nodes is set 15

(_o14 cmd line 1)
invoked from within
"_o14 cmd addr"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o14" line 2)
(SplitObject unknown line 2)
invoked from within
"_o14 addr"
("eval" body line 1)
invoked from within
"eval $node addr $args"
("default" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns node"
invoked from within
"set n0 [$ns node]"
(file "ddebbie90-scenario.tcl" line 64)

and for others it shows that command not found
 
Old 10-07-2014, 02:18 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,620

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
For an easier OLSR install to ns-2.35, a new patch was created :
umolsr-ns235_v1.0-2014.patch → contains all the edits and "olsr/"
https://drive.google.com/file/d/0B7S...ew?usp=sharing

$ tar xvf ns-allinone-2.35.tar.gz && cd ns-allinone-2.35/
$ patch -p0 < umolsr-ns235_v1.0-2014.patch
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install


-

Last edited by knudfl; 10-08-2014 at 05:17 PM.
 
Old 10-07-2014, 02:30 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,620

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
← Ref. post #5 .

That's the exact error output you will get
from an executable ns** with no OLSR !

Please try out the new patch, post #6.
(Ubuntu will often fail with patches not created with 'diff -Naur'.)

You will have to start from scratch in a new folder,
with a new unpacked ns-allinone-2.35.tar.gz .
* A wrecked ns-allinone-2.35/2.35/ cannot be reused.


-

Last edited by knudfl; 10-07-2014 at 02:56 PM.
 
Old 10-08-2014, 07:18 AM   #8
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Original Poster
Rep: Reputation: Disabled
as u said in post no 6
i download the link
https://drive.google.com/file/d/0B7S...ew?usp=sharing
and copy in ns-allinone & use tar xvf ns-allinone-2.35.tar.gz
it gives this error
tar: ns-allinone-2.35.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

where m i going wrong?
 
Old 10-08-2014, 08:43 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,620

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
← #8 .

Well, you will either have to copy ns-allinone-2.35.tar.gz
to the location where you want it unpacked.

Or include the full path to the directory
where you are hiding ns-allinone-2.35.tar.gz , like :
$ tar xvf /home/Nindu/Downloads/ns-allinone-2.35.tar.gz
Or :
$ tar xvf /home/Nindu/Desktop/ns-allinone-2.35.tar.gz

Please remember that the first command is always $ pwd
when you are not sure of your current location.

-
 
1 members found this post helpful.
Old 10-08-2014, 05:06 PM   #10
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Original Poster
Rep: Reputation: Disabled
Thanx knudfl
for ur valuable help

Ref post 6
Code:
root@ubuntu:/home/nona19# cd Downloads/
root@ubuntu:/home/nona19/Downloads# cd ns-allinone-2.35
root@ubuntu:/home/nona19/Downloads/ns-allinone-2.35# patch -p0 < umolsr-ns235_v1.0-2014.patch
patching file ns-2.35/common/packet.h
patching file ns-2.35/Makefile.in
patching file ns-2.35/olsr/CHANGELOG
patching file ns-2.35/olsr/LICENSE
patching file ns-2.35/olsr/OLSR.cc
patching file ns-2.35/olsr/OLSR.h
patching file ns-2.35/olsr/OLSR_pkt.h
patching file ns-2.35/olsr/OLSR_printer.cc
patching file ns-2.35/olsr/OLSR_printer.h
patching file ns-2.35/olsr/OLSR_repositories.h
patching file ns-2.35/olsr/OLSR_rtable.cc
patching file ns-2.35/olsr/OLSR_rtable.h
patching file ns-2.35/olsr/OLSR_state.cc
patching file ns-2.35/olsr/OLSR_state.h
patching file ns-2.35/olsr/README
patching file ns-2.35/queue/priqueue.cc
patching file ns-2.35/tcl/lib/ns-agent.tcl
patching file ns-2.35/tcl/lib/ns-default.tcl
patching file ns-2.35/tcl/lib/ns-lib.tcl
patching file ns-2.35/tcl/lib/ns-packet.tcl
patching file ns-2.35/trace/cmu-trace.cc
patching file ns-2.35/trace/cmu-trace.h
root@ubuntu:/home/nona19/Downloads/ns-allinone-2.35# export CC=gcc-4.4 CXX=g++-4.4 && install
install: missing file operand
Try `install --help' for more information.
 
Old 10-08-2014, 05:19 PM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,620

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
# 10 .

The command is of course "./install" ( You already know that? ) :
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install

Sorry.
 
Old 10-09-2014, 04:21 PM   #12
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Original Poster
Rep: Reputation: Disabled
Sorry i forgot to write ./ before install

Thank u so much sir for valuable replies
God bless u
 
Old 04-15-2015, 05:51 AM   #13
kruvi
LQ Newbie
 
Registered: Apr 2015
Posts: 8

Rep: Reputation: Disabled
error in olsr...need help

i m getting following error while run olsr.tcl

invalid command name "Content_Types"
while executing
"Content_Types"
invoked from within
"P!7f[Content_Types].xml ( ..."
(file "olsr_example2.tcl" line 1)
 
Old 04-15-2015, 07:50 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,620

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
Post #13, @kruvi : Welcome to LQ.
Quote:
"P!7f[Content_Types].xml ( ..."
(file "olsr_example2.tcl" line 1)
Well, then please download a new package with the examples, umolsr-examples-04.04.2015.tar.gz
Link https://drive.google.com/file/d/0B7S...ew?usp=sharing

... And unpack the files with : $ tar xvf umolsr-examples-04.04.2015.tar.gz
* Do not use a Windows tool for the file extraction !

-

Last edited by knudfl; 04-15-2015 at 08:23 AM.
 
Old 04-15-2015, 08:16 AM   #15
kruvi
LQ Newbie
 
Registered: Apr 2015
Posts: 8

Rep: Reputation: Disabled
Thank u Sir.......
 
  


Reply

Tags
ns2, olsr, olsr-235


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NS2 - AODV & OLSR - Ubuntu david_diamond Linux - Newbie 11 06-03-2014 01:11 AM
olsr patch for ns2.35 ubuntu 12.10 alr_m Linux - Software 1 01-15-2014 09:11 AM
ns2 installation on ubuntu with olsr patch giving following error bhushan0710 Linux - Newbie 8 01-21-2013 04:09 AM


All times are GMT -5. The time now is 11:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration