Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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..."
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) !!!
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
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.
..
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"
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
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'.
...
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 ?
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.)
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
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)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.