Main Content

802.11具有捕获数据的OFDM信标接收器

该示例显示了一个接收器设计,可以以商业802.11硬件在空中传输的非HT格式中恢复802.11™OFDM信标包。Beacon数据包通常以非HT格式传输,即使是HT [1],VHT [1], and/or HE [2功能硬件。在恢复期间打印到命令行之类的数据包信息。

Introduction

此示例说明了使用WLAN Toolbox™来恢复真实信号。它演示了一种接收器设计,包括同步,传输配置恢复和非HT分组的有效载荷解码。该示例从包含捕获的基带波形的文件恢复信标包。

信标包恢复

以下步骤顺序地发生恢复一个非HT数据包:

  • 数据包检测:首先必须在任何处理开始之前检测到数据包。这是通过自动关联输入符号来实现的。由于每个802.11 OFDM分组的前面包含称为L-STF的重复结构,因此在存在此分组时的相关性中将发生峰值。然后提取L-STF字段并用于粗略频率估计。

  • 符号时序:一旦检测到数据包,将收集未来的符号并交联以定位L-LTF。得到的相关峰提供精确的计时估计。一旦全L-LTF所在,就会提取并用于信道估计和微频估计。

  • L-SIG Decoding: The first OFDM symbol after the L-LTF is the L-SIG field. This field must be recovered and decoded to determine the modulation, code rate, and length of the following payload. The information is used to capture the correct amount of data after the L-SIG for the complete payload and to decode that information.

  • Payload Decoding: All OFDM symbols after the L-SIG are buffered to a length determined by the L-SIG field. After all the symbols have been captured they are demodulated and decoded into their source bits. The source bits are then evaluated. This evaluation includes frame check sequence (FCS) validation and extraction of the header and body. If the packet is of subtype beacon, summary information such as SSID will be printed for the recovered packet.

一旦收到完整数据包或在处理链期间发生任何故障时,接收器将返回数据包检测以搜索更多数据包。在信号的持续时间重复该过程。

捕获数据的流过程

In this example an off-the-air capture is processed to recover beacon frames. A Wi-Fi® signal was captured using an RF interface with one receive antenna at a sampling rate of 20 Msps. The captured waveform is stored in a binary baseband file. The file was created usingcomm.basebandfilewriter.

捕获的波形以流式方式处理。在每次迭代中拉动一块样品进行处理。尽可能多地检索许多有效数据包。comm.basebandfilereader.用于从二进制基带文件中读取样本块。

% Create an object to stream the data from the filebasebandReader = comm.BasebandFileReader(......'文件名''nonhtbeaconconrxdata.bb'......'SamplesPerFrame'那80);%在20 MHz的1个OFDM符号中的百分比数量

The center frequency, sample rate and number of channels in the captured waveform are provided by the comm.BasebandFileReader object.

disp(['Center frequency: 'num2str(baseBarreader.Centerfrequency / 1E6)'MHz'])DISP(['采样率: 'num2str(basebandreader.samplerate / 1e6)' Msps'])DISP(['Number of receive antennas: 'num2str(basebandReader.NumChannels) newline])
Center frequency: 5785 MHz Sample rate: 20 Msps Number of receive antennas: 1

一种非反应对象执行前端处理和L-SIG解码。该对象配置有20 MHz的信道带宽以处理非HT数据包。只支持一个接收天线。金宝app

rxfrontend.= nonHTFrontEnd('信道带宽''CBW20');

一种while loop is used to process blocks of samples and recover beacon packets until no more data is available in the baseband file. In each iteration of the loop a block of samples is read from the baseband file and is processed byrxfrontend.rxfrontend.执行前端处理和缓冲器样本,直到检测到数据包并且收到有效载荷。什么时候payloadFullis true, the full payload has been buffered andrxfrontend.returns variables to allow the data within the packet to be recovered:

  • cfgnonht.包含来自L-SIG的恢复的数据包参数。

  • rxnonhtdata.is the time-domain non-HT data field signal.

  • chcontains the channel estimates obtained from the L-LTF.

  • noiseVaris the fixed noise variance value.

The packet payload bits are recovered from the non-HT data field samples usingwlanNonHTDataRecover。The bits are then validated and decoded bywlanmpdudecode.to recover the MAC frame parameters.wlanmpdudecode.returns the following outputs that determine whether the received packet passed FCS check and whether the received packet is a beacon frame.

  • MPDUCFG.is an object of typewlanmacframeconfig.包含来自信标帧的恢复的MAC帧参数。

  • status是一个类型的枚举status当MPDU通过FCS检查时,将其返回为“成功”并将MPDU失败FCS检查时作为“FCSFAILED”。

If a valid beacon is detected, the decoded SSID is displayed.

% Symbol-by-symbol streaming processnumValidPackets = 0;while〜ISDONE(BasebandReader)% Pull in one OFDM symbol, i.e. 80 samplesdata = basebandReader();% Perform front-end processing and payload buffering[PAYLOADFULL,CFGNONHT,RXNONHTDATA,CHANEST,NOISEVAR] =......rxfrontend.(data);ifpayloadFull% Recover payload bits with zero-forcing equalizationrecBits = wlanNonHTDataRecover(rxNonHTData, chanEst,......noiseVar, cfgNonHT,'平等化方法''ZF');% Decode and evaluate recovered bits[mpduCfg, ~, status] = wlanMPDUDecode(recBits, cfgNonHT);ifstrcmp(status,'Success') && strcmp(mpduCfg.FrameType,'灯架')Framebody = MPDucfg.ManagementConfig;% Display SSIDdisp(['SSID: '那frameBody.SSID]) numValidPackets = numValidPackets + 1;结尾结尾结尾disp([num2str(numvalidpackets),'找到有效的信标包'])释放(BaseBandReader);释放(rxfrontend);
名称:MathWorks-SDR名称:MathWorks-SDR名称:数学Works-SDR 3 Valid Beacon Packets Found

Further Exploration

802.11具有USRP®硬件的OFDM信标接收器有关使用USRP处理实时信号的示例。

附录

此示例使用以下辅助功能和对象:

选择ed Bibliography

  1. IEEE®STD802.11™-2016信息技术的IEEE标准 - 系统之间的电信和信息交流 - 本地和大都市区域网络 - 特定要求 - 第11部分:无线LAN介质访问控制(MAC)和物理层(PHY)规格。

  2. 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.