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/)

Scofield 01-28-2010 10:27 AM

LEACH protocol installation on NS2.27
 
Hi,

I am working on LEACH protocol. I have just installed NS2.27 onto my system. Following the LEACH installation steps I just downloaded the mit.tar.gz file for LEACH.

Now I require leach_makefile-2.27.patch for further installation. Can anyone suggest me where can I download this patch for LEACH.

Thank you

knudfl 01-28-2010 12:07 PM

1 Attachment(s)
I can show the notes, I made a week ago ..

I downloaded this : MIT_uAMPS_ns.tar.gz , which seems
to be a complete ' ns-2.1b5 ', patched with LEACH.
This old version will work perfect on CentOS 3.9 .
But I have not yet tried to install this LEACH version.

So where did you get "" mit.tar.gz "" ?
May be you can provide a link.

I found no working links for any ns-2.27 LEACH files.

The notes, 22-Jan-2010 are attached ..
.....

Scofield 01-28-2010 02:35 PM

Steps and Site for installation
 
1 Attachment(s)
Hey thanks for the reply...
Please try installing LEACH on NS2.27 in Ubuntu 9.10.
The whole setup will take little time I will give you the site to download

http://www.internetworkflow.com/down...ach/mit.tar.gz .

Leach make file:

http://www.internetworkflow.com/down...leach/Makefile

LEACH installation steps are given in the pdf file I have attached.. U will get mit.tar.gz at the above link. If the above site does not open please give me ur mail id I will send u the mit.tar.gz file. Here I am unable to upload it.


for clearly written steps follow this link.

http://cypress.tistory.com/entry/ns2-227-ubuntu

Please help me in installing the above, I am struck in between...

I will send u the errors I got while I install LEACH.

Thank you

knudfl 01-28-2010 06:57 PM

Thank you for showing the http://www.internetworkflow.com link.
Was down for a long time a week ago. Gave up using it then.

http://www.internetworkflow.com/downloads/ns2leach/
> > leach_install

http://www.internetworkflow.com/down...leach/Makefile
> > Makefile for ns-2.27

Google .. leach makefile-2.27.patch ..
.. probably the same things, you already found :
http://namaste.tistory.com/142
1) wget http://www.tekno.chalmers.se/~yushen...7-gcc410.patch
2) Step 9 / Step 5.1 : Makefile edits.

http://ns2.blogspot.com/2004_04_01_archive.html

http://read.pudn.com/downloads95/sou...34.patch__.htm
> > ns227-gcc34.patch

... So this was about all, I found today.
.....

Scofield 01-28-2010 10:28 PM

LEACH patch
 
are the leach makefile-2.27.patch and gcc410.patch are same because according to the instruction given in the below link(:patch -p0 < leach_makefile-2.27.patch)

http://cypress.tistory.com/entry/ns2-227-ubuntu

may be we have to use the leach makefile-2.27.patch file

I searched for it and I didnt get.. i followed
wget http://voyager.ce.fit.ac.jp/wiki/too...ile-2.27.patch
but it seems the link doesnot exist.

Any how after following the steps for LEACH installation from various links, after giving ./test, i get that ./leach_test: No such file or directory....


I will show u this error

PHP Code:

sawyer@sawyer:~/ns-allinone-2.27/ns-2.27$ ./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.

warningno class variable Phy/WirelessPhy::Efriss_amp_

warning
no class variable Phy/WirelessPhy::Etwo_ray_amp_

warning
no class variable Phy/WirelessPhy::EXcvr_

warning
no class variable Phy/WirelessPhy::sleep_

warning
no class variable Phy/WirelessPhy::ss_

warning
no class variable Phy/WirelessPhy::dist_

INITIALIZE THE 
LIST xListHead
warning
no class variable Phy/WirelessPhy::alive_

    see tcl
-object.tcl in tclcl for info about this warning.

warningno class variable Phy/WirelessPhy::Efriss_amp_

warning
no class variable Phy/WirelessPhy::Etwo_ray_amp_

warning
no class variable Phy/WirelessPhy::EXcvr_

warning
no class variable Phy/WirelessPhy::sleep_

warning
no class variable Phy/WirelessPhy::ss_

warning
no class variable Phy/WirelessPhy::dist_

warning
no class variable Phy/WirelessPhy::alive_

    see tcl
-object.tcl in tclcl for info about this warning.

warningno class variable Phy/WirelessPhy::Efriss_amp_

warning
no class variable Phy/WirelessPhy::Etwo_ray_amp_

warning
no class variable Phy/WirelessPhy::EXcvr_

warning
no class variable Phy/WirelessPhy::sleep_

warning
no class variable Phy/WirelessPhy::ss_

warning
no class variable Phy/WirelessPhy::dist_

Loading connection pattern
...
Loading scenario file...
Starting Simulation...
channel.cc:sendUp Calc highestAntennaZ_ and distCST_
highestAntennaZ_ 
1.5,  distCST_ 89.8
SORTING LISTS 
...DONE!
NS EXITING...
./
testline 5: ./leach_testNo such file or directly 

error can be seen in the last line.

What about the status of you trying for this. Did u try installing. Can you please try and install LEACH onto NS2.27 and try to find out where I am missing. or am I miss any installation file.

knudfl 02-09-2010 06:50 AM

Finally got it to compile. ( ./install ).

Code:

knudfl@88:~$ cd 9tmp/ns-allinone-2.27/ns-2.27
knudfl@88:~/9tmp/ns-allinone-2.27/ns-2.27$ ./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...

The "test" script has a typo, this will work :
Code:

#!/bin/bash
cd tcl/ex
ns wireless-demo-csci694.tcl
sleep 2

cd ../../
./leach_test

.....
P.S. : The warnings have no importance, are information only.
So actually your test passed OK. !
I got no warnings on Ubuntu 9.10 , but warnings identical to yours
did appear on PCLinuxOS.
.....

knudfl 02-12-2010 05:54 AM

Your first test : ( from post # 5 )
Quote:

Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
.. is OK ..

Your new test, received by email today, shows :
Quote:

Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
sleep: invalid time interval `2\r'
Try `sleep --help' for more information.
Did you change "test" ? Please copy / paste the "test"
from post # 6, which is known to work.
Or did you use an MS - Windows app to copy or write
the test script, so is not UNIX text format any more ? ?
"" sleep: invalid time interval `2\r' "" looks like a formatting issue.
.....

Scofield 02-12-2010 10:53 AM

It worked
 
hey thank you very much.. I just edited the test file as it was in the 6th post and it worked.
yes the problem was it was in default opening through MS word (a WINE application).
I just edited the test file and saved it and run the ./test. I didnt get any errors..(only irritating warnings)

emtarik05 03-06-2010 06:05 AM

urgently
 
please can you send for me the patch "ns-2.27-gcc410.patch"
because the link doesn't work
thanks

knudfl 03-07-2010 04:26 AM

@ emtarik05, welcome to LQ.

The file ns-2.27-gcc410.patch is just mentioned as an example
on things that were / are available. Not at all needed.
Please read the LEACH threads, tagged : leach , and see,
that we did build LEACH without that.
http://www.linuxquestions.org/questi...atch-791222/#2

And better delete your email adress, to prevent spam.
Unless you haven't seen it, we can click your name,
and use the function : "Send email to emtarik05".
.....

emtarik05 03-07-2010 08:14 AM

thanks knudfl
I want to install NS2.27 on ubuntu 9.10.
but it indicate the following problem

============================================================
* Build tcl8.4.5
============================================================
loading cache ./config.cache
checking whether to use symlinks for manpages... no
checking compression for manpages... no
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for unistd.h... yes
checking for limits.h... yes
checking for building with threads... no (default)
checking if the compiler understands -pipe... yes
checking for required early compiler flags... _LARGEFILE64_SOURCE
checking for 64-bit integer type... long long
checking for struct dirent64... no
checking for struct stat64... yes
checking for off64_t... yes
checking whether byte ordering is bigendian... no
checking for getcwd... yes
checking for opendir... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoll... yes
checking for strtoull... yes
checking for tmpnam... yes
checking for waitpid... yes
checking for strerror... yes
checking for getwd... yes
checking for wait3... yes
checking for uname... yes
checking for realpath... yes
checking dirent.h... yes
checking for errno.h... yes
checking for float.h... yes
checking for values.h... yes
checking for limits.h... (cached) yes
checking for stdlib.h... yes
checking for string.h... yes
checking for sys/wait.h... yes
checking for dlfcn.h... yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for sys/modem.h... no
checking termios vs. termio vs. sgtty... termios
checking for fd_set in sys/types... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for sys/time.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for tm_zone in struct tm... yes
checking for gmtime_r... yes
checking for localtime_r... yes
checking tm_tzadj in struct tm... no
checking tm_gmtoff in struct tm... yes
checking long timezone variable... yes
checking for st_blksize in struct stat... yes
checking for fstatfs... yes
checking for 8-bit clean memcmp... yes
checking for memmove... yes
checking proper strstr implementation... yes
checking for strtoul... yes
checking for strtod... yes
checking for strtod... (cached) yes
checking for Solaris2.4/Tru64 strtod bugs... ok
checking for ANSI C header files... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for socklen_t... yes
checking for opendir... (cached) yes
checking union wait... yes
checking for strncasecmp... yes
checking for BSDgettimeofday... no
checking for gettimeofday... yes
checking for gettimeofday declaration... present
checking whether char is unsigned... no
checking signed char declarations... yes
checking for a putenv() that copies the buffer... no
checking for langinfo.h... yes
checking whether to use nl_langinfo... yes
checking for sin... no
checking for main in -lieee... yes
checking for main in -linet... no
checking for net/errno.h... no
checking for connect... yes
checking for gethostbyname... yes
checking how to build libraries... static
checking for ranlib... ranlib
checking if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... ./configure: 1: Syntax error: Unterminated quoted string
tcl8.3.2 configuration failed! Exiting ...
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.

tarik@tarik-desktop:~/Bureau/ns-allinone-2.27$

knudfl 03-07-2010 08:38 AM

Please read post # 10 again.
And read everything in the links very carefully.

When you follow the procedure in post # 3 here strictly ..
http://www.linuxquestions.org/questi...9.10-782356/#3

.. you will not meet any tcl-8.4.5 ( or 8.3.2 ),
because you are not using it ! Instead the 8.4.18
from ns-allinone-2.34 is linked and used !
.....

Another very important thing : Remove the system tcl, tk :
sudo apt-get remove tcl*
.. before you start the build of any ns2.

.....

maunik 03-09-2010 11:27 PM

hi
i am working on leach protocol.
i can't download mit.tar.gz from link http://www.internetworkflow.com/down...ach/mit.tar.gz .
because this link not open now.
please give me another link i download mit.tar.gz.
thanks....

knudfl 03-10-2010 12:14 PM

@ maunik : Click my name, send an email, and I will attach
mit.tar.gz + LEACH-Makefile-org to a return mail. ( 580 kB.)

.....

enji 03-17-2010 05:35 AM

hi,
I am a new user in LQ.

I'm trying to work with LEACH on ns-2.
So refer to the previous post I install ns-2.27 on Ubuntu 9.10.
But the problem now is the link for downloading LEACH for ns 2.27 give before, doesn't work.

So please, someone can give me a working link.
Thanks.


All times are GMT -5. The time now is 09:32 AM.