802.11 OFDM Beacon Frame Generation - MATLAB & Simulink (2024)

This example uses:

  • WLAN ToolboxWLAN Toolbox
  • Communications Toolbox Support Package for Analog Devices ADALM-PLUTO RadioCommunications Toolbox Support Package for Analog Devices ADALM-PLUTO Radio

Open Live Script

This example shows how to generate packets containing medium access control (MAC) beacon frames suitable for baseband simulation or over-the-air transmission using a software-defined radio (SDR) platform.

Introduction

In this example, you create an IEEE® 802.11™ beacon frame as described in section 9.3.3.3 of [1]. You can view the beacon packet transmitted using SDR by using A Wi-Fi device, as shown in this figure.

802.11 OFDM Beacon Frame Generation- MATLAB & Simulink (1)

A beacon frame is a type of management frame that identifies a basic service set (BSS) formed by some 802.11 devices. The beacon frame consists of a MAC header, a beacon frame body and a valid frame check sequence (FCS). The beacon frame body contains information fields that allow stations to associate with the network.

You can store the generated waveform in a baseband file format.

You can also transmit the generated waveform over the air. Upconvert the beacon packet for RF transmission using an Analog Devices® ADALM-Pluto radio. The radio hardware can transmit the waveform over the air.

802.11 OFDM Beacon Frame Generation- MATLAB & Simulink (2)

Transmitting the beacon over the air requires the ADALM-Pluto radio support package, which you can install with the Add-On Explorer. For more information about SDR platforms, see Hardware Support: Communications Toolbox.

Example Setup

The beacon packet can be written to a baseband file and transmitted using an SDR platform. To transmit the beacon using the SDR platform set useSDR to true. To write to a baseband file set saveToFile to true.

Create IEEE 802.11 Beacon Frame

A station (STA) periodically transmits beacon packets as specified by the target beacon transmission time (TBTT) in the Beacon Interval field. The beacon interval represents the number of time units (TUs) between TBTTs, where 1 TU represents 1024 microseconds. A beacon interval of 100 TUs results in a 102.4 millisecond time interval between successive beacons. You can generate a beacon frame by using the wlanMACFrame function with medium access control (MAC) frame configuration object wlanMACFrameConfig and MAC frame-body configuration object wlanMACManagementConfig.

Specify the network service set identifier (SSID), beacon interval, operating band, and channel number.

ssid = "TEST_BEACON";beaconInterval = 100;band = 5;chNum = 52;

Create a MAC frame-body configuration object, setting the SSID and Beacon Interval field value.

frameBodyConfig = wlanMACManagementConfig( ... BeaconInterval=beaconInterval, ... SSID=ssid);

Add the DS Parameter information element (IE) to the frame body by using the addIE object function.

dsElementID = 3;dsInformation = dec2hex(chNum,2);frameBodyConfig = frameBodyConfig.addIE(dsElementID,dsInformation);

Create beacon frame configuration object.

beaconFrameConfig = wlanMACFrameConfig(FrameType="Beacon", ... ManagementConfig=frameBodyConfig,FromDS=false);

Generate beacon frame bits.

[mpduBits,mpduLength] = wlanMACFrame(beaconFrameConfig,OutputFormat="bits");

Calculate center frequency for the specified operating band and channel number.

fc = wlanChannelFrequency(chNum,band);

Create IEEE 802.11 Beacon Packet

Configure a non-HT beacon packet with the relevant PSDU length, specifying a channel bandwidth of 20 MHz, one transmit antenna, and BPSK modulation with a coding rate of 1/2 (corresponding to MCS index 0) by using the wlanNonHTConfig object.

cfgNonHT = wlanNonHTConfig(PSDULength=mpduLength);

Generate an oversampled beacon packet by using the wlanWaveformGenerator function, specifying an idle time.

osf = 2;tbtt = beaconInterval*1024e-6;txWaveform = wlanWaveformGenerator(mpduBits,cfgNonHT,...  OversamplingFactor=osf,Idletime=tbtt);

Get the waveform sample rate.

Rs = wlanSampleRate(cfgNonHT,OversamplingFactor=osf);

Save Waveform to File

Save the waveform in a baseband file using the comm.BasebandFileWriter object.

if saveToFile bbw = comm.BasebandFileWriter("nonHTBeaconPacket.bb",Rs,fc); %#ok<UNRCH> bbw(txWaveform); release(bbw);end

Transmission with an SDR Device

In this section, you transmit the beacon packet over the air using an SDR device.

if useSDR % The SDR platform must support transmitRepeat. sdrPlatform = 'Pluto'; %#ok<UNRCH> tx = sdrtx(sdrPlatform); tx.BasebandSampleRate = Rs; % Set the center frequency to the corresponding channel number tx.CenterFrequency = fc;end

To impair the signal or reduce transmission quality of the waveform, you can adjust the transmitter gain tx.Gain. This parameter, expressed in dB, drives the power amplifier in the radio. You can use these suggested values, or select different values appropriate for your antenna configuration.

  • For increased gain, set the tx.Gain parameter to 0.

  • For default gain, set the tx.Gain parameter to -10.

  • For reduced gain, set the tx.Gain parameter to -20.

Transfer the baseband waveform to the SDR platform by using the transmitRepeat function, and then store the signal samples in hardware memory. The example then repeatedly transmits this waveform over-the-air until the release method of the transmit object is called. Messages are displayed in the command window to confirm that transmission has started successfully.

if useSDR % Set transmit gain tx.Gain = 0; %#ok<UNRCH> % Transmit over the air transmitRepeat(tx,txWaveform);end

Conclusion and Further Exploration

This example shows how to generate a beacon packet for the IEEE 802.11 standard and view the beacon packet transmitted using SDR hardware by using a Wi-Fi device. You can use the stored baseband beacon packet to recover the transmitted information using the WLAN Beacon Receiver Using Software-Defined Radio example.

Related Examples

  • WLAN Beacon Receiver Using Software-Defined Radio

  • Recover and Analyze Packets in 802.11 Waveform

  • 802.11 MAC Frame Generation

References

  1. IEEE Std 802.11™-2020 IEEE(Revision of IEEE Std 802.11-2016). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications.” IEEE Standard for Information technology — Telecommunications and information exchange between systems. Local and metropolitan area networks — Specific requirements.

802.11 OFDM Beacon Frame Generation
- MATLAB & Simulink (2024)
Top Articles
An Archanic Arrow Head Shaped And A Broze Bell
Lures: a comprehensive guide
Is Sam's Club Plus worth it? What to know about the premium warehouse membership before you sign up
4-Hour Private ATV Riding Experience in Adirondacks 2024 on Cool Destinations
Best Big Jumpshot 2K23
Asian Feels Login
Koordinaten w43/b14 mit Umrechner in alle Koordinatensysteme
Fully Enclosed IP20 Interface Modules To Ensure Safety In Industrial Environment
35105N Sap 5 50 W Nit
Yi Asian Chinese Union
Seth Juszkiewicz Obituary
Uvalde Topic
Tight Tiny Teen Scouts 5
Olivia Ponton On Pride, Her Collection With AE & Accidentally Coming Out On TikTok
Missing 2023 Showtimes Near Landmark Cinemas Peoria
About Us | TQL Careers
Tracking Your Shipments with Maher Terminal
finaint.com
Soccer Zone Discount Code
E22 Ultipro Desktop Version
Rondom Ajax: ME grijpt in tijdens protest Ajax-fans bij hoofdbureau politie
Bridge.trihealth
Swgoh Blind Characters
Uta Kinesiology Advising
Jeff Now Phone Number
Busted News Bowie County
The Tower and Major Arcana Tarot Combinations: What They Mean - Eclectic Witchcraft
Roane County Arrests Today
F45 Training O'fallon Il Photos
Raw Manga 1000
Surplus property Definition: 397 Samples | Law Insider
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Apparent assassination attempt | Suspect never had Trump in sight, did not get off shot: Officials
Helloid Worthington Login
October 31St Weather
Dr Adj Redist Cadv Prin Amex Charge
Craigslist Jobs Brownsville Tx
Craigslist Free Manhattan
Atlanta Musicians Craigslist
Entry of the Globbots - 20th Century Electro​-​Synthesis, Avant Garde & Experimental Music 02;31,​07 - Volume II, by Various
Academy Sports New Bern Nc Coupons
Jetblue 1919
Emily Browning Fansite
فیلم گارد ساحلی زیرنویس فارسی بدون سانسور تاینی موویز
Blue Beetle Showtimes Near Regal Evergreen Parkway & Rpx
The Horn Of Plenty Figgerits
R/Gnv
The Machine 2023 Showtimes Near Roxy Lebanon
Mega Millions Lottery - Winning Numbers & Results
Naomi Soraya Zelda
St Als Elm Clinic
Grace Charis Shagmag
Latest Posts
Article information

Author: Aracelis Kilback

Last Updated:

Views: 6324

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Aracelis Kilback

Birthday: 1994-11-22

Address: Apt. 895 30151 Green Plain, Lake Mariela, RI 98141

Phone: +5992291857476

Job: Legal Officer

Hobby: LARPing, role-playing games, Slacklining, Reading, Inline skating, Brazilian jiu-jitsu, Dance

Introduction: My name is Aracelis Kilback, I am a nice, gentle, agreeable, joyous, attractive, combative, gifted person who loves writing and wants to share my knowledge and understanding with you.