[ns] LEACH (how to calculate the level of energy of sensor node????)

2009-02-22 Thread Batbold Toiruul

Dear ns-users,
I am working on LEACH protocol. How can I calculate the level of energy of
sensor node? by formula? or ???

very appreciate any help

Bold


[ns] hello (ZRP)

2008-11-18 Thread Batbold Toiruul

Dear ns users,
from zrp.cc code, Could anyone explain below piece of code to me, please?

if (hdrc-ptype() == PT_ZRP) {
jem =  hdrip-ttl();
hdrip-ttl() -= 1;
assert(jem == (hdrip-ttl() + 1) );
if (hdrip-ttl()  0) {
  zdrop(p, DROP_RTR_TTL);
  return;
}


[ns] about NDP for ZRP

2008-10-23 Thread Batbold Toiruul

hi guys,

Mac/802_11 set dataRate_ 1Mb

for {set i 0} {$i  $val(nn) } {incr i} {
 set r_($i) [$node_($i) set ragent_]
  $ns_ at 0.0 $r_($i) radius 3.0
 # @@@ $ns_ at 0.4 $r_($i) beacon_period 12.0
 # @@@ $ns_ at 0.0 $r_($i) radius 1.0
 }

could anyone tell what exactly is it doing, please? Is it discovering node's
neighbors?
How can I change the neighbor discovering protocol (NDP), and where do i
have to do it?

i am very appreciate for any response.

sincerely,
   Batbold


[ns] error make re-compiling after make clean

2008-10-13 Thread Batbold Toiruul

hi guys,
I made following command for debugging.

./configure --enable-debug
make clean
make

however, i got the error during make procedure.

error:
/diffserv -I./satellite -I./wpan -o trace/trace.o trace/trace.cc
trace/trace.cc: In member function `virtual void DequeTrace::recv(Packet*,
   Handler*)':
trace/trace.cc:567: warning: int format, nsaddr_t arg (arg 5)
trace/trace.cc:567: warning: int format, nsaddr_t arg (arg 6)
trace/trace.cc:567: warning: int format, nsaddr_t arg (arg 5)
trace/trace.cc:567: warning: int format, nsaddr_t arg (arg 6)
trace/trace.cc:586: warning: int format, nsaddr_t arg (arg 5)
trace/trace.cc:586: warning: int format, nsaddr_t arg (arg 6)
trace/trace.cc:586: warning: int format, nsaddr_t arg (arg 5)
trace/trace.cc:586: warning: int format, nsaddr_t arg (arg 6)
make: *** [trace/trace.o] Error 1

[EMAIL PROTECTED] ~/ns-allinone-2.33/ns-2.33
$

can anyone tell me about this error, please?


[ns] error about ZRP

2008-10-13 Thread Batbold Toiruul

could anyone tell me about this error, please?

num_nodes is set 22
INITIALIZE THE LIST xListHead

(_o18 cmd line 1)
invoked from within
_o18 cmd port-dmux _o31
invoked from within
catch $self cmd $args ret
invoked from within
if [catch $self cmd $args ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error error when calling class $cls: $args $...
(procedure _o18 line 2)
(SplitObject unknown line 2)
invoked from within
$agent port-dmux $dmux_
(procedure _o15 line 11)
(Node/MobileNode add-target-rtagent line 11)
invoked from within
$self add-target-rtagent $agent $port
(procedure _o15 line 23)
(Node/MobileNode add-target line 23)
invoked from within
$self add-target $agent $port
(procedure _o15 line 15)
(Node attach line 15)
invoked from within
$node attach $ragent [Node set rtagent_port_]
(procedure _o3 line 79)
(Simulator create-wireless-node line 79)
invoked from within
_o3 create-wireless-node
(eval body line 1)
invoked from within
eval $self create-wireless-node $args
(procedure _o3 line 23)
(Simulator node line 23)
invoked from within
$ns_ node
(for body line 2)
invoked from within
for {set i 0} {$i  $val(nn)} {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0
$ns_ initial_node_pos $node_($i) 20
}
(file demo1_rad2.tcl line 131)


[ns] hi help ((no debugging symbols found))

2008-10-12 Thread Batbold Toiruul

Hi guys,
I am using gdb debuggar to find program error. However, when I use gdb, i
have some errors:

[EMAIL PROTECTED] ~/ns-allinone-2.33/ns-2.33
$ gdb ns
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i686-pc-cygwin...
(no debugging symbols found)
(gdb) run demo2_rad2.tcl
(gdb) run demo2_rad2.tcl
Starting program: /home/bbold/ns-allinone-2.33/ns-2.33/ns.exe demo2_rad2.tcl
[New thread 1880.0x875c]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New thread 1880.0x80d8]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
couldn't read file demo2_rad2.tcl: no such file or directory

Program exited with code 01.

if anybody knows about, help me?

Thanks a lot in advance.


[ns] how to install gdb with cygwin

2008-10-04 Thread Batbold Toiruul

hi guys,
can gdb install with cygwin on whindows xp? because i am using cygwin under
windows.


Re: [ns] error compile ZRP

2008-10-03 Thread Batbold Toiruul

No, it is Zone Routing Protocol. this problem is fixed. but there is core
dumped. How can i solve this segmentation fault.

On Fri, Oct 3, 2008 at 1:01 AM, karthi keyen [EMAIL PROTECTED] wrote:

 i'm using ns2.29  may i know what is ZRP is it zigbee routing protocol


 On Thu, Oct 2, 2008 at 12:30 PM, Batbold Toiruul [EMAIL PROTECTED]wrote:


 Hi guys,
 i am implementing ZRP on ns-2.27. But I compile the codes of ns-2.27 using
 'make' command after finish all changes. I received error.

 error:
autoconfig.h:85: error: namespace CPP_NAMESAPCE undeclared.

 i am new at ns-2. So please, if anyone knows, help me?

 sincerely,
 Bold





[ns] segmentation fault (core dumped) using ZRP in ns-2.27

2008-10-03 Thread Batbold Toiruul

Dear ns-users,
I installed Zone Routing Protocol (ZRP) on ns-2.27. However, when i use ZRP
to run below example, I got the segmentation fault (Core Dumped).
I don't know why this kind of error is occured. if anyone knows, please help
me.

thank you very much in advance
sincerely,
Batbold


set val(chan)   Ch.annel/WirelessChannel;#Channel Type
set val(prop)   Propagation/TwoRayGround   ;# radio-propagation
model
set val(netif)  Phy/WirelessPhy;# network interface type
set val(mac)Mac/802_11 ;# MAC type
set val(ifq)Queue/DropTail/PriQueue;# interface queue type
set val(ll) LL ;# link layer type
set val(ant)Antenna/OmniAntenna;# antenna model
set val(ifqlen) 500 ;# max packet in ifq
set val(nn) 22 ;# number of mobilenodes
set val(rp) ZRP;# routing protocol
set val(x)1000
set val(y)[expr ($val(nn)+1)*250]

# Initialize Global Variables
set ns_[new Simulator]
set tracefd [open mo4.tr w]
$ns_ trace-all $tracefd

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

# set up topography object
set topo   [new Topography]

$topo load_flatgrid $val(x) $val(y)

# Create God
create-god $val(nn)

# New API to config node:
# 1. Create channel (or multiple-channels);
# 2. Specify channel in node-config (instead of channelType);
# 3. Create nodes for simulations.

# Create channel #1 and #2
set chan_1_ [new $val(chan)]
set chan_2_ [new $val(chan)]

# Create node(0) attached to channel #1

# configure node, please note the change below.
$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) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace ON \
-channel $chan_1_


# node_(1) can also be created with the same configuration, or with a
different
# channel specified.
# Uncomment below two lines will create node_(1) with a different channel.
#  $ns_ node-config \
# -channel $chan_2_
#set node_(0) [$ns_ node]
#set node_(8) [$ns_ node]

#$node_(0) random-motion 0
#$node_(8) random-motion 0

for {set i 0} {$i  $val(nn)} {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0
$ns_ initial_node_pos $node_($i) 20
}

#
# Provide initial (X,Y, for now Z=0) co-ordinates for mobilenodes
#
#$node_(0) set X_  500.0
#$node_(0) set Y_  250.0
#$node_(0) set Z_ 0.0
#...
#$node_(8) set X_  500.0
#$node_(8) set Y_ 2250.0
#$node_(8) set Z_ 0.0

for {set i 0} {$i  10 } {incr i} {
   $node_($i) set X_  750.0
   $node_($i) set Y_ [expr $i*250+5]
   $node_($i) set Z_ 0.0
}
for {set i 10} {$i  20 } {incr i} {
   $node_($i) set X_ 250.0
   $node_($i) set Y_ [expr ($i-10)*250+5]
   $node_($i) set Z_ 0.0
}

$node_(20) set X_ 500.0
$node_(20) set Y_ 5.0
$node_(20) set Z_ 0.0

$node_(21) set X_ 500.0
$node_(21) set Y_ 505.0
$node_(21) set Z_ 0.0

#for {set i 0} {$i  3} {incr i} {
  #for {set j 0} {$j  3} {incr j} {
#$node_([expr $i+$j*3]) set X_ [expr $i*250]
#$node_([expr $i+$j*3]) set Y_ [expr $j*250]
#$node_([expr $i+$j*3]) set Z_ 0.0
  #}
#}


# Now produce some simple node movements
# Node_(1) starts to move towards node_(0)
#
#$ns_ at 3.0 $node_(5) setdest 100.0 500.0 05.0
#$ns_ at 100.0 $node_(5) setdest 100.0 500.0 00.0
#$ns_ at 200.0 $node_(5) setdest 005.0 700.0 05.0
#$ns_ at 3.0 $node_(0) setdest 48.0 38.0 5.0

# Node_(1) then starts to move away from node_(0)
#$ns_ at 20.0 $node_(1) setdest 490.0 480.0 30.0

# Setup traffic flow between nodes
#TCP connections between node_(0) and node_(1)

set udp [new Agent/UDP]
$udp set fid_ 2
set sink [new Agent/Null]
$ns_ attach-agent $node_(10) $udp
$ns_ attach-agent $node_(9) $sink
$ns_ connect $udp $sink

set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
$cbr set type_ CBR
$cbr set packet_size_ 100
$cbr set rate_ 10kb
$cbr set random_ false
$ns_ at 10.0 $cbr start
$ns_ at 100.0 $cbr stop

#set tcp [new Agent/TCP]
#$tcp set class_ 1
#$tcp set fid_ 2
#set sink [new Agent/TCPSink]
#$ns_ attach-agent $node_(2) $tcp
#$ns_ attach-agent $node_(5) $sink
#$ns_ connect $tcp $sink

#set ftp [new Application/FTP]
#$ftp attach-agent $tcp
#$ftp set type_ FTP
#$ns_ at 23.0 $ftp start
#$ns_ at 173.0 $ftp stop

Mac/802_11 set dataRate_ 1Mb

for {set i 0} {$i  $val(nn) } {incr i} {
 set r_($i) [$node_($i) set ragent_]
  $ns_ at 0.0 $r_($i) radius 2.0
 # @@@ $ns_ at 0.4 $r_($i) beacon_period 12.0
 # @@@ $ns_ at 0.0 $r_($i) radius 1.0
 }

#
# Tell nodes when the simulation ends
#
for {set i 0} {$i  $val(nn) } {incr i} {
$ns_ at 100.0 $node_($i) reset;
}
$ns_ at 100.0 stop

[ns] error compile ZRP

2008-10-02 Thread Batbold Toiruul

Hi guys,
i am implementing ZRP on ns-2.27. But I compile the codes of ns-2.27 using
'make' command after finish all changes. I received error.

error:
autoconfig.h:85: error: namespace CPP_NAMESAPCE undeclared.

i am new at ns-2. So please, if anyone knows, help me?

sincerely,
 Bold


[ns] segmentation fault (core dumped) in ns-2.27

2008-10-02 Thread Batbold Toiruul

Dear ns-users,
I installed ZRP on ns-2.27. However, when I using ZRP to run example, the
ns2 will segmentation fault (core dumped).
*if *anyone knows about this error, help me

thank you for helping

sincerely,
   Bold
*
*


[ns] error, help me

2008-09-17 Thread Batbold Toiruul

Hello everybody,
I am studying NS-2 and working on examples of Marc Greis.
http://www.isi.edu/nsnam/ns/tutorial/index.html

i completed all the guidance on the section 9, however i received e
off_srmrror from ns.
Error:
ns:
[code omitted because of length]
:invalid command name  SRMEXT off_srm_ext_
  while executing
{SRMEXT off_srm_ext_}

i did not find any code on ns-packet.tcl. I am new at NS2.
please, if anyone know about this error, help me?

sincerely,
   Bold


Re: [ns] hello, error please help??

2008-09-12 Thread Batbold Toiruul

thanks for your advise, Hisyam, and Vincent
i am going to try to use different name.

sincerely,
   Bold


On Fri, Sep 12, 2008 at 7:35 AM, Hisyam F. [EMAIL PROTECTED] wrote:

 Hi Bold,



 FYI, the 'ping' protocol is already embedded in the current ns2. Try to use
 different name instead of 'ping'.



 Good luck,

 Hisyam






 - Original Message 
 From: Batbold Toiruul [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Sent: Thursday, 11 September, 2008 16:59:46
 Subject: [ns] hello, error please help??


 Hello everybody,
 I am studying NS-2 and working on examples of Marc Greis.
 http://www.isi.edu/nsnam/ns/tutorial/index.html

 i completed all the guidance on the section 7, however i received some
 errors when i recompile ns using 'make' command.
 Errors:
 ping.o(.text+0x10a):ping.cc: multiple definition of
 'PingAgent::PingAgent[in-charge]()'
 apps/ping.o(.text+0xf6):ping.cc: first defined here
 collect2: id returned 1 exit status
 make:*** [ns] Error 1

 please, if anyone know about this error, help me?

 sincerely,
   Bold




[ns] hello, error please help??

2008-09-11 Thread Batbold Toiruul

Hello everybody,
I am studying NS-2 and working on examples of Marc Greis.
http://www.isi.edu/nsnam/ns/tutorial/index.html

i completed all the guidance on the section 7, however i received some
errors when i recompile ns using 'make' command.
Errors:
ping.o(.text+0x10a):ping.cc: multiple definition of
'PingAgent::PingAgent[in-charge]()'
apps/ping.o(.text+0xf6):ping.cc: first defined here
collect2: id returned 1 exit status
make:*** [ns] Error 1

please, if anyone know about this error, help me?

sincerely,
   Bold


[ns] problem intsalling ZRP on the NS-2.27#8207;

2008-03-27 Thread Batbold Toiruul

Hello everyone?
 
I want to install ZRP package on ns-2.27(under cygwin), but the installation 
guide is originally prepared for ns-2.1b9 and needs some change to work for 
ns-2.27. 
(I get several lines of errors while making ns after editing Makefile.)

Does anyone know that how to install ZRP on the ns-2.27??
 
regards,
Batbold


Batbold Toiruul, Database and Multimedia Lab  
Computer Science Department, Sun Moon University   
Asan campus, Chungnam 336-708, Korea (ROK)  
(082) 041-530-2886,  (082) 011-9689-2624
   
-
Never miss a thing.   Make Yahoo your homepage.