HOWTO add basic rates to 802.11

From Nsnam
Revision as of 23:04, 15 October 2013 by Nikkipui (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Main Page - Current Development - Developer FAQ - Tools - Related Projects - Project Ideas - Summer Projects

Installation - Troubleshooting - User FAQ - HOWTOs - Samples - Models - Education - Contributed Code - Papers

The 802.11 standard is quite clear on the rules for selection of transmission parameters for control response frames (e.g. CTS and ACK). ns-3 follows the standard and selects the rate of control response frames from the set of basic rates or mandatory rates. This means that control response frames may be sent using different rate even though the ConstantRateWifiManager is used. The ControlMode attribute of the ConstantRateWifiManager is used for RTS frames only. The rate of CTS and ACK frames are selected according to the 802.11 standard.

However, several real 802.11 drivers allow changing the rate of all control frames. To accomplish this in ns-3, you can manually add WifiMode to the basic rate set.

HOWTO add basic rates to 802.11

Here's an example of how you can add basic rates to 802.11b.

 // Add the DSSS/CCK rates as the basic rates of our AP
 Ptr<WifiRemoteStationManager> apStationManager =  DynamicCast<WifiNetDevice>(apDev.Get (0))->GetRemoteStationManager ();
 apStationManager->AddBasicMode (WifiMode ("DsssRate1Mbps"));
 apStationManager->AddBasicMode (WifiMode ("DsssRate2Mbps"));
 apStationManager->AddBasicMode (WifiMode ("DsssRate5_5Mbps"));
 apStationManager->AddBasicMode (WifiMode ("DsssRate11Mbps"));

Please be aware that the rate you are adding must be supported by the PHY layer.