Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513
Rep:
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
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.