Bug 177

Summary: Wifi default beacon interval not very realistic
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: devicesAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: pre-release   
Hardware: All   
OS: All   

Description Gustavo J. A. M. Carneiro 2008-04-29 09:44:15 UTC
In src/devices/wifi/nqap-wifi-mac.cc:

NqapWifiMac::GetTypeId (void)
{
  static TypeId tid = TypeId ("ns3::NqapWifiMac")
    .SetParent<WifiMac> ()
    .AddConstructor<NqapWifiMac> ()
    .AddAttribute ("BeaconInterval", "Delay between two beacons",
                   TimeValue (Seconds (1.0)),
                   MakeTimeAccessor (&NqapWifiMac::m_beaconInterval),
                   MakeTimeChecker ())


Looking at the 802.11 standard I couldn't find any default value for beacon interval, but experience tells me that 1 second is unrealistic and 100 ms is a more suitable default value.
Comment 1 Gustavo J. A. M. Carneiro 2008-06-03 13:04:15 UTC
See http://telecom.inescporto.pt/~gjc/Screenshot-(Untitled)%20-%20Wireshark.png
Shows real live capture, approximately 100 ms interval.

Patch is trivial:

diff -r 539a710e5cf9 src/devices/wifi/nqap-wifi-mac.cc
--- a/src/devices/wifi/nqap-wifi-mac.cc	Tue Jun 03 07:09:40 2008 -0700
+++ b/src/devices/wifi/nqap-wifi-mac.cc	Tue Jun 03 18:00:01 2008 +0100
@@ -44,7 +44,7 @@ NqapWifiMac::GetTypeId (void)
     .SetParent<WifiMac> ()
     .AddConstructor<NqapWifiMac> ()
     .AddAttribute ("BeaconInterval", "Delay between two beacons",
-                   TimeValue (Seconds (1.0)),
+                   TimeValue (Seconds (0.1)),
                    MakeTimeAccessor (&NqapWifiMac::m_beaconInterval),
                    MakeTimeChecker ())
     .AddAttribute ("BeaconGeneration", "Whether or not beacons are generated.",
Comment 2 Mathieu Lacage 2008-06-03 13:11:36 UTC
please, commit.