LinuxQuestions.org
Review your favorite Linux distribution.
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 05-16-2011, 11:34 PM   #61
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 261Reputation: 261Reputation: 261

Helyos,

Do you have this code (it binds the variables) in wireless-phy.cc ? This is in the function WirelessPhy::WirelessPhy() : Phy(), sleep_timer_(this), status_(IDLE) {}

Code:
#ifdef MIT_uAMPS
	bind("alive_",&alive_);
	bind("Efriss_amp_", &Efriss_amp_);
	bind("Etwo_ray_amp_", &Etwo_ray_amp_);
	bind("EXcvr_", &EXcvr_);
	bind("sleep_",&sleep_);
	bind("ss_",&ss_);
	bind("dist_",&dist_);
	bind("bandwidth_",&bandwidth_);
#endif
 
Old 05-17-2011, 05:19 AM   #62
helyos
LQ Newbie
 
Registered: May 2011
Posts: 28

Rep: Reputation: 3
Yes deepa_2111,

I have that code in wireless-phy.cc :
Code:
#ifdef MIT_uAMPS
  /*
   * Set CSThresh_ for receiver sensitivity and RXThresh_ for required SNR.
   */
  CSThresh_ = 1e-10;
  RXThresh_ = 6e-9;
#else
  CSThresh_ = 1.559e-11;
  RXThresh_ = 3.652e-10;
#endif
	bind("CPThresh_", &CPThresh_);
	bind("CSThresh_", &CSThresh_);
	bind("RXThresh_", &RXThresh_);
	//bind("bandwidth_", &bandwidth_);
	bind("Pt_", &Pt_);
	bind("freq_", &freq_);
	bind("L_", &L_);
#ifdef MIT_uAMPS
  bind("alive_",&alive_);
  bind("bandwidth_",&bandwidth_);
  bind("Efriss_amp_", &Efriss_amp_);
  bind("Etwo_ray_amp_", &Etwo_ray_amp_);
  bind("EXcvr_", &EXcvr_); 
  bind("sleep_",&sleep_);
  bind("ss_",&ss_);
  bind("dist_",&dist_);
#endif
What do you think?
 
Old 05-17-2011, 05:59 AM   #63
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
hey every-body

anyone who knows where I can get the TCL script for running the simulation for a LEACH protocol.
 
Old 05-17-2011, 06:11 AM   #64
helyos
LQ Newbie
 
Registered: May 2011
Posts: 28

Rep: Reputation: 3
@ keepwalking

check post #5
 
Old 05-17-2011, 06:36 AM   #65
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
hey

when I'm trying to run the ./test command is says permission denied but if I do it manually by running file: wireless-demo-csci694.tcl i get the following results.
Code:
luuh@ubuntu:~/ns-allinone-2.34/ns-2.34$ ./test
bash: ./test: Permission denied
luuh@ubuntu:~/ns-allinone-2.34/ns-2.34$ cd tcl
luuh@ubuntu:~/ns-allinone-2.34/ns-2.34/tcl$ cd ex/
luuh@ubuntu:~/ns-allinone-2.34/ns-2.34/tcl/ex$ ns wireless-demo-csci694.tcl
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.

warning: no 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.

warning: no 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.

warning: no 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...
luuh@ubuntu:~/ns-allinone-2.34/ns-2.34/tcl/ex$ ns wireless-demo-csci694.tcl
may anyone help me to solve this problem
 
Old 05-17-2011, 06:41 AM   #66
helyos
LQ Newbie
 
Registered: May 2011
Posts: 28

Rep: Reputation: 3
@ keepwalking

Try chmod 777 all the files.

And that warnings i try to solve them too. Please if you find something tell me.
 
Old 05-17-2011, 07:05 AM   #67
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
@elyos

thanks for helping, I don't understand what do you mean about Try chmod 777 all the files, please make some explanation
 
Old 05-17-2011, 08:14 AM   #68
helyos
LQ Newbie
 
Registered: May 2011
Posts: 28

Rep: Reputation: 3
@keepwalking
try this : $sudo chmod 777 -R ns-allinone-2.34

By doing this you set all the permissions to files (read, write, execute).
 
2 members found this post helpful.
Old 05-17-2011, 09:14 AM   #69
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
@deepa2111 and @ heylos

I'm trying to simulate uamps.tcl but I getting the following errors can you help me to solve them.

Code:
luuh@ubuntu:~/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims$ ns uamps.tcl
can't read "opt(nn)": no such element in array
    while executing
"expr $opt(nn) - 1"
    invoked from within
"set opt(nn_)          [expr $opt(nn) - 1] "
    (file "uamps.tcl" line 42)
luuh@ubuntu:~/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims$ ns uamps.tcl
can't read "opt(nn)": no such element in array
    while executing
"expr $opt(nn) - 1"
    invoked from within
"set opt(nn_)          [expr $opt(nn) - 1] "
    (file "uamps.tcl" line 42)
luuh@ubuntu:~/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims$
 
Old 05-17-2011, 09:26 AM   #70
helyos
LQ Newbie
 
Registered: May 2011
Posts: 28

Rep: Reputation: 3
@keepwalking: I have no ideea on post #69 . Sorry

Did you manage to remove those warnings when you execute ./test?
 
Old 05-17-2011, 09:33 AM   #71
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
@helyos

I tried to run sudo chmod 77 -R ns-allinone-2.34 but I got the following error can you please help me to solve this problem.


Code:
luuh@ubuntu:~/ns-allinone-2.34/ns-2.34$ sudo chmod 777 -R ns-allinone-2.34
chmod: cannot access `ns-allinone-2.34': No such file or directory
luuh@ubuntu:~/ns-allinone-2.34/ns-2.34$
 
Old 05-17-2011, 09:40 AM   #72
helyos
LQ Newbie
 
Registered: May 2011
Posts: 28

Rep: Reputation: 3
keepwalking:

You are in /ns-2.34 and this is is why it's not working. You must be into the home folder of the ns-allinone-2.34 .
So if you are in the /ns-2.34 folder:

$cd ..
$cd ..
$sudo chmod 777 -R ns-allinone-2.34

Try this.
 
Old 05-17-2011, 11:25 PM   #73
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 261Reputation: 261Reputation: 261
keepwalking,

I had the same problem .... but as i run on windows/cygwin, i just switched to the admin user.
So, the problem for sure is due to your folders not being writable (am speaking from a windows point of view) ....
 
Old 05-17-2011, 11:26 PM   #74
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 261Reputation: 261Reputation: 261
keepwalking (post #69)

Your error is because you are trying to run uamps.tcl. that is not the file to run. You have to run leach_test.
 
Old 05-17-2011, 11:33 PM   #75
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 261Reputation: 261Reputation: 261
helyos,

i had removed all the warnings.

1. Make sure the bind code is there in wireless-phy.cc
2. Add the commands in uamps.tcl

i think there was something else i did ... check the tcl-object.tcl file. I remember i followed instructions from there.

Got it !
You need to set the variables in \tcl\lib\ns-default.tcl also ::

Code:
# ------------------------------------------------------
Phy/WirelessPhy set alive_ 1
Phy/WirelessPhy set Efriss_amp_ 100e-12
Phy/WirelessPhy set Etwo_ray_amp_ 0.013e-12 

Phy/WirelessPhy set EXcvr_ 50e-9
Phy/WirelessPhy set sleep_ 0
Phy/WirelessPhy set ss_ 1 
Phy/WirelessPhy set dist_ 0
# ------------------------------------------------------
Let me know if the warnings are removed now
 
  


Reply

Tags
leach, leach-deepa#774, leach-warning50, 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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration