This example shows how to decode IEEE® 802.11™ MAC frames.
Background
Download Apple tvOS 14.0.2 for Apple TV 4K. OS support: Mac OS X. Category: System Updates. Refer IEEE 802.11ac physical layer which describes all the modules except the above enhancements which are introduced in the WLAN 802.11ax physical layer. WLAN 802.11ax MAC Layer. Only one packet type has been used in legacy WLAN standards and there was no distinguing feature to segregate downlink and uplink directions. Download Realtek RTL8811CU Controlller WLAN USB Driver 10.2017 (Network Card).
802.11ac or VHT mode: Note: The setting 802.11n Mode is available only for the following legacy adapters. For other adapters use the 802.11n/ac Wireless Mode or HT Mode.
The general MAC frame format consists of a header, frame-body, and frame check sequence (FCS). The header holds information about the frame. The frame-body carries data that needs to be transmitted. The transmitter calculates the FCS over the header and frame-body. The receiver uses the FCS to confirm that the header and frame-body are properly received. The following diagram shows the structure of a general MAC frame.
The standard specifies four types of frames: Management, Data, Control, and Extension. There are multiple subtypes of each frame type. These are identified by the Type and Subtype fields of the frame control field in the MAC header.
Management Frames:
Frames that are used for connection establishment and maintenance.
These frames carry the information fields and elements that indicate the capabilities and configuration of the device operating in the 802.11 network. While establishing the connection, these information fields and elements are communicated between the devices to match capabilities of both devices.
The MAC layer adds header and FCS to the frame-body carrying the information to form a MAC protocol data unit (MPDU).
Data Frames:
Frames that are used to transmit the higher-layer data.
The payload given to the MAC layer is termed MAC service data unit (MSDU). The MAC layer adds header and FCS to the MSDU to form an MPDU.
To improve the throughput, WLAN supports aggregated MSDUs (A-MSDUs) and aggregated MPDUs (A-MPDUs) as specified in Sections 9.3.2.2, 9.7 of [ 1 ] and [ 2 ].
If MSDU aggregation is enabled, multiple MSDUs are aggregated to form an A-MSDU and then the MAC header and FCS are added to an A-MSDU to form an MPDU.
If MPDU aggregation is enabled, multiple MPDUs are aggregated to form an A-MPDU.
Control Frames:
Frames that are used to support the delivery of data, management and extension frames.
Each control frame has a specific functionality. For instance, control frames like request-to-send (RTS) and clear-to-send (CTS) help in reserving the channel to avoid collisions, while Ack frames help in recognizing successful transmission.
Extension Frames:
This frame type is an extension to the three frame types defined above.
DMG Beacon is the only frame currently specified under this frame type in [ 1 ].
Introduction
This example shows how WLAN MAC frames specified in Section 9.3 of [ 1 ] or [ 2 ] can be decoded. It also shows how aggregated MAC frames specified in Section 9.7 of [ 1 ] or [ 2 ] can be deaggregated.
WLAN Toolbox™ supports MPDU decoding for the following MAC frames:
Management Frames: Beacon
Data Frames: Data, Null, QoS Data, QoS Null
Control Frames: RTS, CTS, Ack, Block Ack
In addition to MPDU decoding, WLAN Toolbox also supports deaggregation of an A-MPDU.
MPDU Decoding
An MPDU can be a data, control or management frame type. wlanMPDUDecode
can be used to decode an MPDU. This function processes the given MPDU and a physical layer configuration object to output the decoded MAC parameters.
802.11ac Software Download For Mac Download
To illustrate MPDU decoding, a valid MPDU is created using wlanMACFrame
. The created MPDU is passed to the wlanMPDUDecode
function and the outputs are observed.
Create an MPDU
A QoS Data frame is created for this example using wlanMACFrame
. The following inputs are required to form a Non-HT format QoS Data frame containing a 40-octet payload:
txFrameCfg
: A MAC frame configuration object of typewlanMACFrameConfig
.txMSDU
: A 40-octet payload (MSDU) to be included in the QoS Data frame.
Decode the MPDU
wlanMPDUDecode
consumes an MPDU, a PHY configuration object of type wlanNonHTConfig
, wlanHTConfig
, wlanVHTConfig
, or wlanHESUConfig
and optionally a (Name, Value) pair for DataFormat
specifying the input format of the MPDU. Since the MPDU generated using wlanMACFrame
is in terms of octets, DataFormat
is set to octets
. wlanMPDUDecode
decodes the MPDU and outputs the following information:
rxFrameCfg
: A MAC frame configuration object of typewlanMACFrameConfig
, containing the decoded MAC parameters.rxMSDU
: A cell array, where each element is an n-by-2 character array representing the decoded MSDU. Multiple MSDUs are returned when the MPDU contains an aggregated MSDU (A-MSDU) as the payload.status
: An enumeration of type status, which indicates whether the MPDU decoding was successful.
A-MPDU Deaggregation
An A-MPDU is an aggregation of multiple MPDUs. The type of MPDUs in an A-MPDU are restricted as specified in Section 9.7.3 of [ 1 ].
wlanAMPDUDeaggregate
can be used to deaggregate an A-MPDU. This function processes the given A-MPDU and the corresponding physical layer configuration object to output the deaggregated list of MPDUs. wlanAMPDUDeaggregate
is capable of decoding HT (High Throughput), VHT (Very High Throughput), HE-SU (High Efficiency Single User) and HE-EXT-SU (High Efficiency Extended Range Single User) format A-MPDUs as specified in [ 1 ] and [ 2 ].
To illustrate the A-MPDU deaggregation, a valid A-MPDU containing five MPDUs is created using wlanMACFrame
. The created A-MPDU is passed to the wlanAMPDUDeaggregate
function and the outputs are observed.
Create an A-MPDU
The following inputs are required to form an HE-SU format A-MPDU containing five MPDUs (QoS Data frames), each MPDU containing a 40-octet payload:
txFrameCfg
: A MAC frame configuration object of typewlanMACFrameConfig
.txMSDUList
: A five element cell array containing payload (MSDU) for five MPDUs. SinceMSDUAggregation
is set to false in thetxFrameCfg
, a separate MPDU is created for each MSDU.phyCfg
: A physical layer configuration object of typewlanHESUConfig
.
Deaggregate the A-MPDU
wlanAMPDUDeaggregate
consumes an A-MPDU, a PHY configuration object of type wlanHTConfig
, wlanVHTConfig
, or wlanHESUConfig
and optionally a (Name, Value) pair for DataFormat
specifying the input format of the A-MPDU. It finds and validates the MPDU delimiters, extracts the MPDUs and outputs the following information that can be used for further processing the MPDUs:
802.11ac Wlan Adapter Driver Download
mpduList
: A cell array containing the list of MPDUs extracted from the A-MPDU.delimCRCFails
: A logical row vector representing delimiter CRC validity for the corresponding index inmpduList
. A value of true represents that the MPDU present inmpduList
at the corresponding index may not be properly extracted.ampduStatus
: An enumeration of type status, which indicates whether the A-MPDU deaggregation was successful.
Decode the list of MPDUs
The mpduList
contains the list of MPDUs extracted from the A-MPDU. Each of the MPDUs present in the list can be decoded separately. However, if the delimCRCFails
contains any true
values, the MPDU present in mpduList
at the corresponding index can be considered invalid as it may not be properly extracted because of the delimiter CRC failure.
Conclusion and Further Exploration
This example demonstrated how to deaggregate and decode IEEE 802.11 MAC frames. You can also explore 802.11 OFDM Beacon Receiver with Captured Data and Recovery Procedure for an 802.11ac Packet examples for decoding the MAC frames retrieved from the captured waveforms.
Selected Bibliography
802.11n Vs 802.11ac
IEEE Std 802.11™-2016 IEEE Standard for Information technology - Telecommunications and information exchange between systems - Local and metropolitan area networks - Specific requirements - Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications
IEEE P802.11ax™/D4.1 Draft Standard for Information technology - Telecommunications and information exchange between systems Local and metropolitan area networks - Specific requirements Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications - Amendment 6: Enhancements for High Efficiency WLAN