Bug 1066

Summary: Set Radiotap modulation type flags correctly
Product: ns-3 Reporter: Dean Armstrong <deanarm>
Component: wifiAssignee: Nicola Baldo <nicola>
Status: RESOLVED FIXED    
Severity: minor CC: deanarm, ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: minimal patch
corrected minimal patch

Description Dean Armstrong 2011-02-28 06:39:22 EST
The PromiscSnifferRx and PromiscSnifferTx trace sources on WifiPhy
objects allow generation of PCAP (with Radiotap header) traces as form
of simulation output. Unfortunately, the Radiotap flags that indicate
modulation type are not being set correctly for 802.11g devices.

Specifically, the current code in yans-wifi-helper.cc (and, for that
matter, spectrum-wifi-helper.cc) assumes that OFDM modulation (for
which there is a Radiotap flag) is used only above 2.5 GHz (i.e., at 5
GHz in the form of, e.g., 802.11a), and that "CCK" is used
elsewhere. Since 802.11g support has been added to ns-3, this is no
longer unconditionally true.

The fix I'm proposing can be seen as the sum of changesets
6820:110ddcce20bb and 6821:9be74ee020fa (which would be combined as
appropriate before any push) in
http://code.nsnam.org/deanarm/ns-3-dev-wifi-spectrum
Comment 1 Nicola Baldo 2011-03-01 12:07:06 EST
Thank for this contribution! Radiotap support was introduced before 802.11g support, so you're right it should be fixed.


The biggest issue I see in your proposed change is here:
http://code.nsnam.org/deanarm/ns-3-dev-wifi-spectrum/rev/110ddcce20bb

I see that you replaced the PHY rate with a WifiMode. The current design was chosen to avoid introducing a dependency on the wifi module:
http://groups.google.com/group/ns-3-reviews/browse_thread/thread/7e59007015ac4fa4/d5aa7dc657cd9987?lnk=gst&q=radiotap#d5aa7dc657cd9987

I am not sure wheter this problem is still actual, after the PCAP helper refactoring and the recent module refactoring.
Comment 2 Nicola Baldo 2011-04-10 12:17:45 EDT
Created attachment 1063 [details]
minimal patch

Here is a minimal patch that should fix the problem without changing the PcapSniff API.
Comment 3 Nicola Baldo 2011-04-10 12:35:02 EDT
Created attachment 1064 [details]
corrected minimal patch

whoops I forgot the TX and RX events are separate
Comment 4 Nicola Baldo 2011-04-10 12:39:42 EDT
I did some tests and the new proposed patch works correctly, hence I pushed it.

changeset:   7012:67ca195ea166