Bug 397

Summary: Custom WifiModes apparently not possible in infrastructure mode
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: wifiAssignee: Mathieu Lacage <mathieu.lacage>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: craigdo, mathieu.lacage
Priority: P3    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Gustavo J. A. M. Carneiro 2008-10-29 14:37:14 EDT
I was trying, unsuccessfully, to use a custom WifiMode with NS 3.  The code is something like:

WIMAX_DATA_RATE = 2000000 # (bit/s)
wimaxWifiMode = ns3.WifiModeFactory.CreateBpsk("wimax", False, 20000000, WIMAX_DATA_RATE, 12000000)   
[...]
wifiDevice = ns3.WifiNetDevice()
mode = ns3.WifiModeValue(wimaxWifiMode)
manager = ns3.ConstantRateWifiManager(DataMode=mode, ControlMode=mode)
wifiDevice.SetRemoteStationManager(manager)

The end result is that the station can receive packets, but is unable to associate.  Even if I change WIMAX_DATA_RATE to 6000000, which is basically the same default datarate value used by ns3.ConstantRateWifiManager, it still doesn't work.  If I remove my custom mode and let ns3.ConstantRateWifiManager use its default one, then it works.

Now, while it is certainly possible that I have missed something, then I see code such as this in WifiPhy:

void
WifiPhy::Configure80211a (void)
{
  NS_LOG_FUNCTION (this);
  Configure80211aParameters ();
  m_modes.push_back (g_6mba);
  m_modes.push_back (g_9mba);
  m_modes.push_back (g_12mba);
  m_modes.push_back (g_18mba);
  m_modes.push_back (g_24mba);
  m_modes.push_back (g_36mba);
  m_modes.push_back (g_48mba);
  m_modes.push_back (g_54mba);

  PrintModes ();
}

This leads me to suspect that WifiNetDevice will not work with other modes except the builtin ones.  And that is a shame.

In related subject, I get the feeling a lot of standard data rates are missing from the builtin ns-3 modes.  Quick googling shows data rates such as 1, 2, and 5.5 Mbit/s, see http://www.moonblinkwifi.com/differences_in_80211b_and_802.cfm
Comment 1 Gustavo J. A. M. Carneiro 2008-10-29 14:48:26 EDT
(In reply to comment #0)
> In related subject, I get the feeling a lot of standard data rates are missing
> from the builtin ns-3 modes.  Quick googling shows data rates such as 1, 2, and
> 5.5 Mbit/s, see http://www.moonblinkwifi.com/differences_in_80211b_and_802.cfm
 
OK, so I get it now that WifiNetDevice is implementing 802.11a instead of b/g.  Kind of strange, but not wrong :)  But never mind this comment.
Comment 2 Mathieu Lacage 2008-11-25 09:16:16 EST
so, should I close this bug gustavo ? If not, can you try to rephrase it for me ?
Comment 3 Gustavo J. A. M. Carneiro 2008-11-25 09:42:53 EST
Well, the main issue remains.  In NS-2 wifi, at least when I used it a couple of years ago, it was rather simple to specify custom data rates and custom basic rates; you would just say how many bit/s data rate, and how many bit/s basic rate, and so on.  In NS-3 it seems to be nigh impossible.

It would be a "nice to have" enhancement.  But I don't have the skills to make it work, all the PHY level stuff is black magic to me.  If no one else plans to provide a patch, I guess you can just close with WONTFIX.
Comment 4 Mathieu Lacage 2008-12-10 02:32:52 EST
we don't need to mark this issue as WONTFIX because we could improve the current situation but I see no point in making this bug P1. Hence, marking P3