Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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, the problem might occur because of 1) you have changed initial energy in GPSR.tcl where nodes are declared, 2) you donot run simulation for sufficient time. If problem still there please consider sharing your tcl and gpsr.tcl files.
Good luck
Thanks alots for your help... finally i could make gpsr work on my scenario (tcl file)... now i need to know how can i make a performance evaluation using awk scripts or other thing ... if anyone can tell me what to do ... it will be very helpfull .. i.e: i would like to make some plots of delay , throughput, packet loss ... i know houw to do it for other protocols like AODV because i already found awk scripts to do it ... but for GPSR i didn't find anything and its trace is different from others so that i can't use the same awk scripts with it ...
this is my new trace file :
Code:
# author: Thomas Ogilvie
# sample tcl script showing the use of GPSR and HLS (hierarchical location service)
## 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
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 Traces
set val(agg_trc) 0 ;# Shorten Trace File
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) 2000 ;# X dimension of the topography
set val(y) 2000 ;# Y dimension of the topography
set val(ifqlen) 512 ;# max packet in ifq
set val(seed) 1.0
set val(adhocRouting) GPSR ;# AdHoc Routing Protocol
set val(nn) 10 ;# how many nodes are simulated
set val(stop) 40.0 ;# simulation time
set val(use_gk) 0 ;# > 0: use GridKeeper with this radius
set val(zip) 0 ;# should trace files be zipped
set val(agttrc) ON ;# Trace Agent
set val(rtrtrc) ON ;# Trace Routing Agent
set val(mactrc) ON ;# Trace MAC Layer
set val(movtrc) ON ;# Trace Movement
set val(lt) ""
#set val(cp) "cp-n40-a40-t40-c4-m0"
set val(sc) "./changjing1.tcl"
set val(out) "hls_test.tr"
Agent/GPSR set locservice_type_ 3
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)
# create simulator instance
set ns_ [new Simulator]
set loadTrace $val(lt)
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
set tracefd [open $val(out) w]
#$ns_ use-newtrace
set nf [open hls.nam w] ;# trace and nam file
$ns_ trace-all $tracefd
$ns_ namtrace-all-wireless $nf 2000 2000 ;# mobily topo x&y
set chanl [new $val(chan)]
# Create God
set god_ [create-god $val(nn)]
# Attach Trace to God
set T [new Trace/Generic]
$T attach $tracefd
$T set src_ -5
$god_ tracetarget $T
## ======================================================================
# Define Nodes
## ======================================================================
puts "Configuring Nodes ($val(nn))"
$ns_ node-config -adhocRouting $val(adhocRouting) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channel $chanl \
-topoInstance $topo \
-wiredRouting OFF \
-mobileIP OFF \
-agentTrace $val(agttrc) \
-routerTrace $val(rtrtrc) \
-macTrace $val(mactrc) \
-movementTrace $val(movtrc)
## ======================================================================
# Create the specified number of nodes [$val(nn)] and "attach" them
# to the channel.
## ======================================================================
for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;# disable random motion
# Bring Nodes to God's Attention
$god_ new_node $node_($i)
}
#Setup UDP connection
set udp_s [new Agent/UDP]
set udp_r [new Agent/Null]
$ns_ attach-agent $node_(0) $udp_s
$ns_ attach-agent $node_(5) $udp_r
#Setup a MM Application
set e [new Application/Traffic/CBR]
$e set packetSize_ 500
$e set rate_ 20Kb
$e set random_ 1
#$e attach-agent $udp_r
$e attach-agent $udp_s
$ns_ connect $udp_s $udp_r
#$ns_ at 0.0 "$e start"
$ns_ at 1.0 "$e start"
$ns_ at 2.0 "$e stop "
source $val(sc)
#source $val(cp)
## ======================================================================
# Tell nodes when the simulation ends
## ======================================================================
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at $val(stop).0 "$node_($i) reset";
}
$ns_ at $val(stop).0002 "puts \"NS EXITING... $val(out)\" ; $ns_ halt"
proc stop {} {
global ns_ tracefd
global ns_ nf
$ns_ flush-trace
close $nf
close $tracefd
exit 0
}
puts "Starting Simulation..."
$ns_ run
i have "./changjing1.tcl" and the trace fil from which i need to plot some graphics but i couldn't send it here becase i had this message "The text that you have entered is too long (1730523 characters). Please shorten it to 30000 characters long."
can u please tell why am i getting this error when i execute wireless.tcl
invalid command name "Agent/GPSR"
while executing
"Agent/GPSR set planar_type_ 0 "
(file "wireless-gpsr.tcl" line 112)
please reply asap
thanks
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Post # 66, @VanetG : Welcome to LQ.
Quote:
invalid command name "Agent/GPSR"
Possible issues that will cause this error :
1) Your install failed, or wasn't patched correctly.
2) A binary 'ns' from a "non GPSR" install was used.
3) 'ns-allinone-2.33/' was renamed or moved to another location.
Possible issues that will cause this error :
1) Your install failed, or wasn't patched correctly.
2) A binary 'ns' from a "non GPSR" install was used.
3) 'ns-allinone-2.33/' was renamed or moved to another location.
-
I tried re installing ns again and have patched gpsr again
it was a successful make with last few lines being
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/gaurika/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/ucb'
Still when i run wireless-gpsr.tcl
i am getting same error
invalid command name "Agent/GPSR"
while executing
"Agent/GPSR set planar_type_ 1 "
(file "wireless-gpsr.tcl" line 112)
Could u please tell me the location where this package has to be installed, as i have installed it in my home folder and no new ns-hls folder has been created .
I think i am missing some step . please tell where am i going wrong
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 72
Quote:
Could u please tell me the location where this package has to be installed
That's not how things work with an Ubuntu / .deb package : http://www.linuxquestions.org/questi...-4175446277/#3
→ The files are automatically installed to /usr/local/bin/ns-hls
.. and /usr/local/lib/gpsr-hls/ns-allinone-2.33/hls-utils/
.. when you do $ sudo dpkg -i gpsr-hls-2.33-ubuntu10_i386.deb
That's not how things work with an Ubuntu / .deb package : http://www.linuxquestions.org/questi...-4175446277/#3
→ The files are automatically installed to /usr/local/bin/ns-hls
.. and /usr/local/lib/gpsr-hls/ns-allinone-2.33/hls-utils/
.. when you do $ sudo dpkg -i gpsr-hls-2.33-ubuntu10_i386.deb
-
i ran the deb file it executed
but the AGENT/GPSR error still exists
i followed the steps :
"
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 "
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.