LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-18-2013, 02:05 PM   #16
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2015, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 15,303

Rep: Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935

# 12 .

The test compilation I made this morning was on Ubuntu 10.10: For best result.

There appears to be some problems with the Ubuntu 10.04 patch command and
"mannasim-patch.diff". May fail say five out of six tries.
( Everything works, no errors at patching, but files are missing :
the mannasim/ directory, and some other files.)

I have uploaded a "patch package" to be used, when the patch fails on old Ubuntu:
mannasim-patched-ns229.tar.bz2 https://docs.google.com/file/d/0B7S2...it?usp=sharing

Install, Ubuntu 10.04 :
a) tar xvf ns-allinone-2.29.3.tar.gz
b) cd ns-allinone-2.29/ && tar xvf mannasim-patched-ns229.tar.bz2
c) export CC=gcc-4.1 CXX=g++-4.1 && ./install


-

Last edited by knudfl; 04-18-2013 at 05:24 PM.
 
1 members found this post helpful.
Old 04-20-2013, 06:16 AM   #17
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 12 .

I have uploaded a "patch package" to be used, when the patch fails on old Ubuntu:
mannasim-patched-ns229.tar.bz2 https://docs.google.com/file/d/0B7S2...it?usp=sharing

Install, Ubuntu 10.04 :
a) tar xvf ns-allinone-2.29.3.tar.gz
b) cd ns-allinone-2.29/ && tar xvf mannasim-patched-ns229.tar.bz2
c) export CC=gcc-4.1 CXX=g++-4.1 && ./install
-
what about mannasim script generator tool? how to implement that?
I also unpack mannasim-src-ns2.29.tar into ns-2.29 in fedora. and then run ./configure and make command.

following errors :
No .configure file found in current directory
Continuing with default options...
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc-4.1
checking for C compiler default output file name... configure: error: C compiler cannot create executables
 
Old 04-20-2013, 09:50 AM   #18
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2015, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 15,303

Rep: Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935
# 17 .
Quote:
error: C compiler cannot create executables
You will have to install the compilers :
sudo apt-get install g++-4.1


Quote:
run ./configure and make command.
.. Which you are not supposed to do.

This will work ..
a) tar xvf ns-allinone-2.29.3.tar.gz
b) cd ns-allinone-2.29/ && tar xvf mannasim-patched-ns229.tar.bz2
c) export CC=gcc-4.1 CXX=g++-4.1 && ./install


Quote:
What about mannasim script generator tool ? How to implement that ?
Please read the answers you got.
The 'scriptGeneratorTool' is a separate tool : Will work anywhere.
$ cd scriptGeneratorTool/ && ./msg-linux.sh

-
 
Old 04-20-2013, 09:58 AM   #19
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Original Poster
Rep: Reputation: Disabled
Thanks Kundfi for your reply

I am installing ns-2.29.3 with mannasim-patched-ns229.tar.bz2 .
installed successfully

It has created one more ns-2.29(2)(this have script generator tool in it) .

when I run validate test in ns-2.29(2). All test failed but when i run validate test in ns-2.29. All test pass.


I also unpack MSG folder in ns-2.29 on fedora. and run command ./msg-linux.sh. It is working
My system is double booted. window xp and fedora both. but with fedora i can not run my internet. so I had to install ubuntu on win.

finally MSG window appears on fedora ns-2.29. But when I run a simple scenario tcl . some errors

ns: finish: can't read "namtraceAllFile_": no such variable
while executing
"if {$namtraceAllFile_ != ""} {
$self puts-nam-config "W -t $stoptime"
}"
(procedure "_o3" line 4)
(Simulator nam-end-wireless line 4)
invoked from within
"$ns_ nam-end-wireless $val(stop)"
(procedure "finish" line 9)
invoked from within
"finish"

Last edited by Aska123; 04-20-2013 at 10:02 AM.
 
Old 04-20-2013, 10:14 AM   #20
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Original Poster
Rep: Reputation: Disabled
Hello Kundfi

I followed your instructions. I renamed ns-2.29(2) to ns-2.292. unpacked scriptGeneratorTool' in ns-2.292 and then :

rohini@ubuntu:~/a/ns-allinone-2.29/ns-2.292/mannasim$ cd scriptGeneratorTool
rohini@ubuntu:~/a/ns-allinone-2.29/ns-2.292/mannasim/scriptGeneratorTool$ ls
gui icons msg-linux.sh msg-win32.bat xml2tcl
rohini@ubuntu:~/a/ns-allinone-2.29/ns-2.292/mannasim/scriptGeneratorTool$ ./msg-linux.sh
./msg-linux.sh: 3: java: not found
rohini@ubuntu:~/a/ns-allinone-2.29/ns-2.292/mannasim/scriptGeneratorTool$

I also unpack scriptGeneratorTool in ns-2.29 and run ./msg-linux.sh command. And got same error java not found. is java not installed in ubuntu?
 
Old 04-20-2013, 10:45 AM   #21
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2015, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 15,303

Rep: Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935
# 20 .
Quote:
I renamed ns-2.29(2) to ns-2.292
Probably not a good idea. Make a copy or a link, if you want a different name.


Quote:
Is java not installed in ubuntu ?
No.
https://help.ubuntu.com/community/Java
>>> "Oracle (Sun) Java 6"
> wget http://download.oracle.com/otn-pub/j...linux-i586.bin
> etc. etc.
.
.
> sudo update-alternatives --config java

-
 
Old 04-22-2013, 01:15 AM   #22
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Original Poster
Rep: Reputation: Disabled
you are awesome Kundfi really
my MSG is running now.

but what is next step. how to create simple script for wireless sensor netwok.

I want to create a sink node with sensor nodes around it.

please help master.
 
Old 04-22-2013, 01:30 AM   #23
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Original Poster
Rep: Reputation: Disabled
Hello Kundfi

I used MSG to create a script about access point. script is attached. my ns-2.29 is in directory a/ns-allinone-2.29

when i run rohini@ubuntu:~/a$ ns Ap.tcl
following errors

application-specific initialization failed: Can't find a usable init.tcl in the following directories:
/home/rohini/ns-allinone-2.29/lib/tcl8.4 /usr/local/lib/tcl8.4 /usr/lib/tcl8.4 /usr/local/library /usr/library /usr/tcl8.4.11/library /tcl8.4.11/library /home/rohini/ns-allinone-2.29/lib/tcl8.4



This probably means that Tcl wasn't installed properly.

Initializing MannaSim Script...
invalid command name "Antenna/OmniAntenna"
while executing
"Antenna/OmniAntenna set X_ 0 "
(procedure "set_default_settings" line 11)
invoked from within
"set_default_settings"
(file "Ap.tcl" line 493)
 
Old 04-22-2013, 01:38 AM   #24
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Original Poster
Rep: Reputation: Disabled
Attachment
Attached Files
File Type: txt Ap.tcl.txt (18.2 KB, 21 views)
 
Old 04-22-2013, 07:38 AM   #25
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2015, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 15,303

Rep: Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935
# 23 .
Quote:
Can't find a usable init.tcl in the following directories:
Either you are using a wrong 'ns'.
Or: ns-allinone-2.29/ was renamed or moved to another location.

The proof solution :
a) cd ns-allinone-2.29/ns-2.29/
b) cp ns ns-mannasim
c) sudo cp ns-mannasim /usr/local/bin/
... Then you are sure that the right 'ns' is used.

This is the result I get with $ ns-mannasim Ap.tcl.txt :
Code:
ns-mannasim Ap.tcl.txt 
Initializing MannaSim Script...
Setting up mica 2 mote with Antenna/OmniAntenna and range = 100

Nodes count:
 - 1 access points
 - 10 common nodes
 - 0 cluster heads
 - 11 nodes
 - AODV routing protocol
 - LL link layer
 - Phy/WirelessPhy network interface

Scenario size: 100.0 x 100.0

Using trace.tr as trace file
num_nodes is set 11
Creating an access point...
Setting up mica 2 mote with Antenna/OmniAntenna and range = 100
Using mica 2 mote settings
Setting up mica 2 mote with Antenna/OmniAntenna and range = 100
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
invalid command name "Application/AccessPointApplication"
    while executing
"Application/AccessPointApplication create _o38 "
    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 $val(apApp)"
    (procedure "create_access_point_app" line 3)                                                                              
    invoked from within                                                                                                       
"create_access_point_app [$node_(0) node-addr]"                                                                               
    (procedure "create_access_point" line 13)                                                                                 
    invoked from within                                                                                                       
"create_access_point $local(energy) $local(x) $local(y) $local(z) $local(start) $local(stop)"                                 
    (file "Ap.tcl.txt" line 590)
No issues with "Antenna/OmniAntenna"
But "Application/AccessPointApplication" : Probably an error / a wrong protocol name ?

-
 
Old 04-22-2013, 09:11 AM   #26
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Original Poster
Rep: Reputation: Disabled
Are these these instructions

Unpack the tar.gz file into ns-2.29 main folder (if using ns all-in-one distribution ns-allinone-2.29/ns-2.29 folder). Inside mannasim/ folder just created look for a ns-modified-files/ folder. where ns-2.29 modified files are stored.
Substitue ns-2.29 files listed bellow by it's MannaSim version stored in ns-modified-files/ folder in mannasim/ directory.
ns-2.29/apps/udp.cc
ns-2.29/common/ns-process.h
ns-2.29/common/packet.cc
ns-2.29/common/packet.h
ns-2.29/mac/mac-802_11.cc
ns-2.29/tcl/lib/ns-lib.tcl
ns-2.29/tcl/lib/ns-default.tcl
ns-2.29/Makefile.in
In ns-2.29 main folder re-run configuration script and then re-compile the system:
./configure
make

unnecessary? is there no need of replacing these files? is this the reason of error
invalid command name "Application/AccessPointApplication"
while executing
"Application/AccessPointApplication create _o38 "
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 $val(apApp)"
(procedure "create_access_point_app" line 3)
invoked from within
"create_access_point_app [$node_(0) node-addr]"
(procedure "create_access_point" line 13)
invoked from within
"new $val(apApp)"
(procedure "create_access_point_app" line 3)
invoked from within
"create_access_point_app [$node_(0) node-addr]"
(procedure "create_access_point" line 13)
invoked from within
"create_access_point $local(energy) $local(x) $local(y) $local(z) $local(start) $local(stop)"
(file "Ap.tcl.txt" line 590)

Because I have just unpack script generator tool and I have not modified any file.

well tcl error has gone. now this error remains.
 
Old 04-22-2013, 10:24 AM   #27
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2015, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 15,303

Rep: Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935
# 26 .

! The simple and proof install is in post # 16. Repeated in # 18 ! !

! The package *src* is two things :
1) Contains the files that was used to generate the patch.
2) Contains the 'scriptGeneratorTool'.

Looking for troubles : Use the *src* to make your own "patch".
? But why, when the patch already is available ?
! No ./configure && make, when you use the least complex method.


About your Ab.tcl :
If generated with scriptGeneratorTool : You will have to edit the file Ab.tcl.

-
 
Old 04-22-2013, 10:27 AM   #28
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Original Poster
Rep: Reputation: Disabled
ok i will edit it.

Please give me a template for WSN . so that I can know how to make sensor node and a sink which gather data from nodes

Last edited by Aska123; 04-22-2013 at 10:52 AM.
 
Old 10-24-2013, 03:44 AM   #29
nasgelicvijay
LQ Newbie
 
Registered: Oct 2013
Posts: 12

Rep: Reputation: Disabled
Same Query_Please give me suggestions!!

Please give me Reply to solve this problem..

sir, I m running mannasim genertaed script, but i'm getting following error::

ns: finish: can't read "namtraceAllFile_": no such variable
while executing
"if {$namtraceAllFile_ != ""} {
$self puts-nam-config "W -t $stoptime"
}"
(procedure "_o3" line 4)
(Simulator nam-end-wireless line 4)
invoked from within
"$ns_ nam-end-wireless $val(stop)"
(procedure "finish" line 9)
invoked from within
"finish"

Please give me steps to be followed!!!

Thanks,
Vijay

Last edited by nasgelicvijay; 10-24-2013 at 07:09 AM. Reason: Remoded_Mail_ID_to avoid SPAM
 
Old 10-24-2013, 04:04 AM   #30
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2015, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 15,303

Rep: Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935
# 29, @nasgelicvijay
Please remove your email address to avoid getting spam.
We already have "Send email to nasgelicvijay" :
http://www.linuxquestions.org/questi...ember&u=767950
Besides that :
All technical discussions are supposed to be done in the Forums,
so other readers can benefit from the solutions.


Quote:
Same Query_Please give me suggestions!!
Please give me Reply to solve this problem..
What is your question / problem ?
And what have you done so far to find a solution ?

-
 
  


Reply

Tags
mannasim, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ns2.34 installation help in Ubuntu 10.10 xptional Ubuntu 44 02-20-2015 07:26 AM
NS2 v2.26 installation on Ubuntu 11.10 ulyssues.fam Linux - Newbie 50 07-28-2012 08:53 AM
installation of ns2.1b5 on ubuntu? shanky Linux - Software 3 03-12-2012 11:46 PM
ns2.29 installation in ubuntu bolmeteus Ubuntu 4 02-08-2011 01:46 PM


All times are GMT -5. The time now is 10:46 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration