WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2016-May-27 01:48:42

liyize
Member
Registered: 2016-Apr-24
Posts: 4

The minimun length of MAC_payload?

Hi!

  we use matlab(2011a) simulink to do some simulations. First we change some parameters in "wlan_phy_tx_init.m" and use "wlan_phy_tx_pmd.mdl" to generate the wlan output signal. Then we load the signal in "wlan_phy_rx_init.m" as the  wlan input signal and use "wlan_phy_tx_pmd.mdl" to process the signal. Finally we use virtual oscilloscopes to annalyze the results. And we also plot the signal wave and print the valid rx_byte on the console.
 
   Once we changed the tx_sim.MAC_payload to [1 2 3 0 0 0 0] in "wlan_phy_tx_init.m" (three bytes payload[1 2 3] and four bytes for CRC), and we found the "wlan_phy_tx_pmd.mdl" can not give the correct rx_byte.
   
   The code :
   

Matlab Code wrote:

if(~exist('gen_waveform_mode', 'var'))
    tx_sim = struct();
    tx_sim.MAC_payload = [1 2 3 0 0 0 0];
    tx_sim.payload_len = length(tx_sim.MAC_payload);
    tx_sim.PHY_mode = 1; %1=11a, 2=11n
    tx_sim.mcs = 3;
    tx_sim.samp_rate = 10; %Must be in [10 20 40]
    tx_sim.num_pkts = 1;
   end

If we change the MAC_payload length to a longer length, for example, 10 bytes, 20 bytes or 100 bytes, the RX can give all the correct results.

   we wonder if there is a specific minimum length of MAC_payload in the PHY layer or we made some mistakes?

Last edited by liyize (2016-May-27 07:40:22)

Offline

 

#2 2016-May-27 08:41:43

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: The minimun length of MAC_payload?

The Rx PHY imposes a minimum value for the SIGNAL.LENGTH field of 6 bytes. This logic is implemented in the 'Detect & Decode/Decode/SIGNAL & HT-SIG Decode/SIGNAL Decode/Length' subsystem.

The reasoning for this minimum is based on length of the HT-SIG header for HTMF (11n) waveforms. When receiving a new packet the Rx PHY does not know whether the waveform is NONHT (11a) or HTMF (11n) until the HT-SIG symbols have been received and demodulated. The Rx PHY examines the modulation of the HT-SIG symbols (HTMF waveforms use rotated BPSK for these symbols) and the decoded bytes from these symbols to determine whether the incoming waveform is a valid HTMF waveform. The HT-SIG bytes are the first 6 bytes after the SIGNAL field. Thus, the Rx PHY always decodes at least 6 bytes of every OFDM waveform. If the SIGNAL.LENGTH value is <6 the Rx PHY assumes it is an error and resets. This assumption is safe for any actual MAC payload, the shortest of which is an ACK at 14 bytes.

Offline

 

Board footer