LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-15-2012, 06:00 AM   #31
mdkhasawneh
LQ Newbie
 
Registered: Mar 2012
Posts: 12

Rep: Reputation: Disabled

Dear knudfl im totaly new to NS2

for this reason i post the tcl to get help in modifying the file to run NAM.

can you tell me what to do?
 
Old 03-15-2012, 11:37 AM   #32
muaz.sh
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Rep: Reputation: Disabled
@27 this message refers that you have successfully integrated the GPSR implementation with ns2. in order to run nam animation, wireless-gpsr.tcl puts the traces files in the same folder, these files are trace.tr and nam.out.tr, so if you need to run the animation of this file you need to use the terminal and execute this command:
nam nam.out.tr
 
Old 03-15-2012, 11:48 AM   #33
mdkhasawneh
LQ Newbie
 
Registered: Mar 2012
Posts: 12

Rep: Reputation: Disabled
Dear muaz.sh after execute this command:
nam nam.out.tr

and by play the nam i get this in terminal and nothing at nam

Last edited by mdkhasawneh; 03-15-2012 at 12:10 PM.
 
Old 03-15-2012, 11:58 AM   #34
muaz.sh
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Rep: Reputation: Disabled
are you sure you did not modify the wireless-gpsr.tcl or any other file?
 
Old 03-15-2012, 12:11 PM   #35
mdkhasawneh
LQ Newbie
 
Registered: Mar 2012
Posts: 12

Rep: Reputation: Disabled
Dear muaz.sh i just modify wireless-gpsr.tcl accourding to post #17

can you send me the correct wireless-gpsr.tcl for runing the nam?
 
Old 03-16-2012, 03:46 AM   #36
muaz.sh
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Rep: Reputation: Disabled
Dear mdkhasawneh,
nam is just an another program like ns, so if you need to run it you must call it from shell: nam <nam trace file>, or you can run it from within tcl script by this command: exec nam <nam trace file>
 
Old 03-16-2012, 10:06 AM   #37
muaz.sh
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Rep: Reputation: Disabled
In order to surpass the problem of "node X is not defined" you need to add this loop after the definition of the nodes i.e after if { $opt(sc) == "" } statement:

for {set i 0} {$i < $opt(nn) } {incr i} {
$ns_ initial_node_pos $node_($i) 10
}
where
$ns_ initial_node_pos node size
command defines the node initial position in nam. <size> denotes the size of node in nam. This function must be called after mobility model has been defined.
 
Old 03-18-2012, 06:19 PM   #38
Menik
LQ Newbie
 
Registered: Feb 2012
Posts: 10

Rep: Reputation: Disabled
Hi nimacasino,
Could you please let me know how did you fix GPSR for NS2.34 ?
I am also referring the link. However, thanking you if you can explain it in steps.
Thanks in advance !
 
Old 03-18-2012, 10:40 PM   #39
Menik
LQ Newbie
 
Registered: Feb 2012
Posts: 10

Rep: Reputation: Disabled
HI Mauz.sh,

Are the steps mentioned in #16 are valid for NS2.35 as well ?
I am getting an error when i type "ns wireless-gpsr.tcl". Any help ?
 
Old 03-19-2012, 07:39 AM   #40
mdkhasawneh
LQ Newbie
 
Registered: Mar 2012
Posts: 12

Rep: Reputation: Disabled
Hello i run GPSR Successfully from Keliu GPSR implementation.
when i run nam nam.out.tr i can see the radio range for nodes and transmission but the nodes are static and not moving. is this ok or nodes can be moving also.

i have another problem in understanding the trace file format from nam.out.tr to represent the result in grapgh.

it look different from the trace file format at

http://www.cs.binghamton.edu/~kliu/r...ode/index.html

i will attache some data from nam.out.tr and please if anyone can understand the format explain for me.

Code:
r -t 0.060020077 -s 30 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 13 -k RTR
r -t 0.060020077 -s 21 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 13 -k RTR
r -t 0.060020104 -s 11 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 13 -k RTR
r -t 0.060020104 -s 31 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 13 -k RTR
r -t 0.060020143 -s 0 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 13 -k RTR
r -t 0.060020143 -s 40 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 13 -k RTR
r -t 0.060020143 -s 22 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 13 -k RTR
+ -t 0.068286028 -s 40 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 14 -k RTR 
- -t 0.068286028 -s 40 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 14 -k RTR
h -t 0.068286028 -s 40 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 14 -k RTR
r -t 0.069482095 -s 30 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 14 -k RTR
r -t 0.069482095 -s 50 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 14 -k RTR
r -t 0.069482095 -s 41 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 14 -k RTR
r -t 0.069482123 -s 31 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 14 -k RTR
r -t 0.069482123 -s 51 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 14 -k RTR
r -t 0.069482162 -s 20 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 14 -k RTR
r -t 0.069482162 -s 60 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 14 -k RTR
r -t 0.069482162 -s 42 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 14 -k RTR
+ -t 0.088690801 -s 58 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 15 -k RTR 
- -t 0.088690801 -s 58 -d -1 -p gpsr -e 29 -c 2 -a 0 -i 15 -k RTR
where the format at http://www.cs.binghamton.edu/~kliu/r...ode/index.html

look like

Code:
s 76.000000000 _98_ AGT  --- 1812 cbr 32 [0 0 0 0] ------- [98:0 0:0 32 0]
r 0.010176954 _9_ RTR  --- 1 gpsr 29 [0 ffffffff 8 800] ------- [8:255 -1:255 32 0]

Last edited by mdkhasawneh; 03-19-2012 at 07:40 AM. Reason: more info
 
Old 03-19-2012, 03:42 PM   #41
Menik
LQ Newbie
 
Registered: Feb 2012
Posts: 10

Rep: Reputation: Disabled
Hi
When I run the same code with modifications ia m getting a run time error. mdkhasawneh, which NS2 version you are running and on which platform ? Thanks in advance.
I am geting below runtime error for ns wireless-gpsr.tcl

* glibc detected * ns: free(): invalid next size (fast): 0x08ede2f0 ***
======= Backtrace: =========
/lib/libc.so.6[0x5646c5]
/lib/libc.so.6(cfree+0x59)[0x564b09]
/lib/libc.so.6[0x51bf12]
/lib/libc.so.6[0x51ac83]
/lib/libc.so.6(setlocale+0x178)[0x51a688]
ns[0x84d63ff]
ns[0x8464965]
ns(Tcl_FindExecutable+0x17)[0x84600d7]
ns(Tcl_Main+0x32)[0x84942e2]
ns(nslibmain+0x20)[0x8413de2]
ns(main+0x22)[0x8413e3e]
/lib/libc.so.6(__libc_start_main+0xdc)[0x510e9c]
ns(__gxx_personality_v0+0x37d)[0x819b8b1]
======= Memory map: ========
00200000-00201000 r-xp 00200000 00:00 0 [vdso]
004c6000-004d1000 r-xp 00000000 fd:00 3209017 /lib/libgcc_s-4.1.2-20080825.so.1
004d1000-004d2000 rwxp 0000a000 fd:00 3209017
 
Old 03-22-2012, 11:12 AM   #42
PRINCY
LQ Newbie
 
Registered: Mar 2012
Posts: 1

Rep: Reputation: Disabled
Hi,

I have patched the Ke Liu's GPSR implementation in NS-2.34 ..but the nodes are not moving in nam....can any one help me ?
 
Old 03-25-2012, 07:25 AM   #43
Menik
LQ Newbie
 
Registered: Feb 2012
Posts: 10

Rep: Reputation: Disabled
Hi All,
Can anyone please explain how to get x, y coordinates on C++ code
?
If anyone could please letme know a place I can find atleast an example.

Thanks
 
Old 03-27-2012, 04:24 PM   #44
Menik
LQ Newbie
 
Registered: Feb 2012
Posts: 10

Rep: Reputation: Disabled
Hi All,
If anyone who is familier with the GPSR protocol and if you know how they print the X Y coordinates please explain how they have done it.
I know it uses MobileNode.h hearder and call functions in that class.
But from where do we pass the nodes to the C++ class ?
Because most of the wireless examples (e.g. AODV), we define the adhoc routing protocol when configure the node.

Please help me.
Thanks,
 
Old 04-03-2012, 12:46 AM   #45
Menik
LQ Newbie
 
Registered: Feb 2012
Posts: 10

Rep: Reputation: Disabled
HI All,
Is there anyone who is working on WSN. I have some questions tobe clarified. Please send me an email to menikt@gmail.com and we can have a
discussion.
Thanks
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:32 PM.

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