LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-30-2010, 03:05 AM   #1
MounaRM
Member
 
Registered: Nov 2010
Posts: 35

Rep: Reputation: 14
problem with ns2


hi everyone ,

The command "ns wireless.tcl " result the following error :

(_o15 cmd line 1)
invoked from within
"_o15 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 "_o15" line 2)
(SplitObject unknown line 2)
invoked from within
"_o15 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 "_o4" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o4 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o4" line 23)
(Simulator node line 23)
invoked from within
"$ns node"
("for" body line 2)
invoked from within
"for {set i 0} {$i <$val(nn) } { incr i } {
set node_($i) [$ns node]
$node_($i) random-motion 0 ;# disable random motion
# On détermine la positi..."

can anyone help me ?
Thanks
 
Old 12-01-2010, 12:52 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
cd ns-allinone-2.34/ns-2.34/tcl/ex/

'ns wireless.tcl' : I get this result ..
Code:
num_nodes is set 50
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Load complete...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
NS EXITING...
.. And a file ' out.tr ', 2.1 MB is created.
..
 
Old 12-02-2010, 03:17 AM   #3
MounaRM
Member
 
Registered: Nov 2010
Posts: 35

Original Poster
Rep: Reputation: 14
first, I want to thank you knudfl for your attention.
Second , the file wireless.tcl isn't the same file ns-allinone-2.34/ns-2.34/tcl/ex/ .
finally , now when I try to execute any file .tcl with ns2 i find this error :

ns:
[code omitted because of length]
: invalid command name "Agent/Ant"
while executing
"Agent/Ant set accessible_var_ true"

the previous error did'nt show again !! ( I really don't know why) !!!
 
Old 12-02-2010, 08:45 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
The tests, I made ( post #2 ) will show the same result using
either the ns-allinone-2.34/ns-2.34/ns ... or the one installed
with 'sudo apt-get install ns2' → → /usr/bin/ns (from ns-2.35).
....


Quote:
[code omitted because of length]
This indicates, that you are using the ns from ns-2.34,
and that it was compiled with a wrong tcl / tk.

Solution :
sudo apt-get remove tcl8.4-dev tk8.4-dev tcl8.5-dev tk8.5-dev
.. and may be also remove tcl8.4 tk8.4 tcl8.5 tk8.5

And then start from scratch with ns-allinone-2.34 in a new folder.
..

Last edited by knudfl; 12-02-2010 at 08:58 AM.
 
Old 12-03-2010, 03:36 AM   #5
MounaRM
Member
 
Registered: Nov 2010
Posts: 35

Original Poster
Rep: Reputation: 14
Hi knudfl ,


I've done everything you told me to do :
1)remove tcl8.4-dev tk8.4-dev tcl8.5-dev tk8.5-dev
2)remove tcl8.4 tk8.4 tcl8.5 tk8.5
3)reinstall ns-allinone-2.34 in a new folder

But still having the same error :
ns:
[code omitted because of length]
: invalid command name "Agent/Ant"
while executing
"Agent/Ant set accessible_var_ true"
 
Old 12-03-2010, 07:19 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Well, you will have to show an example of a file.tcl,
that will reply with the error message :
' : invalid command name "Agent/Ant" '


Also suggest :
Please try out the command : /usr/bin/ns file.tcl
to test the ns installed with 'sudo apt-get install ns2'
..

Last edited by knudfl; 12-03-2010 at 09:00 AM.
 
Old 12-04-2010, 03:18 AM   #7
MounaRM
Member
 
Registered: Nov 2010
Posts: 35

Original Poster
Rep: Reputation: 14
well , the error is generated when I try ns anyfile.tcl

Last edited by MounaRM; 12-10-2010 at 06:15 AM.
 
Old 12-05-2010, 12:42 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Will have a look at your text in post # 7 ,
when you have used the "Edit" button and added code tags :
[/code] at the end of "code" , and [code] where the code starts.
http://www.linuxquestions.org/questi....php?do=bbcode

( When you have a long "code text", suggest :
It can be attached as e.g. name.tcl.txt, by using the paper clip button
in the 'Advanced editor'.)
...



How is '/usr/bin/ns file.tcl' working ? ?

That's the command installed with 'sudo apt-get install ns2'.
...


Alternative to ns-allinone-2.34 : Set up an ns-allinone-2.35 :
You can have as many ns2 versions, as you want.
http://www.isi.edu/nsnam/dist/release/
> http://www.isi.edu/nsnam/dist/releas....35-RC7.tar.gz
> > ns-allinone-2.35-RC7.tar.gz
.

Last edited by knudfl; 12-05-2010 at 12:53 AM.
 
1 members found this post helpful.
Old 12-06-2010, 04:51 AM   #9
MounaRM
Member
 
Registered: Nov 2010
Posts: 35

Original Poster
Rep: Reputation: 14
when I installed the ns with the commande sudo apt-get install ns2 the /usr/bin/ns file.tcl is working with the other exemples , but mine (wireless.tcl) is'nt working , actually , I find this error :

~/Bureau/ns_tuto$ /usr/bin/ns wireless.tcl
num_nodes is set 100

(_o15 cmd line 1)
invoked from within
"_o15 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 "_o15" line 2)
(SplitObject unknown line 2)
invoked from within
"_o15 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 "_o4" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o4 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o4" line 23)
(Simulator node line 23)
invoked from within
"$ns node"
("for" body line 2)
invoked from within
"for {set i 0} {$i <$val(nn) } { incr i } {
set node_($i) [$ns node]
$node_($i) random-motion 0 ;# disable random motion

}"
(file "wireless.tcl" line 56)



but I have to install the protocol first ( I have the code of the protocol , and the readme file says that I need to copy the code in the ns2 directory , for me ~/Bureau/ns-allinone-2.34/ns-2.34 ) but now I am working , as uou said , with /usr/bin/ns , how do I find the appropriate ns directory ?

Last edited by MounaRM; 12-06-2010 at 04:52 AM.
 
Old 12-06-2010, 09:16 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
But I have to install the protocol first ( I have the code of the protocol,
and the readme file says that I need to copy the code in the ns2 directory
Which protocol ? Please show a direct link to the code.

And please attach your file wireless.tcl as wireless-Xxx.tcl.txt :
The "paper clip" tool in the 'Advanced editor' is used for that.
..

Last edited by knudfl; 12-06-2010 at 09:18 AM.
 
Old 12-06-2010, 01:54 PM   #11
MounaRM
Member
 
Registered: Nov 2010
Posts: 35

Original Poster
Rep: Reputation: 14
Actually the protocol was implemented by a friend , I just want to test it .
Attached Files
File Type: txt wireless.tcl.txt (3.3 KB, 252 views)
 
Old 12-06-2010, 02:11 PM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Code:
"source.orig ~/Bureau/protocole_routage_colonies_de_fourmis/simulation/random_scenario.ns_params"
Well, the wireless.tcl.txt looks for this file.
I guess, you will have to attach the file :
'protocole_routage_colonies_de_fourmis/simulation/random_scenario.ns_params'

( + other files (if any) concerning the "new protocol.)

..
 
Old 12-10-2010, 06:17 AM   #13
MounaRM
Member
 
Registered: Nov 2010
Posts: 35

Original Poster
Rep: Reputation: 14
The source of the error was in the makefile ,
the protocol was not defined in the makefile
 
Old 10-27-2012, 11:29 AM   #14
deVacto
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Rep: Reputation: Disabled
hi guys
i got the same problem, the error says
Code:
error "error when calling class $cls: $args" $..."
the error occure when the string i set other the 0 in
Code:
set numberClass0 2
in line 11, but when 0 wether qos on or off it got the result
the file tcl i already attach it

this the full error it says
Code:
(_o5 cmd line 1)
    invoked from within
"_o5 cmd at 40.0 {_o546 stop} 93"
    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 "_o5" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o5 at 40.0 {_o546 stop} 93"
    ("eval" body line 1)
    invoked from within
"eval $scheduler_ at $args"
    (procedure "_o3" line 3)
    (Simulator at line 3)
    invoked from within
"$ns at 40.0 "$cbrS($i) stop" 93 "
    ("for" body line 21)
    invoked from within
"for { set i 0} {$i<$numberClass0} {incr i} { 
 set null($i) [new Agent/Null] 
 set nullS($i) [new Agent/Null] 
 $ns attach-agent $UE($i) $null($i) 
 $..."
    (file "ltezi.tcl" line 65)
where it go wrong, how to fix it?
tq for your help
Attached Files
File Type: txt ltez.tcl.txt (5.5 KB, 120 views)

Last edited by deVacto; 10-27-2012 at 11:31 AM.
 
Old 09-23-2014, 09:38 AM   #15
rana_abdallah
Member
 
Registered: Sep 2014
Posts: 45

Rep: Reputation: Disabled
Hey
I have to simulate umts code on ns2.30.
I've got this error:
$ ns umts.tcl

(_o3 cmd line 1)
invoked from within
"_o3 cmd create-Umtsnode"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" re
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class
(procedure "_o3" line 2)
(SplitObject unknown line 2
invoked from within
"$ns create-Umtsnode"
invoked from within
"set rnc [$ns create-Umtsnode]"
(file "umts.tcl" line 31)

how can i solve it?
 
  


Reply

Tags
eurane, ns2



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
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM
weight throwing protocol using ns2 code,diffusion based protocol using ns2 code rajrupa Linux - Networking 1 05-27-2010 03:39 AM
Ns2.32 rafik123 Linux - Newbie 1 01-22-2010 01:26 AM
ns2 sandhya_it17m Linux - Networking 2 01-11-2010 03:14 AM
Ns2 ConfusedMonkey Linux - Software 3 10-05-2005 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:33 AM.

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
Open Source Consulting | Domain Registration