LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   NS2: Using GPSR , VANET simulation (https://www.linuxquestions.org/questions/linux-software-2/ns2-using-gpsr-vanet-simulation-4175440313/)

knudfl 12-18-2012 10:09 AM

# 15

Everything is OK, don't worry. You will not have to delete anything :
All the questions and your information is OK.


When I find the time, I will have a look at ns-2.33-hls
... and your tcl file.

I have made ns-2.33-hls once ( this year ) : # 11, # 23 :
http://www.linuxquestions.org/questi...4-a-878526/#11

.

ssoumayaa 12-18-2012 10:14 AM

thanks for your kindness but please try to help me as soon as possible because i have to make my tcl script work in 2 days maximum ...
about your posts # 11, # 23 in http://www.linuxquestions.org/questi...4-a-878526/#11, I already have seen them and it was really helpful to make hls.tcl work . .. but as i have explained to the problem now is how to use GPSR as a routing protocol to simulate a vehicular ad hoc network .... i need an exemple of tcl script to understund how does it work !!because i couldn't make my tcl script work till the moment ....


Thank you in advance

knudfl 12-18-2012 12:52 PM

# 13, the tcl files : ( "ssoumayaa.tcl" depends on changjing1.tcl )

Code:

$ ./ns ssoumayaa.tcl
num_nodes is set 2
INITIALIZE THE LIST xListHead
Starting Simulation...
radiorange 250, x 2000 y 500
length : 3.000000 , cellperline 12 , heigth 1.000000
maxlevel 3
radiorange 250, x 2000 y 500
length : 3.000000 , cellperline 12 , heigth 1.000000
maxlevel 3
SORTING LISTS ...DONE!

... And the files fangzhen1.nam (110.5 kB), fangzhen1.tr (174.8 kB) are created.
$ nam fangzhen1.nam : Nam opens. They play button will start some "animation".

.

ssoumayaa 12-18-2012 12:58 PM

thanks for your help, i have also the same result but there is now real transmission of packets between nodes if you read the tr file or execute the nam file ... if the tcl script works and there is generation of tr and nam files does this mean that the tcl script is correct ?

knudfl 12-18-2012 01:12 PM

# 19 .

Something is working.
But not much activity in the "nam visualized simulation."

Understanding what's happening. One could say the usual :
A week or two to learn how to build ns2 with a patch.
And 3 months? to learn how to use ns2.
.. And sorry, I only understand very little about the many ns2 functions.
I am mostly building the "package" only.
And can make a few edits in a tcl file. ( I am not a coder.)

.

ssoumayaa 12-18-2012 01:24 PM

ok thank you for your help

info_mimi 02-26-2013 10:11 AM


Posts: 23

Rep: Reputation: Disabled

hi all , hope you all fine , i run gpsr protocol on my file tcl with " ns-hls ", but the trace file , have another format , so i cant apply my scripts awk , and this an extract of my trace file

Code:


M 5.00000 42 (289.27, 817.09, 0.00), (288.98, 815.93), 1.19
s 5.043290218 _1_ AGT  --- 48 cbr 512 [0 0 0 0] ------- [1:0 2:0 32 0] [11] 0 0
r 5.043290218 _1_ RTR  --- 48 cbr 512 [0 0 0 0] ------- [1:0 2:0 32 0] [11] 0 0
SB 5.04329 _1_ stuck into send buff 1 -> 2
HLS_H_s  5.065642879380 24 <9 792.00 264.00> -> <14 792.00 440.00> 1
HLS_H_fr  5.065642879380 24<-24 [817.01 290.75 <9>] <14 792.00 440.00> 1

my question is , should i modify my awk script ? and if its the only way to resolve my problem , what mean
HLS_UPD_s , HLS_UD_fr and is there a difference between them and s , r ( i talk about the beginning of each line of my trace file)

or i should find another awk script special to gpsr routing protocol ,?

i'm confused , plz help , and thanks in advance .

tunerhuei 03-06-2013 08:59 PM

hi, all, I have install the gpsr protocol (KeLiu version) on my NS-2.35, Ubuntu10.04LTS
no error or other messeges after make command

when running the wireless-gpsr.tcl in the package
($ns wireless-gpsr.tcl)
i got following output,
Code:

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!
98 - arpresolve
89 - arpresolve
51 - arpresolve
79 - arpinput
        op: 1, sha: 59, tha: 0, spa: 59, tpa: 63
88 - arpinput
        op: 1, sha: 59, tha: 0, spa: 59, tpa: 63
99 - arpinput
        op: 1, sha: 59, tha: 0, spa: 59, tpa: 63
98 - arpinput
        op: 1, sha: 59, tha: 0, spa: 59, tpa: 63
78 - arpinput
        op: 1, sha: 59, tha: 0, spa: 59, tpa: 63
69 - arpinput
        op: 1, sha: 59, tha: 0, spa: 59, tpa: 63
...
...

such like this, not all output
it is the right output?
and what is the meaning of these output?
thanks!

knudfl 03-11-2013 04:56 AM

Post # 23, @tunerhuei : Welcome to LQ.

The output is OK.

anisabutsi 03-12-2013 07:02 AM

hello, ssoumayaa #1

can you share patch GPSR routing protocol to implementation in NS2?

I have final project same with you about Vanet using GPSR.

please help me,

knudfl 03-12-2013 07:40 AM

# 25, @anisabutsi.

All patches are linked in post # 5.

GPSR-hls examples, including the ssoumayaa code,
ssoumayaa-0.tcl, ssoumayaa.tcl, changjing1.tcl : gpsr-hls-examples-0113.tar.gz
https://docs.google.com/file/d/0B7S2...it?usp=sharing

-

anisabutsi 03-12-2013 08:12 AM

thank you :)

prashant.adhao 04-02-2013 04:11 AM

I got the GPSR patch and also it working well...please can anybody help me to use GPCR routing protocol to simulate a vehicular ad hoc network ???
from where i got the patch for it..????

mido123 05-26-2013 04:55 PM

Quote:

Originally Posted by ssoumayaa (Post 4851613)
Hello, Thanks for your reply but i know all these links and i already patched GPSR on ns-2.33 but the probleme is how to use it for simulation ???

hello im installing the patch of ns2.33 from
http://www.cn.uni-duesseldorf.de/alu.../hls-ns2-patch
but when i test with hls.tcl i get

invalid command name "Agent/GPSR"
while executing
"Agent/GPSR create _o3 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/GPSR"
invoked from within
"set gpsr [new Agent/GPSR]"
(file "hls.tcl" line 4)
can you help me to find problem

Bara 12-17-2013 03:05 AM

VANET scenario of city and highway environment
 
Dear friends,

Im looking for scenario in NS2 of VANET in both city and highway environments.

your assistant will be most appreciated

Bara


All times are GMT -5. The time now is 03:35 AM.