Changes between Initial Version and Version 1 of Tutorials/c0WiFi/Tutorial2


Ignore:
Timestamp:
Nov 23, 2005, 7:51:08 PM (19 years ago)
Author:
Surya Satyavolu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/c0WiFi/Tutorial2

    v1 v1  
     1[wiki:WikiStart Orbit] > [wiki:Tutorial Tutorial] > Using Noise Generator
     2
     3= Using Noise Generator in Experiments =
     4
     5The main idea is this:
     6
     7Along with node definitions in the first part of the experiment script,
     8you also define the antenna to be a part of the experiment
     9
     10The antennas are located here:
     11  * Antenna 1: Between node2-1 and node2-2
     12  * Antenna 2: Between node2-7 and node2-8
     13  * Antenna 3: Between node7-1 and node7-2
     14  * Antenna 4: Between node7-7 and node7-8.
     15
     16Attached is a template script to use the noise generator. Please use tutorial-noise.rb as a baseline
     17
     18The configurable parameters are
     19  * channel on which you want to operate:
     20    Valid channels are 1..11, 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157 and 161
     21  * Noise power on these channels: Limits are from -90 dBm to +5 dBm
     22
     23Here is a template script to use the noise generator
     24{{{
     25Experiment.name = "tutorial-1a"
     26Experiment.project = "orbit:tutorial"
     27Experiment.defProperty('noisePower', -44, 'Noise level injected')
     28#
     29# Define nodes used in experiment
     30#
     31defNodes('sender', [1,2]) {|node|
     32  node.image = nil  # assume the right image to be on disk
     33  node.prototype("test:proto:sender", {
     34    'destinationHost' => '192.168.1.1',
     35    'packetSize' => 1024,
     36    'rate' => 300,
     37    'protocol' => 'udp'
     38  })
     39  node.net.w0.mode = "master"
     40}
     41
     42defNodes('receiver', [1,1]) {|node|
     43  node.image = nil  # assume the right image to be on disk
     44  node.prototype("test:proto:receiver" , {
     45    'hostname' => '192.168.1.1',
     46    'protocol' => 'udp'
     47  })
     48  node.net.w0.mode = "managed"
     49}
     50
     51allNodes.net.w0 { |w|
     52  w.type = 'b'
     53  w.essid = "helloworld"
     54}
     55
     56antenna(4,4).signal {|s|
     57  s.bandwidth = 20
     58  s.channel = 36
     59  s.power = prop.noisePower
     60}
     61#
     62# Now, start the application
     63#
     64whenAllInstalled() {|node|
     65
     66  #Then start receiver and sender
     67  NodeSet['receiver'].startApplications
     68  wait 30
     69  NodeSet['sender'].startApplications
     70
     71  antenna(4,4).signal.on
     72
     73  # Step noise power from -44 to 0dbm in steps of 4db
     74  -44.step(0, 4) { |p|
     75
     76    prop.noisePower = p
     77     wait 5
     78   }
     79  wait 10
     80  Experiment.done
     81}                             
     82
     83}}}