So far, the available parameters to configure a mesh or a STA were restricted to setting e.g.
In this experiment, we will explore the complete configuration structure of the WiFiMAC, which allows the fine-tuning of multiple parameters of the IEEE 802.11 protocol. As a goal of this experiment, the configuration from experiment 5 shall be changed so that 3x3 Multiple Input / Multiple Output (MIMO) transmissions between the APs and the MPs are used; furthermore, the efficiency of the MAC protocol is increased by A-MPDU aggregation and block acknowledgement.
All files belonging to a campaign can be found in the sandbox directory, right under the root directory of the campaign. The configuration files for the WiFiMAC module can be found in the directory
sandbox/opt/lib/PyConfig/wifimac
Each subdirectory provides
To explore the configuration possibilities, we start with the class that is used to create MP/AP transceiver, wifimac.support.Transceiver.Mesh. According to its name, it can be found in the file Transceiver, located in the directory support:
class Mesh(Basic):
def __init__(self, frequency):
super(Mesh, self).__init__(frequency)
self.layer2.beacon.enabled = True
Besides being derived from the class Basic, it activates the beaconing by setting self.layer2.beacon.enabled to True. The class Basic can be found some lines above:
class Basic(object):
position = None
probeWindow = None
layer1 = None
layer2 = None
def __init__(self, frequency):
self.layer1 = wifimac.support.Layer1Config.Basic(frequency, txPower = dBm(30))
self.layer2 = wifimac.Layer2.Config(frequency)
self.probeWindow = 1.0
This class defines the basic properties of every IEEE 802.11 - transceiver: its frequency, the transmission power and its position. Furthermore, the transceiver has to have an implementation of the Layer 2 (the PHY Layer is added by the NodeCreator, which can also be found in the support directory.
In the __init__ function of the class Basic, the frequency is set and the configuration of the Layer 2 is instantiated with the default configuration of wifimac.Layer2.Config, which can be found in the file
sandbox/opt/lib/PyConfig/wifimac/Layer2.py
At the beginning of the file, the creation of the FUNs for stations, MPs and APs is encapsulated in different functions. At the end, the class Config is defined. In the first part, variables are declared that will hold the configurations for different FUs:
class Config(Sealed):
beacon = None
channelState = None
phyUser = None
unicastDCF = None
broadcastDCF = None
arq = None
perMIB = None
protocolCalculator = None
ra = None
rtscts = None
manager = None
txop = None
aggregation = None
frameSynchronization = None
beaconLQM = None
Then, some variables are declared that contain settings for FUs that do not have their own configuration class, or for variables that steer the creation of the FUN.
bufferSize = 10
bufferSizeUnit = 'PDU'
headerBits = 32*8
crcBits = 4*8
maxFrameSize = 65538*8
useFastLinkFeedback = False
probeWindowSize = 1.0
e2eProbeWindowSize = 1.0
funTemplate = None
After this, variables are declared which are used in multiple FUs. The rtsctsThreshold, for example, is not only required in the RTS/CTS - FU, but also in the acknowledgement - FU, as this size controls whether the long- or the short retry counter limit is applied.
# variables which are used multiple times
rtsctsThreshold = None
""" This threshold (in bits) decides if (a) a rts/cts handshake
precedes a frame transmission and (b) if the frame is
considered as large or small (for the retransmission limit)
"""
sifsDuration = None
""" Duration of the Short Interframe Space (SIFS) in seconds
"""
maximumACKDuration = None
""" The maximum duration of a ACK frame [seconds]. This value is used
to set the frame exchange duration field in data (and rts/cts)
frames so that other STAs can set their NAV accordingly.
"""
maximumCTSDuration = None
""" Similar to maximumACKDuration but for the CTS frame - used in the
RTS frame [seconds].
"""
eifsDuration = None
ackTimeout = None
ctsTimeout = None
slotDuration = None
""" The duration of a backoff slot [seconds]."""
preambleProcessingDelay = None
""" Delay from the start of the preamble (which is small+long training
sequence plus PLCP Header) until the receiver has identified the
preamble as valid OFDM transmission and signals RxStartIndication -->
duration of preamble plus short delay
"""
In the __init__ function, the several sub-configuration classes are initialised with their default sub-configurations:
def __init__(self, initFrequency):
self.beacon = wifimac.management.BeaconConfig()
self.channelState = wifimac.convergence.ChannelStateConfig()
self.phyUser = wifimac.convergence.PhyUserConfig(initFrequency)
self.unicastDCF = wifimac.lowerMAC.DCFConfig()
self.broadcastDCF = wifimac.lowerMAC.DCFConfig(cwMin = 7, cwMax = 7)
self.arq = wifimac.lowerMAC.StopAndWaitARQConfig()
self.perMIB = wifimac.management.InformationBases.PERConfig()
self.protocolCalculator = wifimac.protocolCalculator.Config()
self.ra = wifimac.lowerMAC.RateAdaptationConfig()
self.rtscts = wifimac.lowerMAC.RTSCTSConfig()
self.manager = wifimac.lowerMAC.ManagerConfig()
self.txop = wifimac.lowerMAC.TXOPConfig()
self.aggregation = wifimac.draftn.AggregationConfig()
#self.multiBuffer = wifimac.draftn.MultiBufferConfig()
#self.blockACK = wifimac.draftn.BlockACKConfig()
self.blockUntilReply = wifimac.draftn.BlockUntilReplyConfig()
self.frameSynchronization = wifimac.convergence.FrameSynchronizationConfig()
self.beaconLQM = wifimac.pathselection.BeaconLinkQualityMeasurementConfig()
The remaining part of the function then controls the initialisation of the variables which are used in multiple FUs.
Therefore, a configuration variable is either found on this level of the configuration tree (e.g. bufferSize or sifsDuration), or in one the sub-configurations. Especially interesting is the variable funTemplate, which is a pointer to a class that is able to generate the functional unit network of the node. Its default value, wifimac.FUNModes.Basic, represents the class that creates a FUN for the basic operation of IEEE 802.11. To enable the enhancements of the “n” amendement, it has to be set to wifimac.FUNModes.DraftN.
The file structure where the sub-configuration classes can be found can easily be derived from the name of the class: For example, the configuration for the beacon, stored in self.beacon, is initialised with wifimac.management.BeaconConfig(). Hence, it can be found in the file
sandbox/opt/lib/PyConfig/wifimac/management/Beacon.py
class BeaconConfig(object):
enabled = True
delay = 0.1
""" Initial start delay"""
period = 0.1
""" Beacon transmission period, common value is 100ms """
scanDuration = 0.3
""" duration of scanning(for each frequency) before association for STAs """
scanFrequencies = None
""" freqencies to scan for beacons """
beaconPhyMode = wifimac.convergence.PhyMode.IEEE80211a().getLowest()
""" PhyMode with which the beacon is transmitted --> default the lowest for most robustness"""
bssId = 'ComNetsWLAN'
""" for APs: bssId set in the beacon; for STAs: Only associate to bssIds with this name """
def __init__(self, **kw):
self.scanFrequencies = []
openwns.pyconfig.attrsetter(self, kw)
As we can see from the configuration below, it is possible to change
Draw a “Configuration Tree” (with pencil & paper): Starting from the configuration class in Layer2.py, collect all settings in the sub-configuration and display them in a tree-like structure. Alternatively, see Using the openWNS Configuration Browser PyTree, e.g. for the configuration file of experiment 1, search for the AP-node and then for its Layer2 configuration.
Selecting the class wifimac.FUNModes.DraftN for the variable funTemplate activates the MAC enhancements of the amendment IEEE 802.11n. This is done by adding an appropriate Line to the classes MyMeshTransceiver and mySTATransceiver. How are the following parameters changed:
Create a new sub-campaign that uses the configuration file from experiment 5. Enable the enhancements from IEEE 802.11n in both the mesh and the STA transceiver, with the following settings:
Additionally, the mesh transceivers shall use the rate adaptation strategy SINRwithMIMO to enable the transmission of multiple spatial streams; STAs shall use the rate adaptation strategy OpportunisticwithMIMO.
Evaluate the saturation throughput of the scenario in experiment 5 using