How to patch GPSR routing protocol to ns-2.34
Hey guys!
I need to patch the GPSR routing protocol to ns-2.34 (ns-allinone-2.34), but i dont know how. could anyone help me, please? Thank you all in advance for your time |
Welcome to LQ.
I don't know of any "GPSR routing protocol patch" for ns-2.34. The available patches are for ns-2.29 and ns-2.33 http://www.cn.uni-duesseldorf.de/alu.../hls-ns2-patch Suggest : Start with ns-allinone-2.33, and when everything works, you can give ns-2.34 a try. ( It may work ? ) It is no problem having 2 .. 8 different ns-allinone-2.xx installed at the same time. But do not add any of them to a path : Is usually not required since ns-2.26. .. |
@ knudfl
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. :) |
Hi nimacasino,
I also did install gpsr in ns2.34 and the included example works fine. But when I just include gpsr as routing protocol in my own simulation code it give plenty of errors. I guess I have to include many tcl parameters for the gpsr to work. Can you help me out with this? Thank You Vineeth |
hi guys
I have the same problem, would u plz give me a direct link to download patch gpsr for ns2.34, i couldnt use the websites above to solving my problem to downloading this patch... tnx alot Parastoo |
Want to measure mobility
dear nimacasino,
Can you please tell me the steps for using gpsr in ns2? I am new to ns2 and want tot simulate mobility. can you please guide me for that....if possible pls send some notes or code on my id itishi00@yahoo.com Thanks in advance |
GPSR on NS 2.33
Hi,
I have successfully integrated the Ke Liu's GPSR implementation in to NS-2.33 and the example which he has given for 100 stationary nodes are working fine and the packet delivery ration is 100%. When I tried this code for 50 mobile nodes then it does not work properly. The sources keep dropping packets and for CBR connections the packet delivery ratio becomes as low as 10% at times. has anyone tried this before!! Any one knows how to make this properly! I have spent lot of time on this please help me if you can! Cheers Prasad |
hi
can anybody help me patching gpsr in ns2.34
please help me |
Post #7, @yashu.
You can have as many versions of ns-allinone-2.xx as you want, installed at the same time. But do not any of them to a *PATH. The latest gpsr patches are for ns-2.33 only. . |
ok , i installed ns2.33, tried to execute , code is not complete, could u help me
|
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. . |
Dear All,
As I found this is the only thread on the internet discussing the integration of GPSR with ns-2.34, so please let us lock it successfully. I have tried and modified many files of ns2 and Ke Liu`s implementation following the steps as nimacasino mentioned, after recompilation every thing goes well, but when I applied GPSR over the nodes, in nam these nodes do not move, any suggestion to solve this? Regards, |
Hello
im new to NS2 and im working on VANET i need to work on GPSR routing protocol i found this topic very useful i need help in getting source code for GPSR and how to patch if possible anyone to help me in doing that and give me the steps |
Post #13, @mdkhasawneh : Welcome to LQ.
Please read post # 11. And follow the link to the ns-2.33-hls.patch. |
thanks knudfl
i follow the steps in Post #11 but i get many errors and later this error make:***[trace/cum-trace.o] error 1 Ns make failed! can you please help me to solve this error |
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 |
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 |
Dear muaz.sh can you help me
i add the patch for GPSR in Ns 2.33 and no errors but when i run the command ns hls.tcl i get the following error invalid command name "Agent/GPSR" while executing "Agent/GPSR set bdesync_ 0.5 " (file "hls.tcl" line 6) |
# 18 : cd ns-allinone-2.33/ns-2.33/hls/utils/ && ./ns hls.tcl
Code:
num_nodes is set 40 |
Dear knudfl i did the command
cd ns-allinone-2.33/ns-2.33/hls/utils/ && ./ns hls.tcl but after it run i get the error invalid command name "Agent/GPSR" while executing "Agent/GPSR set bdesync_ 0.5 " (file "hls.tcl" line 6) is there is any solution for this error? |
# 20
The ns-2.33 build with the patch is very easy ,,, see post # 11. Either you are using an unpatched 'ns'. Or your build failed. Which OS are you using ? ? Version ? Read the links, also post # 11. Is it 32bits ? 64bits ? The 'uname -m' command will tell. . |
Dear knudfl im using ubunto 10.04 from Vbox
i run uname -m command and it give me i686 is this mean 64-bit? and if it 64-bit how can i install 32-bit on my machine. thnaks, |
# 22 : i686 is 32bits = The best choice.
I had the usual issues with the Ubuntu patch command (ns2 patches.) An exit with no errors, but not all files were in the right location. → The missing files can be unpacked from "hls-files-ns233.tar.gz": https://docs.google.com/open?id=0B7S...alV2SGhJdk1hQQ This worked on Ubuntu 10.04 : sudo apt-get install g++-4.1 cd ns-allinone-2.33/ns-2.33/ && patch -p1 < ns-2.33-hls.patch && tar xvf hls-files-ns233.tar.gz && cd ../ && export CC=gcc-4.1 CXX=g++-4.1 && ./install hls.tcl : cd ns-allinone-2.33/ns-2.33/hls/utils/ && ../../ns hls.tcl → An OK result. Almost identical to post # 19. . |
hi
hi
Am working on vanet routing , i want to change MAC layer to 802.11p, can u help to include this into my tcl file |
Dear mdkhasawneh,
I did not try to use ns2.33 and the patch you use.However; I guess you did not install the patch correctly, because this error is the same as you did not include the header file of gpsr, so the compiler will not find the command. I suggest you reinstall the patch following steps mentioned in the Readme file strictly. |
Quote:
can you help me to run GPSR using NAM i want to have animation for the protcol. |
Dear muaz.sh i applied the steps in post # 17
to Keliu GPSR implementation but after run ns wireless-gpsr.tcl i get this: num_nodes is set 100 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl GPSR configuration file INITIALIZE THE LIST xListHead Loading connection pattern... Loading scenario file... Load complete... Starting Simulation... channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 129.2 SORTING LISTS ...DONE! NS EXITING... and also nothing showed on the screen no animation. is there is anything missing in my code i already modify wireless-gpsr.tcl accourding to post #17. |
#27
Some tcl files will include a command to open a nam window. All other tcl scripts, that create an <out.nam> file : Nam is to be run afterwards : nam out.nam |
Dear knudfl how can i modify wireless-gpsr.tcl to run nam animation
i will post the content of the tcl file: Code:
# Copyright (c) 1997 Regents of the University of California. |
Post #29 : Please hit the 'Edit' button in post #29 and edit to CODE Tags.
Write [/code] at code text end, and [code] at code start. Or use the # button in the 'Advanced Editor'. Post # 17 indicates that a nam file should be generated. Why not use that file ? ? nam <file.nam> . |
Dear knudfl im totaly new to NS2
for this reason i post the tcl to get help in modifying the file to run NAM. can you tell me what to do? |
@27 this message refers that you have successfully integrated the GPSR implementation with ns2. in order to run nam animation, wireless-gpsr.tcl puts the traces files in the same folder, these files are trace.tr and nam.out.tr, so if you need to run the animation of this file you need to use the terminal and execute this command:
nam nam.out.tr |
Dear muaz.sh after execute this command:
nam nam.out.tr and by play the nam i get this in terminal and nothing at nam |
are you sure you did not modify the wireless-gpsr.tcl or any other file?
|
Dear muaz.sh i just modify wireless-gpsr.tcl accourding to post #17
can you send me the correct wireless-gpsr.tcl for runing the nam? |
Dear mdkhasawneh,
nam is just an another program like ns, so if you need to run it you must call it from shell: nam <nam trace file>, or you can run it from within tcl script by this command: exec nam <nam trace file> |
In order to surpass the problem of "node X is not defined" you need to add this loop after the definition of the nodes i.e after if { $opt(sc) == "" } statement:
for {set i 0} {$i < $opt(nn) } {incr i} { $ns_ initial_node_pos $node_($i) 10 } where $ns_ initial_node_pos node size command defines the node initial position in nam. <size> denotes the size of node in nam. This function must be called after mobility model has been defined. |
Hi nimacasino,
Could you please let me know how did you fix GPSR for NS2.34 ? I am also referring the link. However, thanking you if you can explain it in steps. Thanks in advance ! |
HI Mauz.sh,
Are the steps mentioned in #16 are valid for NS2.35 as well ? I am getting an error when i type "ns wireless-gpsr.tcl". Any help ? |
Hello i run GPSR Successfully from Keliu GPSR implementation.
when i run nam nam.out.tr i can see the radio range for nodes and transmission but the nodes are static and not moving. is this ok or nodes can be moving also. i have another problem in understanding the trace file format from nam.out.tr to represent the result in grapgh. it look different from the trace file format at http://www.cs.binghamton.edu/~kliu/r...ode/index.html i will attache some data from nam.out.tr and please if anyone can understand the format explain for me. Code:
look like Code:
|
Hi
When I run the same code with modifications ia m getting a run time error. mdkhasawneh, which NS2 version you are running and on which platform ? Thanks in advance. I am geting below runtime error for ns wireless-gpsr.tcl * glibc detected * ns: free(): invalid next size (fast): 0x08ede2f0 *** ======= Backtrace: ========= /lib/libc.so.6[0x5646c5] /lib/libc.so.6(cfree+0x59)[0x564b09] /lib/libc.so.6[0x51bf12] /lib/libc.so.6[0x51ac83] /lib/libc.so.6(setlocale+0x178)[0x51a688] ns[0x84d63ff] ns[0x8464965] ns(Tcl_FindExecutable+0x17)[0x84600d7] ns(Tcl_Main+0x32)[0x84942e2] ns(nslibmain+0x20)[0x8413de2] ns(main+0x22)[0x8413e3e] /lib/libc.so.6(__libc_start_main+0xdc)[0x510e9c] ns(__gxx_personality_v0+0x37d)[0x819b8b1] ======= Memory map: ======== 00200000-00201000 r-xp 00200000 00:00 0 [vdso] 004c6000-004d1000 r-xp 00000000 fd:00 3209017 /lib/libgcc_s-4.1.2-20080825.so.1 004d1000-004d2000 rwxp 0000a000 fd:00 3209017 |
Hi,
I have patched the Ke Liu's GPSR implementation in NS-2.34 ..but the nodes are not moving in nam....can any one help me ? |
Hi All,
Can anyone please explain how to get x, y coordinates on C++ code ? If anyone could please letme know a place I can find atleast an example. Thanks |
Hi All,
If anyone who is familier with the GPSR protocol and if you know how they print the X Y coordinates please explain how they have done it. I know it uses MobileNode.h hearder and call functions in that class. But from where do we pass the nodes to the C++ class ? Because most of the wireless examples (e.g. AODV), we define the adhoc routing protocol when configure the node. Please help me. Thanks, |
HI All,
Is there anyone who is working on WSN. I have some questions tobe clarified. Please send me an email to menikt@gmail.com and we can have a discussion. Thanks |
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) |
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:
|
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:
|
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:
|
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, |
All times are GMT -5. The time now is 10:28 PM. |