Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
02-14-2013, 01:44 AM
|
#1
|
LQ Newbie
Registered: Feb 2013
Posts: 9
Rep: 
|
NS2 simulation to implement LEACH protocol
Im trying to implement Leach protocol in ns2.34. i dont know much about this protocol.Is it possible to implement it in ns 2.34 ? and i need an example program which i could execute using ns 2.34 and understand this protocol.
|
|
|
02-14-2013, 02:04 AM
|
#3
|
LQ Newbie
Registered: Feb 2013
Posts: 9
Original Poster
Rep: 
|
Thank u!
i m using fedora.. 32- bit..
i m not sure abt which version this is
|
|
|
02-14-2013, 02:15 AM
|
#4
|
LQ Newbie
Registered: Feb 2013
Posts: 9
Original Poster
Rep: 
|
thank u again!!!
i m using fedora 16...
and i wish to uninstall ns2, because i think it is not working properly..
and install it again..
can u tel me how to uninstall it?
|
|
|
06-25-2013, 11:51 PM
|
#5
|
LQ Newbie
Registered: Jun 2013
Location: Kanpur
Posts: 26
Rep: 
|
Needed Help to install Leach
Quote:
Originally Posted by knudfl
|
Dear sir,
Please help me. i installed ns 2.34 successfully and configured all files as you said. but when i try to execute ./configure file it shows access denied in configure file line number 1520 and 1530. please rectify my error.
my os is ubuntu 12.04 and my system 64bit processor.
|
|
|
06-26-2013, 06:27 AM
|
#6
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 5 .
"access denied in configure file line number 1520" :
Maybe you have used a "sudo command" for something ?
Solution : Start from scratch in a new directory like /home/name/ns2/,
and $ cd ns2/ ; tar xvf ns-allinone-2.34.tar.gz ; Etc. etc.
... And do not use sudo for any command :
All ns2 commands are "unprivileged user commands".
( Except 'sudo make install' ).
-
|
|
1 members found this post helpful.
|
06-27-2013, 06:42 AM
|
#7
|
LQ Newbie
Registered: Jun 2013
Location: Kanpur
Posts: 26
Rep: 
|
Executed successfully but no output
Dear sir,
The leach finally configured successfully but after giving ./test nothing is made change in screen. no leach_test.out is created. no leach_test.err file also created. at the time of make in only saw some warning as in below.
and for ./test also it shows nothing error.
please help me in this regards.
if you have time means please give me a complete step by step procedure to install it correctly. and also tell to me how i can use that out file to get the simulation because i am new to ns2 sir. i am very kind of you.
Last edited by goldking123; 06-27-2013 at 07:06 AM.
|
|
|
06-27-2013, 07:40 AM
|
#8
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 7 .
The output from './test' is : ns-2.34/mit/leach_sims/{leach.err, leach.out}.
Quote : " ./test nothing is made change in screen."
Please rephrase : What do you mean ? What did you expect to appear ?
And please do not write everything in one line .... :
Quote:
The leach finally configured successfully.
But after giving $ ./test ,
nothing is made change in screen.
No leach_test.out is created.
No leach_test.err file also created.
At the time of make in only saw some warning as in below.
|
This is a test in an ns-2.34/, patched with pegasis + leach :
Code:
$ ./test
num_nodes is set 3
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
warning: no class variable Phy/WirelessPhy::alive_
see tcl-object.tcl in tclcl for info about this warning.
.
.
Loading connection pattern...
Loading scenario file...
Starting Simulation...
mac/channel.cc: sendUp - Calc highestAntennaZ_ and distCST_
mac/channel.cc: highestAntennaZ_ = 1.5, distCST_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
The "exidus-pegasis-leach-ns234.patch.tar.gz" is the latest LEACH for ns-2.34.
And it's my impression that it will provide the best "leach build".
Suggest : Set up another ns-allinone-2.34/ in a new folder, and try it out.
Pegasis + leach http://www.linuxquestions.org/questions/tags/pegasis/
-
Last edited by knudfl; 06-27-2013 at 07:50 AM.
|
|
1 members found this post helpful.
|
06-27-2013, 08:33 AM
|
#9
|
LQ Newbie
Registered: Jun 2013
Location: Kanpur
Posts: 26
Rep: 
|
my leach.err file data
Dear sir,
i am getting the following error in the leach_test.err file. please help me.
invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams {args} {
$self instvar energyLevel_ alarmLevel_
set energyLevel_ [lindex $args 0]
set alarmLevel_ [lind..."
(file "/home/kraj/ns234/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/kraj/ns234/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.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/kraj/ns234/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 30)
invoked from within
"source.orig mit/uAMPS/sims/uamps.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 mit/uAMPS/sims/uamps.tcl"
(file "tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig 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 tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)
what can i do now?
thanks in advance.
|
|
|
06-27-2013, 04:17 PM
|
#10
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 9 .
Quote:
invalid command name "Resource/Energy"
|
That's why I suggest "The other leach patch".
"Exidus-pegasis-leach" was carefully built by LQ member @exidus :
#289 here http://www.linuxquestions.org/questi...68/page20.html
.. And # 425, same link. Etc. etc.
Easier to use / build. No errors.
The original "leach only" : A failed build is quite common.
Exidus-pegasis-leach :
ns-2.34/mit/leach_sims/test_simulations/leach/leach.err has this text :
"mac/chanel.cc: INITIALIZE THE LIST xListHead
SORTING LISTS ...DONE!!"
-
|
|
1 members found this post helpful.
|
06-28-2013, 02:58 AM
|
#11
|
LQ Newbie
Registered: Jun 2013
Location: Kanpur
Posts: 26
Rep: 
|
How to install the file sir : leach and leach c
Dear sir,
For installation i can follow the same step like leach installation ?
please suggest me the steps to install sir.
Thanks in advance.
|
|
|
06-28-2013, 04:38 AM
|
#13
|
LQ Newbie
Registered: Jun 2013
Location: Kanpur
Posts: 26
Rep: 
|
unable to understand the step help me sir
Dear sir,
please give me direction to install step by step
i am little bit confused by seeing the steps.
whether i want install ns2 or not?
whether i place the exidus code inside ns2.34 folder or outside itself because there written as place in ns_allone folder itself.
please help me sir.
finally i tried with same leach procedure but i got the following error.
kraj@ubuntu:~/Desktop/ns234/ns-allinone-2.34/ns-2.34$ ./test
num_nodes is set 3
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
NS EXITING...
./leach_test: line 37: mit/leach_sims/pegasis.err: No such file or directory
help me please
Last edited by goldking123; 06-28-2013 at 06:13 AM.
Reason: want to add
|
|
|
06-28-2013, 05:56 AM
|
#14
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 13 .
1) tar xvf ns-allinone-2.34.tar.gz
2) cd ns-allinone-2.34/
3) tar xvf exidus-pegasis-leach-ns234.patch.tar.gz
Or 3a)
.. If you have exidus-pegasis-leach-ns234.patch.tar.gz in another location :
tar xvf <path-to-folder-with-exidus*>/exidus-pegasis-leach-ns234.patch.tar.gz
4) export CC=gcc41 CXX=g++41
5) ./install
-
|
|
2 members found this post helpful.
|
06-28-2013, 07:07 AM
|
#15
|
LQ Newbie
Registered: Jun 2013
Location: Kanpur
Posts: 26
Rep: 
|
how to use pegasis.out file
Dear sir,
Thank you for your more valuable helps. i am very kind of you.
now i executed successfully without any issues.please one more help.
i dont know how to use *.out file to see the simulation and graph. please help me sir.
thanks in advance.
|
|
|
All times are GMT -5. The time now is 09:18 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|