Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Demonstration 6

Steven Galgano edited this page Apr 10, 2017 · 7 revisions

Purpose

This demonstration will use the RF Pipe radio model to demonstrate physical layer antenna profile usage.

Background

Background information for this demonstration includes:

Activity 1 - Antenna Gain

This activity will create a four node RF Pipe network. NEMs 2 and 3 are each configured to use an omni-directional antenna. NEMs 1 and 4 are each configured to use a directional antenna. We'll use a series of antenna profile and location events to change the network topology in order to visualize the physical layer's antenna gain computation capability.

  1. Change directory into the Demonstration 6 directory

    [me@host emane-tutorial]$ cd 6
    
  2. Let's take a look at platform2.xml, one of the omni-directional NEMs.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE platform SYSTEM "file:///usr/share/emane/dtd/platform.dtd">
    <platform>
      <param name="otamanagerchannelenable" value="on"/>
      <param name="otamanagerdevice" value="eth1"/>
      <param name="otamanagergroup" value="224.1.2.8:45702"/>
      <param name="eventservicegroup" value="224.1.2.8:45703"/>
      <param name="eventservicedevice" value="eth1"/>
      <param name="controlportendpoint" value="0.0.0.0:47000"/>
      <param name="antennaprofilemanifesturi" value="antennaprofilemanifest.xml"/>
    
      <nem id="2" definition="rfpipenem.xml">
        <transport definition="transvirtual.xml">
          <param name="address" value="10.100.0.2"/>
          <param name="mask" value="255.255.255.0"/>
        </transport>
      </nem>
    </platform>

    There is new parameter present that we have not seen before: antennaprofilemanifesturi. This parameter tells the emulator to load a manifest of antenna and blockage profiles. Every emulator instance taking part in this emulation will need to load the same manifest.

    If you follow the indirection chain to rfpipenem.xml and then onto rfpipemac.xml, you will see the usual configuration we have been using so far. The most important item to notice is that NEM 2 will be using a fixedantennagain of 0dbi.

    A quick comparison with platform3.xml will show that NEM 3 is using a fixedantennagain of 5dbi.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE platform SYSTEM "file:///usr/share/emane/dtd/platform.dtd">
    <platform>
      <param name="otamanagerchannelenable" value="on"/>
      <param name="otamanagerdevice" value="eth1"/>
      <param name="otamanagergroup" value="224.1.2.8:45702"/>
      <param name="eventservicegroup" value="224.1.2.8:45703"/>
      <param name="eventservicedevice" value="eth1"/>
      <param name="controlportendpoint" value="0.0.0.0:47000"/>
      <param name="antennaprofilemanifesturi" value="antennaprofilemanifest.xml"/>
    
      <nem id="3" definition="rfpipenem.xml">
        <transport definition="transvirtual.xml">
          <param name="address" value="10.100.0.3"/>
          <param name="mask" value="255.255.255.0"/>
        </transport>
        <phy>
          <param name="fixedantennagain" value="5"/>
        </phy>
      </nem>
    </platform>

    The takeaway here is that even if an NEM is using fixedantennagain, as long as at least one NEM in the emulation is using antenna profiles, all emulator instances must be configured with the same antenna profile manifest.

  3. Now let's look at the configuration for one of the antenna profile enabled nodes: platform1.xml.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE platform SYSTEM "file:///usr/share/emane/dtd/platform.dtd">
    <platform>
      <param name="otamanagerchannelenable" value="on"/>
      <param name="otamanagerdevice" value="eth1"/>
      <param name="otamanagergroup" value="224.1.2.8:45702"/>
      <param name="eventservicegroup" value="224.1.2.8:45703"/>
      <param name="eventservicedevice" value="eth1"/>
      <param name="controlportendpoint" value="0.0.0.0:47000"/>
      <param name="antennaprofilemanifesturi" value="antennaprofilemanifest.xml"/>
    
      <nem id="1" definition="rfpipenem.xml">
        <transport definition="transvirtual.xml">
          <param name="address" value="10.100.0.1"/>
          <param name="mask" value="255.255.255.0"/>
        </transport>
        <phy>
          <param name="fixedantennagainenable" value="off"/>
        </phy>
      </nem>
    </platform>

    The only difference between what we have seen so far, is that fixedantennagainenable is off. platform4.xml is identical to platform1.xml, with just the NEM Id and the transport boundary address differing.

  4. In order to use antenna profiles, all NEMs must be aware of the location and the antenna profile information in use by all NEMs using antenna profiles. In this demonstration, we will be publishing this information using the emaneeventservice.

    Take a look at scenario.eel.

    0.0 nem:1 antennaprofile 1,0.0,0.0
    0.0 nem:4 antennaprofile 2,0.0,0.0
    #
    0.0 nem:1  pathloss nem:2,60  nem:3,60   nem:4,60
    0.0 nem:2  pathloss nem:3,60  nem:4,60
    0.0 nem:3  pathloss nem:4,60
    #
    0.0 nem:1  location gps 40.025495,-74.315441,3.0 
    0.0 nem:2  location gps 40.025495,-74.312501,3.0 
    0.0 nem:3  location gps 40.023235,-74.315441,3.0
    0.0 nem:4  location gps 40.023235,-74.312501,3.0
    0.0 nem:4  velocity 180.0,0.0,10.0
    #
    30.0 nem:1 velocity 20.0,0.0,10.0
    30.0 nem:1 orientation 0.0,0.0,10.0
    30.0 nem:1 antennaprofile 1,60.0,0.0
    30.0 nem:4 velocity 270.0,0.0,10.0
    #
    60.0 nem:1 antennaprofile 1,105.0,0.0
    60.0 nem:4 antennaprofile 2,45.0,0.0
    #
    90.0 nem:1 velocity 90.0,0.0,10.0
    90.0 nem:1 orientation 0.0,0.0,0.0
    90.0 nem:1 antennaprofile 1,45.0,0.0
    

    This scenario contains four stages:

    1. NEM 2 and NEM 3 see each other
      NEM 4 and NEM 3 are pointing away

    2. NEM 2 and NEM 3 see each other
      NEM 1 and NEM 2 see each other
      NEM 4 and NEM 3 see each other

    3. NEM 2 and NEM 3 see each other
      NEM 4 and NEM 3 are pointing at each other but blocked

    4. NEM 2 and NEM 3 see each other
      NEM 4 and NEM 3 see each other

    The four stages are illustrated below:

    The antenna and blockage patterns for each stage:

  5. Start up the OLSR topology viewer

    [me@host 6]$ ../scripts/olsrlinkview.py &
    
  6. Let's start the demonstration and see what happens

    [me@host 6]$ sudo ./demo-start
    

    It will take 30 seconds for the demonstration to start.

    While the demonstration is running, you'll see links form in accordance with the four stages of the demonstration.

    You will also see the emaneevent-dump of the published events.

    [1395517938.610985] nem: 0 event: 102 len: 48 seq: 1 [AntennaProfile]
     UUID: c21c254a-7c1f-4a30-8b98-ee3b6ff2e6c3
       (1, {'profile': 1, 'elevation': 0.0, 'azimuth': 0.0})
       (4, {'profile': 2, 'elevation': 0.0, 'azimuth': 0.0})
    [1395517938.611699] nem: 0 event: 100 len: 161 seq: 2 [Location]
     UUID: c21c254a-7c1f-4a30-8b98-ee3b6ff2e6c3
       (1, {'latitude': 40.025495, 'altitude': 3.0, 'longitude': -74.315441})
       (2, {'latitude': 40.025495, 'altitude': 3.0, 'longitude': -74.312501})
       (3, {'latitude': 40.023235, 'altitude': 3.0, 'longitude': -74.315441})
       (4, {'elevation': 0.0, 'altitude': 3.0, 'longitude': -74.312501, 'magnitude': 10.0,
            'azimuth': 180.0, 'latitude': 40.023235})
    [1395517938.612090] nem: 1 event: 101 len: 42 seq: 3 [Pathloss]
     UUID: c21c254a-7c1f-4a30-8b98-ee3b6ff2e6c3
       (2, {'forward': 60.0, 'reverse': 60.0})
       (3, {'forward': 60.0, 'reverse': 60.0})
       (4, {'forward': 60.0, 'reverse': 60.0})
    [1395517938.612404] nem: 2 event: 101 len: 42 seq: 4 [Pathloss]
     UUID: c21c254a-7c1f-4a30-8b98-ee3b6ff2e6c3
       (1, {'forward': 60.0, 'reverse': 60.0})
       (3, {'forward': 60.0, 'reverse': 60.0})
       (4, {'forward': 60.0, 'reverse': 60.0})
    [1395517938.612699] nem: 3 event: 101 len: 42 seq: 5 [Pathloss]
     UUID: c21c254a-7c1f-4a30-8b98-ee3b6ff2e6c3
       (1, {'forward': 60.0, 'reverse': 60.0})
       (2, {'forward': 60.0, 'reverse': 60.0})
       (4, {'forward': 60.0, 'reverse': 60.0})
    [1395517938.612989] nem: 4 event: 101 len: 42 seq: 6 [Pathloss]
     UUID: c21c254a-7c1f-4a30-8b98-ee3b6ff2e6c3
       (1, {'forward': 60.0, 'reverse': 60.0})
       (2, {'forward': 60.0, 'reverse': 60.0})
       (3, {'forward': 60.0, 'reverse': 60.0})
    [1395517968.610256] nem: 0 event: 102 len: 24 seq: 7 [AntennaProfile]
     UUID: c21c254a-7c1f-4a30-8b98-ee3b6ff2e6c3
       (1, {'profile': 1, 'elevation': 0.0, 'azimuth': 60.0})
    [1395517968.610710] nem: 0 event: 100 len: 153 seq: 8 [Location]
     UUID: c21c254a-7c1f-4a30-8b98-ee3b6ff2e6c3
       (1, {'elevation': 0.0, 'altitude': 3.0, 'pitch': 0.0, 'longitude': -74.315441,
            'magnitude': 10.0, 'azimuth': 20.0, 'latitude': 40.025495, 'yaw': 10.0,
            'roll': 0.0})
       (4, {'elevation': 0.0, 'altitude': 3.0, 'longitude': -74.312501, 'magnitude': 10.0,
            'azimuth': 270.0, 'latitude': 40.023235})
    [1395517998.610222] nem: 0 event: 102 len: 48 seq: 9 [AntennaProfile]
     UUID: c21c254a-7c1f-4a30-8b98-ee3b6ff2e6c3
       (1, {'profile': 1, 'elevation': 0.0, 'azimuth': 105.0})
       (4, {'profile': 2, 'elevation': 0.0, 'azimuth': 45.0})
    [1395518028.610701] nem: 0 event: 102 len: 24 seq: 10 [AntennaProfile]
     UUID: c21c254a-7c1f-4a30-8b98-ee3b6ff2e6c3
       (1, {'profile': 1, 'elevation': 0.0, 'azimuth': 45.0})
    [1395518028.611118] nem: 0 event: 100 len: 91 seq: 11 [Location]
     UUID: c21c254a-7c1f-4a30-8b98-ee3b6ff2e6c3
       (1, {'elevation': 0.0, 'altitude': 3.0, 'pitch': 0.0, 'longitude': -74.315441,
            'magnitude': 10.0, 'azimuth': 90.0, 'latitude': 40.025495, 'yaw': 0.0, 'roll': 0.0})
    
  7. Once you are finished, stop the demonstration with demo-stop.
    X marks the spot.

    [me@host 6]$ sudo ./demo-stop
    
Clone this wiki locally