Bug 177 - Wifi default beacon interval not very realistic
Wifi default beacon interval not very realistic
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: devices
pre-release
All All
: P3 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-29 09:44 UTC by Gustavo J. A. M. Carneiro
Modified: 2008-07-01 13:32 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.