LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-28-2014, 10:21 AM   #841
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

# 838 .
Quote:
removing Resource/Energy error
The error in "leach.err" : "invalid command ..Resource/Energy"
.. seems to appear on all contemporary Linux OS,
when you are using one of "the classic leach patches".

@exidus seems to have included all the required file editing,
meaning that the only bullet proof patch for all Linux OS's
is "leach+pegasis-ns234-files-2.tar.gz"
https://drive.google.com/file/d/0B7S...it?usp=sharing

-
 
Old 03-31-2014, 11:06 AM   #842
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@deepa
hi deepa..can you please tell me the solution of problem posted in #837..i am really stuck there and not getting any idea..please help me..
 
Old 03-31-2014, 11:48 AM   #843
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
The main reasons why nodes do not get the schedule:

1. Nodes are asleep and do not hear transmissions.
2. Collisions.
3. Packets are received but not deciphered as the packet ID doesn't match that of the schedule.

First of all, check that the schedule is received if your code isn't added. Comment out the code and check.
Then, verify the time at which the packets are sent.

4. Also, I find a major contradiction in your logic. You said:

Quote:
i am checking nodes energy with threshold and if it is greater than it then CH will send TDMA schedule directly to nodes so that nodes can send data to CH.
But, your condition is:

Code:
 if{ $E < $TE } {
This is contradictory to what you reasoned.

5. Next, what is your TE value ? Has it been recalculated since the last round ? If not, all nodes are CHs, and thereby there are no clusters, and no non-CH nodes. So check your TE value, and if the node selected has CH has any cluster nodes.

6. How about CH ADV ? Have the elected CHs sent out CH ADV ?

Quote:
Originally Posted by keepwalking123 View Post
@deepa
hi deepa..can you please tell me the solution of problem posted in #837..i am really stuck there and not getting any idea..please help me..

Last edited by deepa_2111; 03-31-2014 at 02:49 PM.
 
1 members found this post helpful.
Old 04-02-2014, 02:16 AM   #844
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@deepa
hi deepa, now TDMA schedule is getting but the problem here is i think node(CH) itself getting that schedule and other cluster nodes are not getting it, thats why the output is different like this.here with i am attaching leach.out file please check it.I have initialized nodes energy to 0.5 hence the round is of 5 second. that means after 5 second the next round will be initiated.To understand i have printed "Hello" there.Here, The threshold value will be IE*0.5 and I have corrected the condition also.In recv schedule function it is printing "Warning!!! node does not have transmit time"..and if i print the node there, it is CH only not other nodes..while in the previous round it works perfect..why this is happening? please help me..
Attached Files
File Type: txt leach.out.txt (102.3 KB, 76 views)
 
Old 04-02-2014, 06:49 AM   #845
toprix
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Rep: Reputation: Disabled
NS2 Ubuntu VM + LEACH

To those users who still have problem in setting up NS2/LEACH;
I've uploaded an Ubuntu VM with ns 2.34 and LEACH protocol integrated in it.
http://www.filefactory.com/file/6gip...hi.part001.rar
http://www.filefactory.com/file/6712...hi.part002.rar
http://www.filefactory.com/file/2ii3...hi.part003.rar
http://www.filefactory.com/file/2i57...hi.part004.rar
http://www.filefactory.com/file/7ino...hi.part005.rar
http://www.filefactory.com/file/cyc3...hi.part006.rar
http://www.filefactory.com/file/6aao...hi.part007.rar
http://www.filefactory.com/file/275c...hi.part008.rar
http://www.filefactory.com/file/60mh...hi.part009.rar
http://www.filefactory.com/file/2xxq...hi.part010.rar
http://www.filefactory.com/file/7iqz...hi.part011.rar
http://www.filefactory.com/file/1tq2...hi.part012.rar
http://www.filefactory.com/file/2j8i...hi.part013.rar
http://www.filefactory.com/file/1gg2...hi.part014.rar
Notes:
1- rar files pass: lq
2- run VM by VMWare workstation 10+
3- OS pass: 123456
4- due to my thesis requirements, some changes are made in initial settings of leach protocol including: network dimensions, nodes scenario and ... by the way, you can simply replace original LEACH files with changed ones.
5- In case of dead links or corrupted rar files, contact me (rar files have 5% recovery)

Last edited by toprix; 04-02-2014 at 07:18 AM.
 
1 members found this post helpful.
Old 04-02-2014, 09:00 AM   #846
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
1. Check that the CH has cluster nodes.
2. Check the reason why you get the warning - Check when and at what instant you get this warning. And what transmit time is being talked about here ?

Quote:
Originally Posted by keepwalking123 View Post
@deepa
hi deepa, now TDMA schedule is getting but the problem here is i think node(CH) itself getting that schedule and other cluster nodes are not getting it, thats why the output is different like this.here with i am attaching leach.out file please check it.I have initialized nodes energy to 0.5 hence the round is of 5 second. that means after 5 second the next round will be initiated.To understand i have printed "Hello" there.Here, The threshold value will be IE*0.5 and I have corrected the condition also.In recv schedule function it is printing "Warning!!! node does not have transmit time"..and if i print the node there, it is CH only not other nodes..while in the previous round it works perfect..why this is happening? please help me..
 
Old 04-02-2014, 12:23 PM   #847
imy
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Rep: Reputation: Disabled
Hi Guys,

Currently working on WSNs. I was looking for a protocol using clustering, and already implemented on ns2. I found many people using leach. I have installed successfuly on Ns-2.34 (after weeks of hard time!, btw thank you all for your posts/comments/questions/... I have read almost all!)

I my case, I need to arrange my sensors into clusters and test my implemetation on the clustering topology. I am not implementing a new routing protocol or clustering protol.

Do you have any idea on how I can call the clustering function (in other words: I need to use only the clustering part of leach)?

Can you please help me out.

Many thanks! and look forward to hearing from you.
Imy =)

PS: Please do let me know if I am on the wrong threads and orient me to the right one!

Last edited by imy; 04-02-2014 at 12:30 PM.
 
Old 04-02-2014, 05:19 PM   #848
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Hey !

You'll need the LEACH functionality upto createSchedule.

Quote:
Originally Posted by imy View Post
Hi Guys,

Currently working on WSNs. I was looking for a protocol using clustering, and already implemented on ns2. I found many people using leach. I have installed successfuly on Ns-2.34 (after weeks of hard time!, btw thank you all for your posts/comments/questions/... I have read almost all!)

I my case, I need to arrange my sensors into clusters and test my implemetation on the clustering topology. I am not implementing a new routing protocol or clustering protol.

Do you have any idea on how I can call the clustering function (in other words: I need to use only the clustering part of leach)?

Can you please help me out.

Many thanks! and look forward to hearing from you.
Imy =)

PS: Please do let me know if I am on the wrong threads and orient me to the right one!
 
Old 04-03-2014, 12:17 PM   #849
imy
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Rep: Reputation: Disabled
Thanks Deepa_2111, much appreciated!
I will probably come back with other questions, as I haven't tested yet.
Thanks again
Imy
 
Old 04-23-2014, 10:43 AM   #850
buwuzhe90
LQ Newbie
 
Registered: Apr 2014
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 838 .

The error in "leach.err" : "invalid command ..Resource/Energy"
.. seems to appear on all contemporary Linux OS,
when you are using one of "the classic leach patches".

@exidus seems to have included all the required file editing,
meaning that the only bullet proof patch for all Linux OS's
is "leach+pegasis-ns234-files-2.tar.gz"
https://drive.google.com/file/d/0B7S...it?usp=sharing

-
Actually,for Ubuntu12.04,the leach patches you provide in #838 (and #28) still can not work.
I install Ubuntu12.04(i686) in VMware Workstation 8.0,ns-2.34,and I install gcc-4.1(the source you give in #180)gcc-4.4,gcc-4.5,gcc-4.6(so as g++),but all of these donn't work--there is still error in "leach.err":"invalid command:Resource/Energy...".
After a week's failure,I abandon Ubuntu12.04,and install Ubuntu10.04. Now ,leach works correct! it can also work in Fedora 15(i686).
But still thank you very much! and sorry about my poor English.
 
Old 04-27-2014, 11:09 AM   #851
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@ deepa
hi deepa as u said in post #846 i check the cluters..ch have their members..byt what is happening here is when ch send advertisement msg or data also..it is nt receiving to members..it is received by ch only..what happened here? can u please give me your contact detail so that i can contact you because i want the solution very early as my submission date is close..plzz..thank you
 
Old 04-29-2014, 07:31 AM   #852
shahidz
LQ Newbie
 
Registered: Mar 2014
Posts: 16

Rep: Reputation: Disabled
sir i patch leach leach-C and pegasis but how we change in tcl file to get the corresponding protocols like for leach leach-C and pegasis.
 
Old 04-29-2014, 09:50 AM   #853
chhaya
LQ Newbie
 
Registered: Mar 2014
Posts: 1

Rep: Reputation: Disabled
hey, i m facing this error while running "make command in ns2"
trace/cmu-trace.cc: In member function ‘void CMUTrace::format_aodv(Packet*, int)’:
trace/cmu-trace.cc:841:14: error: ‘AODVTYPE_HELLO_ACK’ was not declared in this scope
case AODVTYPE_HELLO_ACK:
^
make: *** [trace/cmu-trace.o] Error 1

please suggest me some solution

and "make depend" is not working properly. its showing an error

make: *** No rule to make target `mac/macngenhanced.cc', needed by `depend'. Stop.
 
Old 04-29-2014, 11:12 AM   #854
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
Post #853, @chhaya.

Not about LEACH ?
Please start a new thread when it's another topic.
http://www.linuxquestions.org/questi...ux-software-2/ → `New Thread´.
.... And tell which protocol it's about.

-
 
Old 04-29-2014, 11:23 AM   #855
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
# 852 , @shahidz.

Edit line 5 in `leach_test´ to the one that you want to use :

alg=leach-c
alg=pegasis

-
 
  


Reply

Tags
leach, leach-warning50, ns2, ns2 ns234, pegasis



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
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
labview stopped at "init tmp resource files" on FC4 baosheng Linux - Software 2 09-28-2007 11:02 AM
ORiNOCO WLAN card not working - "failed to allocate resource" hauneboo Linux - Laptop and Netbook 1 11-29-2005 09:08 AM
What "kernel opts" allow PC to power down with "turning energy off"? kornerr Linux - General 1 03-10-2005 12:07 PM
nvidia insmod: "Device or resource busy" w/GeForce 4 MX KeithSpook Linux - Hardware 4 03-03-2004 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:03 PM.

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