LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-08-2014, 09:36 AM   #736
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled

@deepa
hi, deepa, i want to calculate energy of CH.for that i used set E [[$currentCH_ getER]query] but its not working..it shows that invalid command name "0"..here "0" is ChID..when i use set E [[$self_ getER]query], it works well for that current node..but how can i get cluster head energy..please help..
 
Old 02-09-2014, 08:16 AM   #737
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@knudfl #734


export CC=gcc41 CXX=g++41 && ./install
bash: ./install: No such file or directory
 
Old 02-09-2014, 09:34 AM   #738
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@helyos #64
m getting the same leach.err file contents as you were getting
Also made modifications in uAMPS file as told by deepa
now after making moifications when m doing
saurabh@saurabh-Satellite-C850:~/ns-allinone-2.34/ns-2.34$ ./test

m getting

couldn't open "694demo.tr": permission denied
while executing
"open $opt(tr) w"
invoked from within
"set tracefd [open $opt(tr) w]"
(file "wireless-demo-csci694.tcl" line 121)


please help
thanks in advance
 
Old 02-09-2014, 10:40 AM   #739
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@deepa @keepwalking @helyos

saurabh@saurabh-Satellite-C850:~/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...

m getting the test file executed properlybut in leach.err m getting the error as ./ns-2.34/mit/leach_sims there this is the file
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/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/saurabh/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/saurabh/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)
 
Old 02-11-2014, 08:09 AM   #740
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@deepa56

m getting the same contents in /ns-2.34/mit/leach_sims/leach.err mentioned below.

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/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/saurabh/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/saurabh/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)


Also as pr your post I have changed all paths in uAMPS.tcl file but still while executing ./test err file showing me the same contents......



please please help
 
Old 02-11-2014, 08:11 AM   #741
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Red face got error removed

Quote:
Originally Posted by mittal_saurabhin View Post
@helyos #64
m getting the same leach.err file contents as you were getting
Also made modifications in uAMPS file as told by deepa
now after making moifications when m doing
saurabh@saurabh-Satellite-C850:~/ns-allinone-2.34/ns-2.34$ ./test

m getting

couldn't open "694demo.tr": permission denied
while executing
"open $opt(tr) w"
invoked from within
"set tracefd [open $opt(tr) w]"
(file "wireless-demo-csci694.tcl" line 121)


please help
thanks in advance
done
 
Old 02-12-2014, 09:03 AM   #742
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
You haven't made the changes to leach_test .. The changes involve setting the proper wireless.tcl.

Quote:
Originally Posted by mittal_saurabhin View Post
@helyos #64
m getting the same leach.err file contents as you were getting
Also made modifications in uAMPS file as told by deepa
now after making moifications when m doing
saurabh@saurabh-Satellite-C850:~/ns-allinone-2.34/ns-2.34$ ./test

m getting

couldn't open "694demo.tr": permission denied
while executing
"open $opt(tr) w"
invoked from within
"set tracefd [open $opt(tr) w]"
(file "wireless-demo-csci694.tcl" line 121)


please help
thanks in advance
 
1 members found this post helpful.
Old 02-13-2014, 05:17 AM   #743
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@deepa,
hi deepa..i want the clusters formed in first round which is presented in ns-bsapp.tcl but i want to retrieve that array or list in ns-leach.tcl for some work..but it is not retrieved directly..just some post before u said that though one function is in other tcl file, for accessing it we dont require its path as it is already defined in uamps.tcl.but m unable to retrieve that cluster info..please help me..thanx in advance..
 
Old 02-13-2014, 10:57 AM   #744
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@deepa #742....
can you please provide me the details of what changes need to be made in leach_test and where this file can be found.....
 
Old 02-14-2014, 10:15 AM   #745
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Please see post #600 in this thread for the changes, and also go through all posts in http://ns2.blogspot.ca/


Quote:
Originally Posted by mittal_saurabhin View Post
@deepa #742....
can you please provide me the details of what changes need to be made in leach_test and where this file can be found.....
 
1 members found this post helpful.
Old 02-14-2014, 11:44 AM   #746
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@ deepa
hi deepa..i m stuck at my problem i found sm ways to solve it..but still not resolved..can u provide me any solution?? plzzzz..
 
Old 02-14-2014, 11:58 AM   #747
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@deepa

as per comment #600 I have changed the name of my file from wireless.tcl to wireless_leach.tcl
Also I have changed the path of number of statements in that file for various tcl files used with source command

now finally what m getting after using ns command is

ns wireless_leach.tcl
Usage: wireless_leach.tcl
mandatory arguments:
[-x MAXX] [-y MAXY]
optional arguments:
[-cp conn pattern] [-sc scenario] [-nn nodes]
[-seed seed] [-stop sec] [-tr tracefile]


cn you please suggest what to do now....
 
Old 02-16-2014, 01:18 PM   #748
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Hello friends

Today I reinstall ns-2.34 and then leach protocol
but when I run make command it gives error
trace/cmu-trace.cc:1531: error: stray ‘\342’ in program
trace/cmu-trace.cc:1531: error: stray ‘\200’ in program
trace/cmu-trace.cc:1531: error: stray ‘\230’ in program
trace/cmu-trace.cc:1531: error: stray ‘\342’ in program
trace/cmu-trace.cc:1531: error: stray ‘\200’ in program
trace/cmu-trace.cc:1531: error: stray ‘\231’ in program
trace/cmu-trace.cc:1535: error: stray ‘\342’ in program
trace/cmu-trace.cc:1535: error: stray ‘\200’ in program
trace/cmu-trace.cc:1535: error: stray ‘\230’ in program
trace/cmu-trace.cc:1535: error: stray ‘\342’ in program
trace/cmu-trace.cc:1535: error: stray ‘\200’ in program
trace/cmu-trace.cc:1535: error: stray ‘\231’ in program
trace/cmu-trace.cc:1539: error: stray ‘\342’ in program
trace/cmu-trace.cc:1539: error: stray ‘\200’ in program
trace/cmu-trace.cc:1539: error: stray ‘\230’ in program
trace/cmu-trace.cc:1539: error: stray ‘\342’ in program
trace/cmu-trace.cc:1539: error: stray ‘\200’ in program
trace/cmu-trace.cc:1539: error: stray ‘\231’ in program
trace/cmu-trace.cc: In member function ‘void CMUTrace::format_rca(Packet*, int)’:
trace/cmu-trace.cc:1531: error: ‘A’ was not declared in this scope
trace/cmu-trace.cc:1535: error: ‘R’ was not declared in this scope
trace/cmu-trace.cc:1539: error: ‘D’ was not declared in this scope
make: *** [trace/cmu-trace.o] Error 1

Although I have added

#ifdef MIT_uAMPS
void format_rca(Packet *p, int offset);
#define ADV_CHAR ‘A’
#define REQ_CHAR ‘R’
#define DATA_CHAR ‘D’
#endif
in file cmu-trace.h


Problem solved .
It was
}
#define ADV_CHAR ‘A’
#define REQ_CHAR ‘R’
#define DATA_CHAR ‘D’
}

Last edited by Aska123; 02-16-2014 at 01:46 PM.
 
Old 02-16-2014, 02:42 PM   #749
shegxyboy
LQ Newbie
 
Registered: Feb 2014
Posts: 4

Rep: Reputation: Disabled
Please help me, am unable to run my leach.nam, it displays nothings, is there a problem with my wireless.tcl or am doing somethings wrong, my leach.out and other came out good but the leach.nam that was generated didnt work, what should i do please?, am stuck here
 
Old 02-16-2014, 08:09 PM   #750
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Did you copy the wireless_leach.tcl to the tcl folder ?

PLEASE READ THE BLOG LINK I pasted.



Quote:
Originally Posted by mittal_saurabhin View Post
@deepa

as per comment #600 I have changed the name of my file from wireless.tcl to wireless_leach.tcl
Also I have changed the path of number of statements in that file for various tcl files used with source command

now finally what m getting after using ns command is

ns wireless_leach.tcl
Usage: wireless_leach.tcl
mandatory arguments:
[-x MAXX] [-y MAXY]
optional arguments:
[-cp conn pattern] [-sc scenario] [-nn nodes]
[-seed seed] [-stop sec] [-tr tracefile]


cn you please suggest what to do now....

Last edited by deepa_2111; 02-17-2014 at 08:31 AM.
 
  


Reply

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


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
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 07:23 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
Open Source Consulting | Domain Registration