Second generation mesh networks support dual transceivers, so that the last link to and from the STAs can be separated from the remaining mesh backbone. With the flexible configuration provided by the WiFiMAC, the setup of dual-transceiver MPs and APs is not any problem: Instead of adding one transceiver to the configuration, we can add two (or even more than two, if needed).
It is then a matter of configuration to assign useful frequencies to different transceivers. In dual-transceiver mode, a single frequency is required for the mesh network (usually from the 5.5GHz band) and at most 3 non-overlapping channels are available at the 2.4GHz ISM-band.
In the following, we will change the string-topology scenario from experiment 5 to a dual-transceiver mesh. To assign a BSS frequency during the creation, we have to adapt the specialised configuration class so that the frequency can be given a parameter during the creation. Furthermore, the STA configuration needs to know the possible BSS frequencies so that it can scan in the beginning for beacons and associate to the strongest one.
Therefore, we first create a new configuration class MyBSSTransceiver:
####################
# Node configuration
# configuration class for AP and MP BSS transceivers
class MyBSSTransceiver(wifimac.support.Transceiver.Mesh):
def __init__(self, beaconDelay, frequency):
super(MyBSSTransceiver, self).__init__(frequency = frequency)
# Transmission power
self.txPower = dBm(20)
# set the inital start delay of the beacon so that beacons from multiple APs do not collide
self.layer2.beacon.delay = beaconDelay
# rate adaptation strategy: Constant BPSK 1/2
self.layer2.ra.raStrategy = Constant()
# For frames above this threshold (in bit) RTS/CTS will be used
self.layer2.rtsctsThreshold = 8e6
The configuration class MyMeshTransceiver remains as before:
class MyMeshTransceiver(wifimac.support.Transceiver.Mesh):
def __init__(self, beaconDelay):
super(MyMeshTransceiver, self).__init__(frequency = meshFrequency)
# Transmission power
self.txPower = dBm(20)
# set the inital start delay of the beacon so that beacons from multiple APs do not collide
self.layer2.beacon.delay = beaconDelay
# rate adaptation strategy: Constant BPSK 1/2
self.layer2.ra.raStrategy = Constant()
# For frames above this threshold (in bit) RTS/CTS will be used
self.layer2.rtsctsThreshold = 8e6
Whereas the MySTATransceiver is changed to have scanFrequencies as parameter:
# configuration class for STAs
class MySTATransceiver(wifimac.support.Transceiver.Station):
def __init__(self, position, scanFrequencies):
super(MySTATransceiver, self).__init__(frequency = scanFrequencies[0],
position = position,
scanFrequencies = scanFrequencies,
scanDuration = 0.3)
# Transmission power
self.txPower = dBm(20)
# rate adaptation strategy: Constant BPSK 1/2
self.layer2.ra.raStrategy = Constant()
# For frames above this threshold (in bit) RTS/CTS will be used
self.layer2.rtsctsThreshold = 8e6
# End node configuration
########################
The problem how to assign the BSS frequencies in an optimal way to the MPs and APs is discussed in the literature; here, we will use a very simple approach: We have an array of three non-overlapping frequencies bssFrequencies = [2400, 2440, 2480]. When creating the AP and MPs, we use a counter bssCount and assign the frequencies in a round-robin fashion. Hence, the creation e.g. of the MPs is done as follows:
for i in xrange(numHops-1):
bssCount += 1
mpConfig = wifimac.support.Node(position = openwns.geometry.position.Position((i+1)*distance,0,0))
# add BSS transceiver first
mpConfig.transceivers.append(
MyBSSTransceiver(beaconDelay = 0.001+(i+1)*0.001,
frequency = bssFrequencies[bssCount % len(bssFrequencies)]))
# then add mesh transceiver
mpConfig.transceivers.append(MyMeshTransceiver(beaconDelay = 0.001+(i+1)*0.001))
# create MP
mp = nc.createMP(idGen, managerPool, mpConfig)
mp.logger.level = commonLoggerLevel
mp.dll.logger.level = dllLoggerLevel
WNS.simulationModel.nodes.append(mp)
mpIDs.append(mp.id)
mpAdrs.extend(mp.dll.addresses)
print "Created MP at (", (i+1)*distance, ",0,0)",
print "with id ", mp.id, " and addresses ", mp.dll.addresses
The only further change to the config.py from experiment 5 is that the virtual pathselection server now has 1+2*numHops nodes, because each transceiver counts towards this number.
As no new parameters have been created, the same campaignConfiguration.py from experiment 5 can be used.