[ns] example programs

2009-07-07 Thread kundavi

hi
 i need example programs for wireless simulations using Tclwith odmrp
protocol,,,else atleast any other protocol..


with regards,
sangeetha.k


Re: [ns] mcps_data_request and losses

2009-07-07 Thread Réjane Dalcé

Hello,
Thanks for your proposition. I'm not near the computer I use for work but
I'll explain.
In my Tcl script, I call mcpsDataRequest to send frames. In the command
function of SSCS, I defined the mapping and made the call to
MCPS_DATA_request which in turn calls mcps_data_request. The issue I was
facing was that with 3 nodes, I had 99% packets successfully sent which was
just impossible. I checked the call to MCPS_DATA_request and noticed that I
had set the handle to 0. Since the handle was used later on to direct to
MCPS_DATA_confirm, I never got to that point as soon as there was one lost
frame. So the first two nodes to fail in sending a frame will never recover
from it and the last one will continue sending, leading to a near zero loss
ratio.
I don't really know awk. I use databases to process my files.
BR

RD

2009/7/6 hakim anouar hakim.ano...@gmail.com

 *Hi,
 Related to your pb,i'm also working on zigbee technologie (802.15.4), and
 with pleasure to collaborate with you on this topic.
 if you can send me your script file and also the script used to calculate
 the ratio of packets losed and  received in order to analyse it and giving
 if possible my helps.Me i use a simple CBR traffic, i can calculate  those
 statistics  by using a awk script.
 *


 --
 ANOUAR Abdelhakim
 Systèmes Informatiques et Réseaux
 Département de Génie Informatiques





-- 
Life is too short to be pissed off all the time.


[ns] NODE 1 NOT DEFINED ERROR MESSAGE

2009-07-07 Thread Oladapo Oluwadiya

I tried simulating a simple wireless scenario of two mobile nodes moving 
towards each other and after a while moves away . the simulation builds and 
runs well,but i cant see the two nodes in the NAM animation though the TR file 
shows the simulation generated correct results..below is the scripts.please 
help

# =
# Define options
# =
set val(chan) Channel/WirelessChannel  ;# channel type
set val(prop)   Propagation/TwoRayGround ;# radio-propagation model
set val(ant)  Antenna/OmniAntenna  ;# Antenna type
set val(ll)   LL   ;# Link layer type
set val(ifq)  Queue/DropTail/PriQueue  ;# Interface queue type
set val(ifqlen)   50   ;# max packet in ifq
set val(netif)   Phy/WirelessPhy  ;# network interface type
set val(mac)  Mac/802_11   ;# MAC type
set val(rp) DSDV ;# ad-hoc routing protocol 
set val(x)           500             ;# x-axis of grid
set val(y)           500             ;# y-axis of grid
set val(nn)   2    ;# number of mobilenodes
set ns_    [new Simulator]
set tracefd [open simple.tr w]
$ns_ trace-all $tracefd   
set nf [open simple.nam w]
$ns_ namtrace-all-wireless $nf $val(x) $val(y)
set topo    [new Topography]
$topo load_flatgrid $val(x) $val(y)

create-god $val(nn)
   #(parameter examples)
# $ns_ node-config -addressingType flat or hierarchical or expanded
#  -adhocRouting   DSDV or DSR or TORA
#  -llType       LL
#  -macType       Mac/802_11
#  -propType       Propagation/TwoRayGround
#  -ifqType       Queue/DropTail/PriQueue
#  -ifqLen       50
#  -phyType       Phy/WirelessPhy
#  -antType       Antenna/OmniAntenna
#  -channelType    Channel/WirelessChannel
#  -topoInstance   $topo
#  -energyModel    EnergyModel
#  -initialEnergy  (in Joules)
#  -rxPower    (in W)
#  -txPower    (in W)
#  -agentTrace ON or OFF
#  -routerTrace    ON or OFF
#  -macTrace   ON or OFF
#  -movementTrace  ON or OFF
# Configure nodes
    $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 \
 -channelType $val(chan) \
 -agentTrace ON \
 -routerTrace ON \
 -macTrace OFF \
 -movementTrace OFF
for {set i 0} {$i  $val(nn) } {incr i} {
    set node_($i) [$ns_ node]
$node_($i) random-motion 0   ;# disable random motion
    }    
#
# Provide initial (X,Y, for now Z=0) co-ordinates for node_(0) and node_(1)
#
$node_(0) set X_ 5.0
$node_(0) set Y_ 2.0
$node_(0) set Z_ 0.0

$node_(1) set X_ 390.0
$node_(1) set Y_ 385.0
$node_(1) set Z_ 0.0
#
# Node_(1) starts to move towards node_(0)
#
$ns_ at 50.0 $node_(1) setdest 25.0 20.0 15.0
$ns_ at 10.0 $node_(0) setdest 20.0 18.0 1.0

# Node_(1) then starts to move away from node_(0)
$ns_ at 100.0 $node_(1) setdest 490.0 480.0 15.0 
# TCP connections between node_(0) and node_(1)

set tcp [new Agent/TCP]
$tcp set class_ 2
set sink [new Agent/TCPSink]
$ns_ attach-agent $node_(0) $tcp
$ns_ attach-agent $node_(1) $sink
$ns_ connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns_ at 10.0 $ftp start 
#
# Tell nodes when the simulation ends
#
for {set i 0} {$i  $val(nn) } {incr i} {
    $ns_ at 150.0 $node_($i) reset;
}
$ns_ at 150.0001 stop
$ns_ at 150.0002 puts \NS EXITING...\ ; $ns_ halt
proc stop {} {
    global ns_ tracefd
    close $tracefd
}
puts Starting Simulation...
$ns_ run





  


[ns] Calculate the power consumption

2009-07-07 Thread Kanakaris Venetis


Hi to everyone,


I would like to know whether the ns2 can calculate the power consumption or not 
and if yes, could someone please tell me how?

 

 

Kind regards,

Venetis
 


_
Έχετε Messenger; Έχετε και Windows Live. Μάθετε περισσότερα.
http://microsoft.com/windows/windowslive

[ns] Change the value of dataRate_ in Mac/802_11

2009-07-07 Thread El hadi Cherkaoui

hi all,

i want to change via tcl the value of rate in Mac/802_11 ...

For exemple when i set :
Mac/802_11 set dataRate_ 1Mb 
the dataRate is really 1 Mb but after if i want to change the datarate to 2Mb
Mac/802_11 set dataRate_ 2Mb 

the value of dataRate_ is still 1Mb

What's wrong with this ?
thanx 




  


[ns] error report

2009-07-07 Thread Kanakaris Venetis


Hi to everyone,

I found an example on the internet and I tried to run it but I am getting a 
feedback to change some variables but I don't know which one I have to change.
At the attached files are the example file and the report error. Please give me 
help on this problem.


Kind regards,

Venetis

_
Έχετε Messenger; Έχετε και Windows Live. Μάθετε περισσότερα.
http://microsoft.com/windows/windowslive

Re: [ns] Change the value of dataRate_ in Mac/802_11

2009-07-07 Thread David Ross

Are you setting it *before* creating the nodes?
If dataRate_ is not set when the nodes are created, they use bandwidth_ 
(defaults to 1Mb) instead.

- David Ross.

El hadi Cherkaoui wrote:
 hi all,

 i want to change via tcl the value of rate in Mac/802_11 ...

 For exemple when i set :
 Mac/802_11 set dataRate_ 1Mb 
 the dataRate is really 1 Mb but after if i want to change the datarate to 2Mb
 Mac/802_11 set dataRate_ 2Mb 

 the value of dataRate_ is still 1Mb

 What's wrong with this ?
 thanx