[wiki:WikiStart Orbit] > [wiki:Tutorial Tutorial] > Using Noise Generator = Using Noise Generator in Experiments = '''For further details on topology formation using noise antennas, please refer to the publication [http://www.winlab.rutgers.edu/~sachin/papers/Topology-noise.ps here]''' Along with node definitions in the first part of the experiment script, you also define the antenna to be a part of the experiment The noise antennas follow the Cartesian coordinate system (ie, the axis line up with the node grid). They are located as follows: * Antenna 1: Between node1-1 and node2-1 * Antenna 2: Between node19-1 and node20-1 * Antenna 3: Between node19-20 and node20-20 * Antenna 4: Between node1-20 and node2-20. Attached is a template script to use the noise generator. Please use tutorial-noise.rb as a baseline The configurable parameters are * channel on which you want to operate: Valid channels are 1..11, 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157 and 161 * Noise power on these channels: Limits are from -90 dBm to +5 dBm Here is a template script to use the noise generator {{{ Experiment.name = "tutorial-1a" Experiment.project = "orbit:tutorial" Experiment.defProperty('noisePower', -44, 'Noise level injected') # # Define nodes used in experiment # defNodes('sender', [1,2]) {|node| node.image = nil # assume the right image to be on disk node.prototype("test:proto:sender", { 'destinationHost' => '192.168.1.1', 'packetSize' => 1024, 'rate' => 300, 'protocol' => 'udp' }) node.net.w0.mode = "master" } defNodes('receiver', [1,1]) {|node| node.image = nil # assume the right image to be on disk node.prototype("test:proto:receiver" , { 'hostname' => '192.168.1.1', 'protocol' => 'udp' }) node.net.w0.mode = "managed" } allNodes.net.w0 { |w| w.type = 'b' w.essid = "helloworld" } antenna(4,4).signal {|s| s.bandwidth = 20 s.channel = 36 s.power = prop.noisePower } # # Now, start the application # whenAllInstalled() {|node| #Then start receiver and sender NodeSet['receiver'].startApplications wait 30 NodeSet['sender'].startApplications antenna(4,4).signal.on # Step noise power from -44 to 0dbm in steps of 4db -44.step(0, 4) { |p| prop.noisePower = p wait 5 } wait 10 Experiment.done } }}}