LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to patch GPSR routing protocol to ns-2.34 (https://www.linuxquestions.org/questions/linux-software-2/how-to-patch-gpsr-routing-protocol-to-ns-2-34-a-878526/)

Menik 04-08-2012 09:58 PM

Error With GPSR
 
HI ALL,
If anyone solve this error.
Please Let me know how ? Thanks

invalid command name "Agent/GPSR"
while executing
"Agent/GPSR set planar_type_ 1 "
(file "wireless-gpsr.tcl" line 112)

monikagoyal 04-09-2012 06:17 AM

I m using ns2.33 on fedora 14.

I m trying the same way u told bt i m getting the error:
patch: **** rejecting target file name with ".." component: ../ns-2.33-hls_working/ns-2.33/common/agent.h

Quote:

Originally Posted by knudfl (Post 4597147)
Post #10.

Which Ubuntu version are you using ? ?
And what is it you can't get to work ?
http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html



http://www.cn.uni-duesseldorf.de/alu.../hls-ns2-patch
> ns2.33-hls-patch.tar.gz > ns-2.33-hls.patch

1) cd ns-allinone-2.33/2.33/ && patch -p1 < ns-2.33-hls.patch
2) cd ../ && ./install : No errors.
EDIT : Ubuntu : Please see post # 23.

.


monikagoyal 04-09-2012 06:19 AM

I m also getting the same error.

Plz help me if u got any solution. I really want to implement it as soon as possible.
Anyone plz help regarding this error.
Quote:

Originally Posted by Menik (Post 4648001)
HI ALL,
If anyone solve this error.
Please Let me know how ? Thanks

invalid command name "Agent/GPSR"
while executing
"Agent/GPSR set planar_type_ 1 "
(file "wireless-gpsr.tcl" line 112)


monikagoyal 04-09-2012 08:36 AM

Hi nimacasino

As u said u have successfully installed gpsr on ns2.34, can u plz help me with the running code of gpsr for ns2.33 or ns2.34 or ns2.35.
I have installed all of these on diff systems.

Plz mail me the code as soon as possible.
It'll be a great help.
I hope u can understand my problem.
Plz mail me at: goyal.monika23@gmail.com
Quote:

Originally Posted by nimacasino (Post 4345060)
first of all thank you for your kind

Dear Knudfl, problem solved!
I handled this problem using the guidance of this webpage : http://www.cs.binghamton.edu/~kliu/r...ode/index.html
It worked and now i am happy. :)


Menik 04-10-2012 01:44 AM

GPSR error
 
HI monikagoyal,
Did you solve the error ?
If you have done so please let me know how. It will be a great help
Thanks,

monikagoyal 04-10-2012 02:03 AM

I m still struggling to find the solution.
Its a request to everybody having some knowledge about it plz help us.
We are nt able to move further bcoz of this error.
Plz reply.

monikagoyal 04-10-2012 04:27 AM

Error after running the patch
 
I did everything as u said for patch.
I did make clean and make both. There z no error.
But when i run, ns hls.tcl it gives following error:
num_nodes is set 40
Configuring Nodes (40)
INITIALIZE THE LIST xListHead

(_o18 cmd line 1)
invoked from within
"_o18 cmd port-dmux _o31"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o18" line 2)
(SplitObject unknown line 2)
invoked from within
"$agent port-dmux $dmux_"
(procedure "_o15" line 11)
(Node/MobileNode add-target-rtagent line 11)
invoked from within
"$self add-target-rtagent $agent $port"
(procedure "_o15" line 36)
(Node/MobileNode add-target line 36)
invoked from within
"$self add-target $agent $port"
(procedure "_o15" line 15)
(Node attach line 15)
invoked from within
"$node attach $ragent [Node set rtagent_port_]"
(procedure "_o3" line 95)
(Simulator create-wireless-node line 95)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;# disable random motion
set ragent [$node_($..."
(file "hls.tcl" line 132)
Quote:

Originally Posted by knudfl (Post 4624998)
# 18 : cd ns-allinone-2.33/ns-2.33/hls/utils/ && ./ns hls.tcl
Code:

num_nodes is set 40
Configuring Nodes (40)
INITIALIZE THE LIST xListHead
Starting Simulation...
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
radiorange 250, x 2000 y 2000
length : 3.000000 , cellperline 12 , heigth 3.000000
maxlevel 3
SORTING LISTS ...DONE!
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
        _o31: no target for slot 0
        _o31 type: Classifier/Port
content dump:
classifier _o31
        0 offset
        0 shift
        2147483647 mask
        1 slots
                slot 255: _o33 (CMUTrace/Recv)
---------- Finished standard no-slot{} default handler ----------



Menik 04-10-2012 04:33 AM

GPSR - Error
 
These variables with bind function of the C++ files.
But cant figure out any error with that.
It is not because of missing any config file.
I have no idea. Please anyone try to solve this error.
On other websites as well error is there.
But no solusion.
GPSR code is compiling. This is when executing the tcl file
(wireless-gpsr.tcl)
It does not identifying Agent\GPRS whis is returned by the
TCLClass in C++.


Can anyone guess what it is ? Is it because of OS ?
or NS2 installation or anything else ?

Please any ideas are highly appreciated.

monikagoyal 04-10-2012 04:40 AM

m also getting the same error with this code.
nt able to fix it.

Menik 05-04-2012 02:09 AM

Global variables in NS2
 
Hi All,
Is anyone know how to define a global varible that every node could access ?
For example for the whole network - to calculate the energy.

Not for each node. I know how to do that. But I want to get the total cost ot tatal energy
consumption for the network.
Thanks All . Please help me

marco1.st 07-12-2012 07:50 AM

Dear muaz.sh
I follow the step that you write for the gpsr patch for ns2.34,
but I have a problem with the file cmu-trace.cc.
have you got the right cmu-trace.cc for ns2.34 because without it the protocol can not work well.

marco1.st 07-12-2012 08:03 AM

have you got the right cmu-trace to integrate GPSR in ns2.34
because without it the protocol can not work well

sukhalid 10-07-2012 12:39 PM

Hi,
I have patched ns2.35 fro GPSR using Keliu code. Every thing works fine, Other nam is working right with other tcls.
secondly, why we need

for {set i 0} {$i < $opt(nn) } {incr i} {
gpsr-create-mobile-node $i
$node_($i) namattach $namfile


}

can simply create node

for {set i 0} {$i < $opt(nn) } {incr i} {

$ns node_($i) [$ns node $i]
$node_($i) namattach $namfile

create-gpsr-routing-agent $node $id

}

Regards

Quote:

Originally Posted by muaz.sh (Post 4624286)
Hi there
I am using ns2.34 the following steps are workable to include Keliu GPSR implementation which could be downloaded from http://www.cs.binghamton.edu/~kliu/r...ode/index.html:
1- follow the three steps you find in the readme, but at step "2" you need to follow "or sentence" i.e you need to modify the files rather than replace them, here you will find some structural difference between Keliu files and ns2.34 files but all you need to do is to do the simple modifications which are mentioned within step "2" of the readme.txt file
2- after you performe step 3 i.e recompilation of ns2.34 "it should be error free" then you can test wireless-gpsr.tcl
3- if you want to get workable nam file i.e. with moving nodes rather than constant ones replace the following for loop:
for {set i 0} {$i < $opt(nn) } {incr i} {
gpsr-create-mobile-node $i
}
with this one:
for {set i 0} {$i < $opt(nn) } {incr i} {
gpsr-create-mobile-node $i
$node_($i) namattach $namfile #This command is used to attach the namtrace file descriptor <namtracefd> to the mobilenode. All nam traces for the node are then written into this namtrace file.
}

I also replaced the following command:
$ns_ namtrace-all $namfile
with this one:
$ns_ namtrace-all-wireless $namfile $opt(x) $opt(y)

I hope this helps all who need to integrate GPSR with ns2.34


arjunjoshi89 11-04-2012 11:25 AM

gpsr error in ns2.23
 
Hi All,
I want to work on GPSR on ns-2.33. I have installed ns2-hls-patch. when i am running tcl file with protocol gpsr it gives me following lines:
num_nodes is set 2
INITIALIZE THE LIST xListHead
Starting Simulation...
radiorange 250, x 500 y 500
length : 1.000000 , cellperline 3 , heigth 1.000000
maxlevel 1
radiorange 250, x 500 y 500
length : 1.000000 , cellperline 3 , heigth 1.000000
maxlevel 1
SORTING LISTS ...DONE!

I have defined cbr traffic but i am not getting any received packets for this case and nam file is not showing any transfer of packet. Nodes are only moving. so what can be error for this case ? please help me regarding this case.Please mail me on arjunjoshi89@gmail.com

ssoumayaa 12-18-2012 06:21 AM

Hello everybody,

i have a problem to use gpsr as a routing protocol but wireless-gpsr.tcl and hls.tcl are working very well !! i really want to know what is the problem with my tcl file ... if anyone can help me it will be great because it is really urgent and i don't know what to do please help me pleaaaaaase

when i run my .nam file i find that there is no any transmission of packet between nodes ...


help me please


All times are GMT -5. The time now is 05:57 PM.