LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-15-2014, 07:12 AM   #1
muthana
Member
 
Registered: Oct 2013
Posts: 61

Rep: Reputation: Disabled
gpsr


Hi, I patch by this way and the result is
muthana@muthana:~$ cd my-ns-allinone-2.33/
muthana@muthana:~/my-ns-allinone-2.33$ cd ns-2.33/
muthana@muthana:~/my-ns-allinone-2.33/ns-2.33$ ./ns-2.33-hls-patch.sh
patching file common/agent.h
patching file common/ip.h
patching file common/mobilenode.h
patching file common/packet.h
patching file gpsr/gpsr.cc
patching file gpsr/gpsr.h
patching file hls/cellbuilder.h
patching file hls/.directory
patching file hls/hls_advanced.cc
patching file hls/hls_basic.cc
patching file hls/hls_basic.h
patching file hls/hls.cc
patching file hls/hls.h
patching file hls/position.h
patching file hls/quadratic.cc
patching file hls/quadratic.h
patching file hls/README_HLS
patching file hls/utils/cp-n100-c400-15-98.tcl
patching file hls/utils/cp-n40-a40-t40-c4-m0
patching file hls/utils/evaluate.pl
patching file hls/utils/evFromdirectory.pl
patching file hls/utils/gls_evaluate.pl
patching file hls/utils/hls.tcl
patching file hls/utils/README.txt
patching file hls/utils/runfromdirectory.pl
patching file hls/utils/run_small.bat
patching file hls/utils/run.tcl
patching file hls/utils/sc-x2000-y2000-n100-s30-t100-MRD
patching file hls/utils/sc-x2000-y2000-n40-s25-t40
patching file hls/utils/test_parameter.txt
patching file locservices/chc_caches.cc
patching file locservices/chc.cc
patching file locservices/chc.h
patching file locservices/gridlocservice.cc
patching file locservices/gridlocservice.h
patching file locservices/.#gridlocservice.h.1.4
patching file locservices/hdr_locs.cc
patching file locservices/hdr_locs.h
patching file locservices/locservice.h
patching file locservices/.#locservice.h.1.4
patching file locservices/ls_queued_timer.cc
patching file locservices/ls_queued_timer.h
patching file locservices/ls_timer_heap.h
patching file locservices/omnilocservice.cc
patching file locservices/omnilocservice.h
patching file locservices/realocservice.cc
patching file locservices/realocservice.h
patching file mac/mac-802_11.cc
patching file mac/mac-802_11.h
patching file mac/mac.h
patching file Makefile.in
patching file mobile/geo_util.cc
patching file mobile/geo_util.h
patching file mobile/god.cc
patching file mobile/god.h
patching file queue/priqueue.cc
patching file queue/priqueue.h
patching file tcl/lib/ns-default.tcl
patching file tcl/lib/ns-lib.tcl
patching file tcl/lib/ns-mobilenode.tcl
patching file tcl/lib/ns-packet.tcl
patching file tcl/mobility/gpsr.tcl
patching file trace/cmu-trace.cc
patching file trace/cmu-trace.h
patching file Makefile

and I tried to implement hls.tcl and I have this problem

muthana@muthana:~$ cd Desktop
muthana@muthana:~/Desktop$ ns hls.tcl
invalid command name "Agent/GPSR"
while executing
"Agent/GPSR set bdesync_ 0.5 "
(file "hls.tcl" line 6)
make: *** [trace/trace.o] Error 1

please can any one help me to solve this problem
thanks
 
Old 03-17-2014, 03:38 AM   #2
muthana
Member
 
Registered: Oct 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
Hi, Sir I install ns2 and I need to implement this hls.tcl I have this problem can you help me

muthana@muthana:~/Desktop$ ns hls.tcl
invalid command name "Agent/GPSR"
while executing
"Agent/GPSR set bdesync_ 0.5 "
(file "hls.tcl" line 6)

thank's
 
Old 03-17-2014, 03:39 AM   #3
muthana
Member
 
Registered: Oct 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
gpsr

Please any one help me to solve this problem

muthana@muthana:~/Desktop$ ns hls.tcl
invalid command name "Agent/GPSR"
while executing
"Agent/GPSR set bdesync_ 0.5 "
(file "hls.tcl" line 6)

thank's
 
Old 03-17-2014, 06:56 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post #1 shows that you are not building "ns-hls".

The build instructions, post #23 here ..
http://www.linuxquestions.org/questi...526/page2.html
I.e. for a 32bits Ubuntu version 11.04 .. 13.10 it is :
a) $ cd ns-allinone-2.33/ns-2.33/ && patch -p1 < ns-2.33-hls.patch
b) $ tar xvf hls-files-ns233.tar.gz && cd ../
c) $ export CC=gcc41 CXX=g++41 && ./install

Then : $ cd ns-2.33/
$ cp ns ns-hls (Or whatever <ns-new-name> you want.)
$ sudo cp ns-hls /usr/local/bin/
... Only then you are sure using the right "ns<-??>".
Run the simulation with $ ns-hls ssoumayaa.tcl
.. etc. etc. from the examples, gpsr-hls-examples-0113.tar.gz
https://drive.google.com/file/d/0B7S...it?usp=sharing

Please read * http://www.linuxquestions.org/questions/tags/gpsr-hls/
* http://www.linuxquestions.org/questions/tags/gpsr/

-

Last edited by knudfl; 03-20-2014 at 01:18 PM.
 
Old 03-17-2014, 09:01 AM   #5
muthana
Member
 
Registered: Oct 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
dear I use the ubuntu 12.04 and the ns-2.33 and I implement many examples in ns if you like to see the result of the example I ready to sent it for you. I need only to skip this problem

muthana@muthana:~/Desktop$ ns hls.tcl
invalid command name "Agent/GPSR"
while executing
"Agent/GPSR set bdesync_ 0.5 "
(file "hls.tcl" line 6)

Thank you Sir for every thing
 
Old 03-17-2014, 01:05 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 5 .
Quote:
.. I implement many examples in ns ..
I know , I read all the ns2 posts.

""invalid command name "Agent/GPSR" : Means you are using a wrong 'ns'.
If you build more than one ns2-<version>, or two times ns-2.33,
you will have to use a copy of the executable 'ns' with a new name. Read post #4.
* There can only be one file by name 'ns' : /usr/local/bin/ns
* You can of course use $ ./ns file.tcl , if 'ns' is the right version.

""invalid command name "Agent/GPSR" : Can also mean a failed build.
There is no other way than the method in post #4.
The package 'hls-files-ns233.tar.gz' must be used, to fill in the files
that the unreliable "Ubuntu patch command" misses.

-

Last edited by knudfl; 03-17-2014 at 01:06 PM.
 
Old 03-18-2014, 05:19 AM   #7
muthana
Member
 
Registered: Oct 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
Mr. knudfl I did all the step that you send and the same problem

please what I can do

Thanks for your help
 
Old 03-18-2014, 06:59 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 7 .

Which command are you using for the simulation ?
? $ ns-hls ssoumayaa.tcl ? Or ?

? Do you use 'ns' as plain $ ns <file>
* Please don't do that.

* Did you ever add any *PATH text to .bashrc ? → Delete, please. Never required.


Anyway, you do not have to build ns2 with gpsr-hls.
( You don't actually build all the other applications, that you use in Ubuntu.)
Just install the package 'gpsr-hls-2.33-ubuntu10_i386.deb' , 4.5 MB
http://www.ijceronline.com/papers/Vo...O023704711.pdf
.. which works with all 32bits Ubuntu versions 10.04 ... 13.10 .

-

Last edited by knudfl; 03-18-2014 at 07:01 AM.
 
Old 03-18-2014, 08:35 AM   #9
muthana
Member
 
Registered: Oct 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
Dear Sir for patch I did this steps
Applying the patch
----------------------

Copy the following files into your "ns-allinone2.33/ns-2.33/" directory:
- ns-2.33-hls-patch.sh
- ns-2.33-hls.patch
- ns-2.33-hls.Makefile.patch

Change to your "ns-allinone2.33/ns-2.33/" directory.
Execute the patch:
[you@ns-2.33]$ ./ns-2.33-hls-patch.sh
patching file common/agent.h
patching file common/ip.h
...
without this
For fresh install (if you didn't install ns2 yet),
change to your "ns-allinone2.33" directory and install it:
[you@ns-allinone2.33]$ ./install

Else, stay in your "ns-2.33" directory to 'make clean' and 'make':
[you@ns-2.33]$ make clean
[you@ns-2.33]$ make

Done!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
and my path is

# LD_LIBRARY_PATH
OTCL_LIB=/home/my-ns-allinone-2.33/ns-2.33/otcl-1.13
NS2_LIB=/home/my-ns-allinone-2.33/ns-2.33/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/my-ns-allinone-2.33/ns-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/my-ns-allinone-2.33/ns-2.33/bin:/home/my-ns-allinone-2.33/ns-2.33/tcl8.4.18/unix:/home/my-ns-allinone-2.33/ns-2.33/tk8.4.18/unix
NS=/home/my-ns-allinone-2.33/ns-2.33/
NAM=/home/my-ns-allinone-2.33/ns-2.33/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

Thanks
 
Old 03-18-2014, 09:25 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 9 .

Is there a question in post #9 ?
Did the simulations work, when you did as post #9 describes ?

-
 
Old 03-18-2014, 10:36 AM   #11
muthana
Member
 
Registered: Oct 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
No question, but I need to show you what I do for the patch and path in my installation .
The simulations not work the result at #5

Thank you Sir again
 
Old 03-18-2014, 12:24 PM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 11 .

Well, you should know that the post #9 outdated method doesn't work in Ubuntu,
when you have read http://www.linuxquestions.org/questions/tags/gpsr-hls/
and http://www.linuxquestions.org/questions/tags/gpsr/

There would be no reason to invent the new method, if the old one still worked with Ubuntu.

And : The old 1997..1999 text ""Please put .. /You must put ... /"IMPORTANT NOTICES:" /""
makes no sense :
The executable 'ns' is now (at least since ns-2.26) hard coded to know the library locations,
... and xgraph never builds in ns2 , and nam probably fails, etc. etc.

A successful ns2-hls build : Read post #4 : "The method that never fails".

-

Last edited by knudfl; 03-18-2014 at 12:32 PM.
 
Old 04-14-2014, 12:34 AM   #13
muthana
Member
 
Registered: Oct 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
Dear Sir knudfl
please can you help me for how I can find the code of wak for the GPSR protocol

Best regard
 
Old 04-14-2014, 03:15 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 13 .

Do you mean awk ? ?
 
Old 04-14-2014, 04:24 AM   #15
muthana
Member
 
Registered: Oct 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
sorry this is my mistake for print. Yes sir

---------- Post added 04-14-14 at 04:24 AM ----------

I mean awk
 
  


Reply

Tags
gpsr, gpsr-hls, 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] GPSR on NS2.34 farfattou Linux - Software 17 01-10-2015 08:29 AM
GPSR tcl farfattou Linux - Software 0 06-21-2013 07:44 PM
GPSR in VANET Darshana.yadav@gmail.com Linux - Newbie 2 10-19-2012 01:44 AM
GPSR installation mrohini Linux - Networking 1 10-15-2012 04:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:58 PM.

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