LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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



Closed Thread
 
Search this Thread
Old 12-18-2012, 08:05 PM   #61
sukhalid
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Rep: Reputation: Disabled
GPSR no recieved packets


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
 
Old 12-19-2012, 12:20 AM   #62
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
Post # 61, @sukhalid :

The two connected tcl files are here, post # 13 ..
http://www.linuxquestions.org/questi...4175440313/#13
 
Old 12-19-2012, 03:49 AM   #63
ssoumayaa
LQ Newbie
 
Registered: Dec 2012
Posts: 17

Rep: Reputation: Disabled
Hello everybody,

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

Last edited by ssoumayaa; 12-19-2012 at 04:21 AM.
 
Old 12-19-2012, 04:23 AM   #64
ssoumayaa
LQ Newbie
 
Registered: Dec 2012
Posts: 17

Rep: Reputation: Disabled
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."

i don't know how to let you see it ..

Thank you in advance
 
Old 12-19-2012, 04:44 AM   #65
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
# 64
Quote:
"The text that you have entered is too long (1730523 characters).
Please shorten it to 30000 characters long."

I don't know how to let you see it ..
Small files can be attached as <file-name>.gz.txt

Example : $ gzip fangzhen1.tr && mv fangzhen1.tr.gz fangzhen1.tr.gz.txt
... Then it's down from 174.8 kB to 22.4 kB.

Attachments : The paper clip tool in the 'Advanced Editor'.

.
 
1 members found this post helpful.
Old 01-22-2013, 01:59 AM   #66
VanetG
LQ Newbie
 
Registered: Jan 2013
Posts: 13

Rep: Reputation: Disabled
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
 
Old 01-22-2013, 02:47 AM   #67
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
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.

-
 
Old 01-23-2013, 03:44 PM   #68
info_mimi
Member
 
Registered: Dec 2012
Posts: 31

Rep: Reputation: Disabled
Hello
i want to run GPSR in NS2 2.33 ,i should use only the implementation of Ke Liu's from this link
http://www.cs.binghamton.edu/~kliu/r...ode/index.html

or also i patch my ns2.33 like in post #11


i should use one methode or both of them ?
plz help me .............
 
Old 01-23-2013, 04:26 PM   #69
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
Post # 68, @info_mimi : Welcome to LQ.

You could use both : Set up two different ns-allinone-2.33/,
.. and find out which one can do the simulation you want.


( You can have as many versions of ns-allinone-2.xx as you want,
installed at the same time. But : Do not add any of them to a *PATH.)

P.S. : There is a binary package, GPSR-hls, gpsr-hls-2.33-ubuntu10_i386.deb,
post #3 here http://www.linuxquestions.org/questi...-4175446277/#3
.. so you do actually not have to build that one.

-

Last edited by knudfl; 01-23-2013 at 04:32 PM.
 
Old 01-25-2013, 11:50 PM   #70
VanetG
LQ Newbie
 
Registered: Jan 2013
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Post # 66, @VanetG : Welcome to LQ.



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)

please help
 
Old 01-26-2013, 02:59 AM   #71
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
# 70

Please install the binary package, gpsr-hls-2.33-ubuntu10_i386.deb :
$ sudo dpkg -i gpsr-hls-2.33-ubuntu10_i386.deb
http://www.linuxquestions.org/questi...-4175446277/#3

Then you have a usable binary, 'ns-hls'.

-
 
Old 01-26-2013, 04:09 AM   #72
VanetG
LQ Newbie
 
Registered: Jan 2013
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 70

Please install the binary package, gpsr-hls-2.33-ubuntu10_i386.deb :
$ sudo dpkg -i gpsr-hls-2.33-ubuntu10_i386.deb
http://www.linuxquestions.org/questi...-4175446277/#3

Then you have a usable binary, 'ns-hls'.

-
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

i am using ns2.34

Thanks

Last edited by VanetG; 01-26-2013 at 04:14 AM.
 
Old 01-26-2013, 04:15 AM   #73
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
# 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

-
 
Old 01-26-2013, 04:22 AM   #74
VanetG
LQ Newbie
 
Registered: Jan 2013
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 72

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 "
 
Old 01-26-2013, 06:59 AM   #75
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
Ref. # 70
Quote:
invalid command name "Agent/GPSR"
Are you sure you have the ns-2.34/gpsr/ directory ?

And did you add the new lines to the Makefile ( or Makefile.in ) ?
( Line 330 in the Makefile.in )
Code:
  	gpsr/gpsr_neighbor.o \
	gpsr/gpsr_sinklist.o \
	gpsr/gpsr.o
The valid link is http://www.cs.binghamton.edu/~kliu/r...ndex.html#gpsr
( The link in post # 74 is a copy of "half a link".)

-

Last edited by knudfl; 01-26-2013 at 07:01 AM.
 
1 members found this post helpful.
  


Closed Thread

Tags
gdb, gpsr, gpsr-hls, gpsr-keliu, xgraph#195


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
patch for working leach protocol in ns2.34 fedora rajcek Linux - Wireless Networking 4 02-04-2013 07:59 AM
LXer: Tutorial: Border Gateway Protocol, The Routing Protocol of the Internet LXer Syndicated Linux News 0 11-13-2008 06:11 AM
free routing protocol in fedora wahaha Linux - Networking 2 10-26-2006 02:16 AM
RIP(Routing Information protocol) cranium2004 Linux - Networking 2 05-01-2005 07:08 AM
Routing Protocol karunesh Linux - Networking 3 09-04-2002 05:24 AM


All times are GMT -5. The time now is 05:21 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration