LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-27-2018, 09:43 AM   #1
iffrahtanseer
LQ Newbie
 
Registered: Oct 2018
Posts: 1

Rep: Reputation: Disabled
invalid command name "Resource/Energy"


I am trying to install mit leach protocol by following the steps mentioned in
https://www.nsnam.com/2015/05/leach-...in-ns2-ns.html

OS: Ubuntu 14.04 64 bit
Network Simulator: 2.35

But while i'm running the command ./leach_test, i'm seeing following in my leach.err 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/iffrahtanseer/ns-allinone-2.35/ns-2.35/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/iffrahtanseer/ns-allinone-2.35/ns-2.35/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/iffrahtanseer/ns-allinone-2.35/ns-2.35/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 18)
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 "/home/iffrahtanseer/ns-allinone-2.35/ns-2.35/tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig /home/iffrahtanseer/ns-allinone-2.35/ns-2.35/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 /home/iffrahtanseer/ns-allinone-2.35/ns-2.35/tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)


I need help regarding this problem. Since i'm new to Linux, I have seen previous threads on the same issue but i still can't resolve mine.
 
Old 11-08-2018, 01:07 PM   #2
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
Welcome to LQ.

The Leach https://www.nsnam.com/2015/05/leach-...in-ns2-ns.html for ns-2.35/ does not provide any usable results.

The safe choice is "leach+pegasis_ns234.patch.gz"
https://drive.google.com/file/d/0B7S...ew?usp=sharing
→ Ubuntu 10.04 - i386 is required, if you want to build the application yourself.

INFO : See posts #1007, #1009 here ...
https://www.linuxquestions.org/quest...68/page68.html

You can install a complete run time ns-2.34 + Leach :
leach-pegasis-ns_2.34-ubuntu10_i386.deb
https://drive.google.com/file/d/13P9...ew?usp=sharing
Install :
Code:
sudo gdebi Downloads/leach-pegasis-ns_2.34-ubuntu10_i386.deb
Or do a build :
Code:
tar xvf ns-allinone-2.34.tar.gz
cd ns-allinone-2.34/
patch -p0 < ns234_gcc49.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
zcat leach+pegasis_ns234.patch.gz | patch -p0
https://drive.google.com/file/d/0B7S...ew?usp=sharing
./install

cd ns-2.34/             // and check that 'ns' is present
ls ns
cp ns ns-leach                    // this is your backup
sudo cp ns-leach /usr/local/bin/

sudo make install   // 'make install' will copy 'ns' to /usr/local/bin/
 
  


Reply

Tags
leach, ns2



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
[SOLVED] erorr in leach.err (invalid command name "Resource/Energy) SAHO Linux - Software 26 01-15-2018 07:36 AM
Issue in Leach Protocol Installation : invalid command name "Resource/Energy" Hataki_Kakachi Linux - Software 26 01-02-2018 08:38 AM
Invalid Command Resource/Energy while running leach protocol on ns2.34 celiajohn Linux - Newbie 1 11-12-2015 05:37 AM
invalid command"Resource/Energy" in leach.err file of exidus-pegasis-leach-patch2 flowing_river Linux - Software 0 03-16-2015 06:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:02 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