LinuxQuestions.org
Review your favorite Linux distribution.
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-15-2017, 05:33 AM   #1
rendipras
LQ Newbie
 
Registered: Oct 2017
Posts: 5

Rep: Reputation: Disabled
need help GPSR Simulation


Hi,

I have patched GPSR to ns-2.35 using "hls" code. But i have problem, the packet data cannot receive to another node.

please help
 
Old 10-15-2017, 03:07 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,675

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by rendipras View Post
Hi,
I have patched GPSR to ns-2.35 using "hls" code. But i have problem, the packet data cannot receive to another node. please help
Help with what, exactly? Read the "Question Guidelines" link in my posting signature. You don't really tell us much of anything that would let anyone here help you. We only know you're using ns2.35...not version/distro of Linux, how you installed things, where you downloaded them from, what (if any) guides you followed, or how you patched the code and what you've written/done/tried so far.
 
Old 10-16-2017, 03:43 PM   #3
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
@rendipras, Welcome to LQ.

GPSR-hls simulation examples : gpsr-hls-ex_06.17.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing

Missing information: 1) The simulation file used.
2) OS specifications, like Ubuntu 16.04 - 64bits.

-
 
1 members found this post helpful.
Old 10-25-2017, 02:38 AM   #4
rendipras
LQ Newbie
 
Registered: Oct 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
@rendipras, Welcome to LQ.

GPSR-hls simulation examples : gpsr-hls-ex_06.17.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing

Missing information: 1) The simulation file used.
2) OS specifications, like Ubuntu 16.04 - 64bits.

-
1.Simulation file
Code:
## GPSR Options
Agent/GPSR set bdesync_                0.5 ;# beacon desync random component
Agent/GPSR set bexp_                   [expr 3*([Agent/GPSR set bint_]+[Agent/GPSR set bdesync_]*[Agent/GPSR set bint_])] ;# beacon timeout interval
Agent/GPSR set pint_                   1.5 ;# peri probe interval
Agent/GPSR set pdesync_                0.5 ;# peri probe desync random component
Agent/GPSR set lpexp_                  8.0 ;# peris unused timeout interval
Agent/GPSR set drop_debug_             1   ;#
Agent/GPSR set peri_proact_            1 	 ;# proactively generate peri probes
Agent/GPSR set use_implicit_beacon_    1   ;# all packets act as beacons; promisc.
Agent/GPSR set use_timed_plnrz_        0   ;# replanarize periodically
Agent/GPSR set use_congestion_control_ 0
Agent/GPSR set use_reactive_beacon_    0   ;# only use reactive beaconing
Agent/GPSR set planar_type_			   1   ;#1=GG planarize, 0= RNG planarize ****

set val(bint)           0.5  ;# beacon interval
set val(use_mac)        1    ;# use link breakage feedback from MAC
set val(use_peri)       1    ;# probe and use perimeters
set val(use_planar)     1    ;# planarize graph
set val(verbose)        1    ;#
set val(use_beacon)     1    ;# use beacons at all
set val(use_reactive)   0    ;# use reactive beaconing
set val(locs)           0    ;# default to OmniLS
set val(use_loop)       0    ;# look for unexpected loops in peris

set val(agg_mac)        1 ;# Aggregate MAC Traces
set val(agg_rtr)        0 ;# Aggregate RTR Trace
set val(agg_trc)		0 ;

set val(aggttrc)		ON;
set val(rtrtrc)			ON;
set val(mactrc)			ON;
set val(movtrc)			ON;

#define option

set val(chan)			Channel/WirelessChannel;
set val(prop)			Propagation/TwoRayGround;
set val(netif)			Phy/WirelessPhy;
set val(mac)			Mac/802_11;
set val(ifq)			Queue/DropTail/PriQueue;
set val(ll)			LL;
set val(ant)			Antenna/OmniAntenna;
set val(x)			4000; #sesuai maps
set val(y)			4000;
set val(ifqlen)			50;
set val(seed)			1.0;
set val(rp)			GPSR;
set val(nn)			105 ; #jumlah node
set val(sc)			"/home/rendi/Downloads/one_1.5.1-RC2/layang_pasupati_simulation_MovementNs2Report.txt" ;  #onesim mob
#set val(tr)			"/home/rendi/Desktop/ns-allinone-2.35/ns-2.35/trafik.tcl";  
set val(stop)			100.0  ;  #waktu simulasi
source 				"/home/rendi/Desktop/ns-allinone-2.35/ns-2.35/tcl/ex/802.11/IEEE802-11p.tcl"

Agent/GPSR set locservice_type_ 3

#Other default settings

puts "setting other default settings"

LL set mindelay_		50us
LL set delay_			25us
LL set bandwidth_		0;

Agent/Null set sport_		0
Agent/Null set dport_		0

Agent/CBR set sport_		0
Agent/CBR set dport_		0

Agent/TCPSink set sport_	0
Agent/TCPSink set dport_	0

Agent/TCP set sport_		0
Agent/TCP set dport_		0
Agent/TCP set packetSize_	512

Queue/DropTail/PriQueue set Prefer_Routing_protocols 1

#unity gain, omni

Antenna/OmniAntenna set X_	0
Antenna/OmniAntenna set Y_	0
Antenna/OmniAntenna set Z_	1.5
Antenna/OmniAntenna set Gt_ 1.0
Antenna/OmniAntenna set Gr_ 1.0


add-all-packet-headers
remove-all-packet-headers
add-packet-header Common Flags IP LL Mac Message GPSR  LOCS SR RTP Ping HLS

Agent/GPSR set bint_                  $val(bint)

# Recalculating bexp_ here
Agent/GPSR set bexp_                 [expr 3*([Agent/GPSR set bint_]+[Agent/GPSR set bdesync_]*[Agent/GPSR set bint_])] ;# beacon timeout interval
Agent/GPSR set use_peri_              $val(use_peri)
Agent/GPSR set use_planar_            $val(use_planar)
Agent/GPSR set use_mac_               $val(use_mac)
Agent/GPSR set use_beacon             $val(use_beacon)
Agent/GPSR set verbose_               $val(verbose)
Agent/GPSR set use_reactive_beacon_   $val(use_reactive)
Agent/GPSR set use_loop_detect_       $val(use_loop)

CMUTrace set aggregate_mac_           $val(agg_mac)
CMUTrace set aggregate_rtr_           $val(agg_rtr)


# seeding RNG
ns-random $val(seed)

#Main program

set ns_ [new Simulator]

set tracetr [open gpsr2.tr w]
$ns_ trace-all $tracetr

set tracenam [open gpsr2.nam w]
$ns_ namtrace-all-wireless $tracenam $val(x) $val(y)

set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)

set god_ [create-god $val(nn)]
set chan_1_ [new $val(chan)]


#global setting (node)
$ns_ at now
$ns_ node-config 	-adhocRouting 	$val(rp) \
					-llType 		$val(ll) \
					-macType 		$val(mac) \
                 	-ifqType 		$val(ifq) \
                 	-ifqLen 		$val(ifqlen) \
                 	-antType 		$val(ant) \
                 	-propType 		$val(prop) \
                 	-phyType 		$val(netif) \
                 	-channelType 	$val(chan) \
		 			-topoInstance 	$topo \
		 			-agentTrace 	ON \
                 	-routerTrace 	ON \
                 	-macTrace 		ON \
                 	-movementTrace  ON 



for {set i 0} {$i < $val(nn) } {incr i} {
	set node_($i) [$ns_ node]	
	$node_($i) random-motion 0		;
		set ragent [$node_($i)set ragent_]
		$ragent install-tap [$node_($i)set mac_(0)]

	if { $val(mac) == "Mac/802_11p" }
		[$node_($i) set mac_(0)] load-trace $loadTrace

	$god_new_node $node_($i)
	}
}

# Provide initial (X,Y, for now Z=0) co-ordinates for node_s and node_d
#

puts "Loading scenario file..."
source $val(sc)


for {set i 0} {$i < $val(nn)} {incr i} {    
    $ns_ initial_node_pos $node_($i) 20
}

for {set i 0} {$i < $val(nn) } {incr i} {
    $ns_ at $val(stop).0 "$node_($i) reset";
}
#source $val(tr)

set udp_(0) [new Agent/UDP]
$ns_ attach-agent $node_(53) $udp_(0)
set null_(0) [new Agent/Null]
$ns_ attach-agent $node_(3) $null_(0)
set cbr_(0) [new Application/Traffic/CBR]
$cbr_(0) set packetSize_ 512
$cbr_(0) set interval_ 0.01
$cbr_(0) set random_ 1
$cbr_(0) set maxpkts_ 10000
$cbr_(0) attach-agent $udp_(0)
$ns_ connect $udp_(0) $null_(0)
$ns_ at 10.0 "$cbr_(0) start"
$ns_ at 90.0 "$cbr_(0) stop"

$ns_ at $val(stop) "finish"
$ns_ at  $val(stop).0002 "puts "NS EXITING..." ; $ns_ halt" 

proc finish {} {
	global ns_ tracetr tracenam
	$ns_ flush-trace
	close $tracetr
	close $tracenam
	exec nam gpsr2.nam &
	exec awk -f throughput.awk gpsr2.tr &
	exec awk -f PDRPLD.awk gpsr2.tr &
	exit 0 }

puts "Starting Simulation..."
$ns_ run
2. OS : Ubuntu 12.04 32bits
Attached Files
File Type: txt gpsr01.txt (6.1 KB, 27 views)

Last edited by rendipras; 10-25-2017 at 02:40 AM.
 
Old 10-25-2017, 06:44 AM   #5
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
Re #4.

Files ...
1. gpsr01.txt: Must be attached as gpsr01.tcl.txt, i.e. never omit the file suffix!
2. layang_pasupati_simulation_MovementNs2Report.txt
3. IEEE802-11p.tcl
... and ...
4. throughput.awk
5. PDRPLD.awk

... Missing files :
2. layang_pasupati_simulation_MovementNs2Report.txt :
.. Please upload "Movement" file to Dropbox, and provide a shared link, please.
4. throughput.awk : Could be any of the "throughput.awk" from the Internet.
.. Please attach as throughput-U.awk.txt
5. PDRPLD.awk : Unknown file. Attach as PDRPLD.awk.txt

Discussion, Vanet - GPSR http://network-simulator-ns-2.7690.n...24.html#a31545

Simulation, GPSR-hls - Vanet 3 cars - 802.11Ext : G-unicast_validation.tcl
https://www.dropbox.com/s/u4lcjoqtwg...ation.tcl?dl=0

GPSR-hls examples : gpsr-hls-ex-09.17.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing

All ~2500 ns2 examples https://drive.google.com/drive/folde...Ws?usp=sharing

-

Last edited by knudfl; 10-25-2017 at 07:59 AM.
 
1 members found this post helpful.
Old 10-25-2017, 07:21 AM   #6
rendipras
LQ Newbie
 
Registered: Oct 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #4.

Files ...
1. gpsr01.txt: Must be attached as gpsr01.tcl.txt, i.e. never omit the file suffix!
2. layang_pasupati_simulation_MovementNs2Report.txt
3. IEEE802-11p.tcl
... and ...
4. throughput.awk
5. PDRPLD.awk

... Missing files :
2. layang_pasupati_simulation_MovementNs2Report.txt :
.. Please upload "Movement" file to Dropbox, and provide a shared link, please.
4. throughput.awk : Could be any of the "throughput.awk" from the Internet.
.. Please attach as throughput-U.awk.txt
5. PDRPLD.awk : Unknown file. Attach as PDRPLD.awk.txt

GPSR-hls examples : gpsr-hls-ex-06.17.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing

Discussion, Vanet - GPSR http://network-simulator-ns-2.7690.n...24.html#a31545

-
1. I am sorry, this is the .tcl file
https://drive.google.com/drive/folde...VE?usp=sharing
2. layang_pasupati_simulation_MovementNs2Report.txt is the scenario of node mobility. i used OneSIM to get it.
3. IEEE802-11p.tcl as standardization of Vanet.
4. PDRPLD.awk is Packet Delivery Ratio, Packet Loss, Delay awk file
thank for advance
 
Old 10-25-2017, 10:34 AM   #7
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
Re #10 : Please do not quote entire posts. A "one word reference" will do.

IEEE802-11p.tcl : Not identical to my ns-2.35/tcl/ex/802.11/IEEE802-11p.tcl
... so I renamed your file to 2-IEEE802-11p.tcl .

Your file runs here, when I edit lines 153 - 170 :
Code:
#for {set i 0} {$i < $val(nn) } {incr i} {
#	set node_($i) [$ns_ node]	
#	$node_($i) random-motion 0		;
#		set ragent [$node_($i)set ragent_]
#		$ragent install-tap [$node_($i)set mac_(0)]

#	if { $val(mac) == "Mac/802_11p" }
#		[$node_($i) set mac_(0)] load-trace $loadTrace

#	$god_new_node $node_($i)
#	}
#}

        for {set i 0} {$i < $val(nn) } {incr i} {
    set node_($i) [$ns_ node]   
    $node_($i) random-motion 0      ;# disable random motion
            $ns_ initial_node_pos $node_($i) 30
             }
$ ns234-gpsr-hls-64 rendi-GPSR-hls-02.tcl
→ nam opens, but seemingly no visible "transmissions" in nam, any nodes.

Your awk files are failing here. I used some other of the ~230 scripts:
awk#perl#python__scripts-09.2017.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
... and I also used APP-Tool https://github.com/WiNG-NITK/APP-Tool

All results with your files, nam, awk, APP-Tool: GPSR-hls__Rendipras-result.tar.gz
https://www.dropbox.com/s/47fziy8kw6...lt.tar.gz?dl=0

-

Last edited by knudfl; 10-25-2017 at 10:45 AM.
 
1 members found this post helpful.
Old 10-25-2017, 12:04 PM   #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
Besides awk#perl#python__scripts-09.2017.tar.gz
... there is also a separate package with the best scripts ...
AWK-first.10.17.tar.gz https://drive.google.com/file/d/0B7S...ew?usp=sharing

-
 
1 members found this post helpful.
Old 10-25-2017, 12:52 PM   #9
rendipras
LQ Newbie
 
Registered: Oct 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank you so much,
I am working on it.
 
  


Reply

Tags
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
Urgent: Need help in simulation of gpsr in ns-2.35 hawkeyealice Linux - Newbie 2 04-20-2017 09:58 AM
GPSR hls simulation and evaluation. phucdv11 Linux - Software 0 05-20-2015 10:45 PM
NS2: Using GPSR , VANET simulation ssoumayaa Linux - Software 34 06-03-2014 09:20 AM

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

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