invalid command name error

1,191 views
Skip to first unread message

Ahmed

unread,
May 4, 2013, 1:02:59 AM5/4/13
to ns-u...@googlegroups.com
Hi,

I am running a TCL script and it throws me with the following error:

invalid command name "-llType"
            while executing
          "-llType $val(ll) \


Does anyone know what exactly this error mean and how it could be solved.
-Ahmed

Basavaraj Bidnoor

unread,
May 12, 2013, 12:12:43 AM5/12/13
to ns-u...@googlegroups.com
Hi
Regarding the Ns2 project,we had implemeted the all kinds of
protocols,  please send your project requirement, so that we will
implemet and give you.
we will provide TCL file, Xgraphs, trace files, Awk scripts and deley,
throuhtput, packet delivery ratio and report.
please install the team viewer. prvoide  the id.
HI  please mail me ajay.b...@gmail.com and in...@projectinfosys.co.in
please install team viewer using below link.
after installing call me, i will give you user ID and Password.
I will show you demo of your project.

skype id: basavaraj.bid
Ajay Bidanoor
project manager
+919632766055

knudfl

unread,
Jun 17, 2013, 9:54:15 AM6/17/13
to ns-u...@googlegroups.com
The usual cause of ""invalid command name "-llType" : is when you have a <space> after \ , like
-llType $val(ll) \<space>

Should be OK, when all <space> after all the backslash's are deleted.

-

Ahmed

unread,
Jun 18, 2013, 9:35:25 PM6/18/13
to ns-u...@googlegroups.com
Thanks Knudfl,
It worked.
-Ahmed

hhars...@gmail.com

unread,
Aug 28, 2018, 2:08:29 PM8/28/18
to Network Simulator 2 (NS2)

Hi,
I am running a tcl script on NS2 and I get this error.

invalid command name "Agent/RfidReader"
    while executing
"Agent/RfidReader create _o98 "
    invoked from within
"catch "$className create $o $args" msg"
    invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
    (procedure "new" line 3)
    invoked from within
"new Agent/RfidReader"
    invoked from within
"set reader1 [new Agent/RfidReader]"
I'm using NS-2.35 on ubuntu 16.04. 
Please help me resolving this error. 

knudfl

unread,
Aug 28, 2018, 4:39:44 PM8/28/18
to Network Simulator 2 (NS2)
Hi.

These are the default simulations with "Agent/RfidReader" :
$ cd cenario/
$ grep
-Rin RfidReader *
artigo3
.2013/collisions/col.2.45.02/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.2.45.03/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.eom.03/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.eom.04/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.eom.05/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.eom.08/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.eom.16/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.lb.02/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.lb.03/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.q.03/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.q.04/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.q.05/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.sch.04/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.sch.05/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/collisions/col.sch.08/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/eom.128/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/eom.64/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/prop.est/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/schoute.128/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
artigo3
.2013/schoute.64/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
prop
.edfsa/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
prop
.edfsa.2/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
proposed
/rfid_est.tcl:92:set reader1 [new Agent/RfidReader]
sbrc2013
/cenario1.tcl:108:set reader1 [new Agent/RfidReader]
sbrc2013
/cenario1.tcl:109:set reader2 [new Agent/RfidReader]
sbrc2013
/cenario1.tcl:110:set reader3 [new Agent/RfidReader]
sbrc2013
/cenario2.tcl:117:set reader1 [new Agent/RfidReader]
sbrc2013
/cenario2.tcl:118:set reader2 [new Agent/RfidReader]
sbrc2013
/cenario2.tcl:119:set reader3 [new Agent/RfidReader]
sbrc2013
/cenario2.tcl:120:set reader4 [new Agent/RfidReader]
sbrc2013
/cenario2.tcl:121:set reader5 [new Agent/RfidReader]
simulacoes
.antigas/rfid.tcl:92:set reader1 [new Agent/RfidReader]
simulacoes
.antigas/rfid2.tcl:83:set reader1 [new Agent/RfidReader]
simulacoes
.antigas/tracking.tcl:110:set reader1 [new Agent/RfidReader]
simulacoes
.antigas/tracking.tcl:111:set reader2 [new Agent/RfidReader]
simulacoes
.antigas/tracking.tcl:112:set reader3 [new Agent/RfidReader]
testes
/rfid.tcl:92:set reader1 [new Agent/RfidReader]
testes
/rfid2.tcl:83:set reader1 [new Agent/RfidReader]
testes
/rfid_2.tcl:92:set reader1 [new Agent/RfidReader]
testes
/tracking.tcl:109:set reader1 [new Agent/RfidReader]
testes
/tracking.tcl:110:set reader2 [new Agent/RfidReader]
testes
/tracking.tcl:111:set reader3 [new Agent/RfidReader]

Using the examples requires an ns-2.35 patched with "RfidReader".

Your error : Seems you are using an executable 'ns' with no RfidReader included.

Build ns-2.35 + RfidReader ....
$ tar xvf ns-allinone-2.35_gcc482.tar.gz   // This is the Oct 2014 update
https
://drive.google.com/file/d/0B7S255p3kFXNSGJCZ2YzUGJDVk0/view?usp=sharing
$ cd ns
-allinone-2.35/
$ zcat rfid
.read_ns235.patch | patch -p0
https
://drive.google.com/file/d/0B7S255p3kFXNTlFfZjRjNnpSM1U/view?usp=sharing
$
./install
$ cd ns
-2.35/
$ cp ns ns235
-rfid-read    // This is your backup
$ sudo make install    
// 'make install' will copy the executable 'ns' to /usr/local/bin/
sudo cp ns235
-rfid-read /usr/local/bin/

--------- Simulation example ------------
ns rfid.tcl rfid.tr 100  
or
ns235-rfid-read rfid.tcl rfid.tr 100


harshini harikrishnan

unread,
Sep 4, 2018, 11:14:51 PM9/4/18
to ns-u...@googlegroups.com

This is what I'm getting sir. When I try to build ns2 with rfid it says patch already exists. How to proceed?

image.png



--
You received this message because you are subscribed to the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To post to this group, send email to ns-u...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-users.
For more options, visit https://groups.google.com/d/optout.


--
Regards,
Harshini Harikrishnan

knudfl

unread,
Sep 5, 2018, 9:16:21 AM9/5/18
to Network Simulator 2 (NS2)
@harshini harikrishnan.

First :  Images with text are not accepted.  I guess you know how to copy-paste a text.

About your error : You are not supposed to use the default "ns" command, but the ns235-rfid-read ( in /usr/local/bin/ ) ..... Please read the previous post carefully.



Reply all
Reply to author
Forward
0 new messages