LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   LEACH protocol installation on NS2.27 (https://www.linuxquestions.org/questions/linux-general-1/leach-protocol-installation-on-ns2-27-a-785379/)

knudfl 08-28-2010 09:54 AM

@ reem , post # 119 : Please ask @ nour-eddine or @ emtarik05 :
http://www.linuxquestions.org/questi...10-a-825970/#8


--------------------------

Post # 120 , @ Arslan Rana : Welcome to LQ.
Please start a new thread, when the subject is off topic.
This thread is about LEACH only. And then please specify version of Ubuntu.
>>> http://www.linuxquestions.org/questi...ux-software-2/ >> 'New Thread'

http://www.linuxquestions.org/linux/...Ask_a_Question
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.linuxquestions.org/linux/rules.html
..

Arslan Rana 09-25-2010 09:27 AM

Hello i have installed leach on ns2.27 and run the test file successfully kindly tell me about the further procedure to run leach code.Thanks

hariss7 10-20-2010 08:07 AM

hi every one. i have installed ns also add the leach and run a file demo694.nam it is tcl file. tcl,ex. but when i checked the code of this file the routing protocole of this file is DSDV, CAN any tell me his this leach code file, if not then what can i do to run leach code, kndly tel me m very thank to all of u.thanx

reem 10-22-2010 02:30 AM

having error during leach simulation
 
Hi knudlf
i am working on LEACH on NS 2.34. its was installed successfully. i am ruuning leach-test with different values but now i am having the following error when a node died during simulation.

Node 17 is DEAD!!!!
ns: _o434 checkAlive:
(_o12 cmd line 1)
invoked from within
"_o12 cmd removeif _o439"
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 "_o12" line 2)
(SplitObject unknown line 2)
invoked from within
"$chan removeif [[$self node] set netif_(0)]"
(procedure "_o434" line 13)
(Application/LEACH checkAlive line 13)
invoked from within
"_o434 checkAlive"

can u help me in this. how can i solve it.

Arslan Rana 10-22-2010 05:56 AM

I am working on leach protocol in ns 2.27.while running file wireless.tcl the following error occured kindly help me as soon as possible also tell me that for the running of leach code which file we have to run.




while executing
"source.orig tcl/lib/ns-mobilenode.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source tcl/lib/ns-mobilenode.tcl"
(file "wireless.tcl" line 184)

knudfl 10-23-2010 12:33 AM

# 125 : Assume ns-allinone-2.27/ns-2.27/tcl/ex/wireless.tcl
1)
cd ns-allinone-2.27/ns-2.27/
2)
ln -s ns ns227-leach : So that you are sure, the LEACH executable is used.
3)
./ns227-leach tcl/ex/wireless.tcl
..... The reply is .....
Code:

Usage: tcl/ex/wireless.tcl
        mandatory arguments:
                [-x MAXX] [-y MAXY]
        optional arguments:
                [-cp conn pattern] [-sc scenario] [-nn nodes]
                [-seed seed] [-stop sec]


emtarik05 10-23-2010 08:57 AM

tarik
 
Quote:

Originally Posted by reem (Post 4135602)
Hi knudlf
i am working on LEACH on NS 2.34. its was installed successfully. i am ruuning leach-test with different values but now i am having the following error when a node died during simulation.

Node 17 is DEAD!!!!
ns: _o434 checkAlive:
(_o12 cmd line 1)
invoked from within
"_o12 cmd removeif _o439"
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 "_o12" line 2)
(SplitObject unknown line 2)
invoked from within
"$chan removeif [[$self node] set netif_(0)]"
(procedure "_o434" line 13)
(Application/LEACH checkAlive line 13)
invoked from within
"_o434 checkAlive"

can u help me in this. how can i solve it.

what changes have you done ????
the error is in the function checkAlive when the application try to remove the node 17 from the interface !!

reem 10-23-2010 12:27 PM

Quote:

Originally Posted by emtarik05 (Post 4136835)
what changes have you done ????
the error is in the function checkAlive when the application try to remove the node 17 from the interface !!

i installed LEACH manually by making changes in the required files using steps written in NS2 Leach Implementation by Jason A. Pamplin and using mit.tar.gz.

thn i set some global variables like follows

export RCA_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/rca
export uAMPS_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/uAMPS
export PATH=/ns-allinone-2.34/tcl8.4.14/unix
export PATH=/ns-allinone-2.34/tk8.4.14/unix
export PATH=/ns-allinone-2.34/bin
export LD_LIBRARY_PATH=/ns-allinone-2.34/tcl8.4.18/unix
export LD_LIBRARY_PATH=/ns-allinone-2.34/tk8.4.18/unix
export LD_LIBRARY_PATH=/ns-allinone-2.34/otcl-1.13
export LD_LIBRARY_PATH=/ns-allinone-2.34/library
export TCL_LIBRARY=/ns-allinone-2.34/tcl8.4.18/library
export RCA_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/rca

thn i changed dst_ to dst_addr_ in ns_leach.tcl.

now i dont know how can i fix that bug.
pls help me

pls help me if any one knows about fixing this error. i really need it.

Arslan Rana 10-24-2010 01:03 AM

# 126 knudfi now i get this error..


can't read "opt(num_clusters)": no such element in array
while executing
"expr 1.5*$opt(num_clusters)"
invoked from within
"expr int([expr 1.5*$opt(num_clusters)])+1"
invoked from within
"set opt(spreading) [expr int([expr 1.5*$opt(num_clusters)])+1]"
(file "/home/haris/ns-allinone-2.27/ns-2.27/tcl/mobility/leach.tcl" line 12)
invoked from within
"source.orig /home/haris/ns-allinone-2.27/ns-2.27/tcl/mobility/leach.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source /home/haris/ns-allinone-2.27/ns-2.27/tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 186)

reem 10-30-2010 02:34 AM

Quote:

Originally Posted by reem (Post 4137005)
i installed LEACH manually by making changes in the required files using steps written in NS2 Leach Implementation by Jason A. Pamplin and using mit.tar.gz.

thn i set some global variables like follows

export RCA_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/rca
export uAMPS_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/uAMPS
export PATH=/ns-allinone-2.34/tcl8.4.14/unix
export PATH=/ns-allinone-2.34/tk8.4.14/unix
export PATH=/ns-allinone-2.34/bin
export LD_LIBRARY_PATH=/ns-allinone-2.34/tcl8.4.18/unix
export LD_LIBRARY_PATH=/ns-allinone-2.34/tk8.4.18/unix
export LD_LIBRARY_PATH=/ns-allinone-2.34/otcl-1.13
export LD_LIBRARY_PATH=/ns-allinone-2.34/library
export TCL_LIBRARY=/ns-allinone-2.34/tcl8.4.18/library
export RCA_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/rca

thn i changed dst_ to dst_addr_ in ns_leach.tcl.

now i dont know how can i fix that bug.
pls help me

pls help me if any one knows about fixing this error. i really need it.

hi knudfl and emtarik
any body pls help me. i have searched this on net but couldnt find any help. kindly guide me if any of you has any idea of solving it. emtarik told me the reason of this error but didnt tell me how to resolve it.

wcdj 11-23-2010 09:43 PM

Hi,I am a newbie here and glad to see everyone. :)
the original test file is like this,
#!/bin/bash
cd tcl/ex
ns wireless-demo-csci694.tcl
sleep 2

cd ../../
./leach_test
=======
My question is that why run wireless_demo-.. before leach_test, why do this? thx a lot! :)

wcdj 11-26-2010 12:25 AM

Hello, everyone, I find a mistake that in the leach_test file, x=1000 y=1000, but in the 100nodes.txt file the nodes are all in 100*100. Is this an error? If is, maybe we must modify the genscen file i think. thank you !

deepak.stoic 11-26-2010 11:32 AM

can anyone please mail me leach code for ns2.34 as rapidshare links are not working.
Thanks

knudfl 11-26-2010 12:39 PM

@ deepak.stoic, post #133 : Welcome to LQ. .. .. :) ..

The "tarik-ns234-leach.tar.bz2" has been sent to you.

ns-234-leach.tar.gz etc. :
http://www.linuxquestions.org/questi...34-a-870368/#5

( Old link with "old version" tarik-ns234-leach :
https://docs.google.com/leaf?id=0B7S...thkey=CJzYt5QP )
..

wcdj 11-26-2010 07:50 PM

Hello
 
Quote:

Originally Posted by knudfl (Post 4171977)
@ deepak.stoic, post #133 : Welcome to LQ. .. .. :) ..

The "tarik-ns234-leach.tar.bz2" has been sent to you.

Time to edit post # 133, and delete your mail address to avoid spam.

..
New link with tarik-ns234-leach :
https://docs.google.com/leaf?id=0B7S...thkey=CJzYt5QP
..

Hello, could you help me to answer the questions post #131 and #132, plz!
#131: I cannot understand x=1000, y=1000, but in 100nodes.txt file, all nodes in 100*100
#132: I think to run ns wireless-demo-csci694.tcl is to configure mobile nodes, right?

Thank you very much!


All times are GMT -5. The time now is 05:12 PM.