matlab/matlab-agentic-toolkit / skills-catalog/wireless-communications/matlab-generate-wlan-waveform
matlab-generate-wlan-waveform
VerifiedGenerate standard-compliant IEEE 802.11 waveforms using MATLAB WLAN Toolbox. Use when creating WLAN waveforms, PPDU packets, or the transmit side of a link-level simulation. Covers all formats: Non-HT (802.11a/g), HT (802.11n), VHT (802.11ac), HE-SU/HE-MU/HE-TB (802.11ax), EHT-MU/EHT-TB (802.11be), UHR-MU/UHR-TB/UHR-ELR (802.11bn). Handles single-user, MU-MIMO, OFDMA, trigger-based uplink, extended range, preamble puncturing, UEQM, and DRU. Use when asked to generate test waveforms, create packets with MAC frames, configure OFDMA resource units, build trigger-based uplink transmissions, target a specific transmit duration, or build multi-packet waveforms.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 20.9 KB |
| manifest.yaml | config | 431 B |
| references/documentation-links.md | markdown | 2.2 KB |
| references/eht-allocation-indices.md | markdown | 9.1 KB |
| references/he-allocation-indices.md | markdown | 4.5 KB |
| references/mac-frame-properties.md | markdown | 5.2 KB |
| references/multi-packet-waveforms.md | markdown | 2.5 KB |
| references/trigger-based-uplink.md | markdown | 2.9 KB |
| references/uhr-waveform-generation.md | markdown | 5.7 KB |
references/mac-frame-properties.md
View on GitHub# WLAN MAC Frame Properties Reference
`wlanMACFrameConfig` properties change dynamically based on `FrameType`. Always
call `disp(cfg)` after creation to see the available properties for the
selected frame type.
## Frame Types and Properties
### Control Frames
**RTS** (`'RTS'`):
Duration, Address1, Address2
**CTS** (`'CTS'`):
Duration, Address1
**ACK** (`'ACK'`):
Duration, Address1
**Block Ack** (`'Block Ack'`):
PowerManagement, MoreData, Duration, Address1, Address2, SequenceNumber,
TID, BlockAckBitmap
**CF-End** (`'CF-End'`):
Duration, Address1, Address2
### Data Frames
**Data** (`'Data'`):
ToDS, FromDS, Retransmission, PowerManagement, MoreData, Duration,
Address1, Address2, Address3, SequenceNumber
**Null** (`'Null'`):
ToDS, FromDS, Retransmission, PowerManagement, MoreData, Duration,
Address1, Address2, Address3, SequenceNumber
**QoS Data** (`'QoS Data'`):
ToDS, FromDS, Retransmission, PowerManagement, MoreData, Duration,
Address1, Address2, Address3, SequenceNumber, TID, AckPolicy
**QoS Null** (`'QoS Null'`):
ToDS, FromDS, Retransmission, PowerManagement, MoreData, Duration,
Address1, Address2, Address3, SequenceNumber, TID, AckPolicy
### Management Frames
**Beacon** (`'Beacon'`):
ToDS, FromDS, Retransmission, PowerManagement, MoreData, Duration,
Address1, Address2, Address3, SequenceNumber, ManagementConfig
**Trigger** (`'Trigger'`):
Duration, Address1, Address2
## Payload Requirements
| Frame Type | Needs Payload? | Payload Format |
|------------|---------------|----------------|
| Data | **YES** | Hex octet string (`'A5B6C7'`) |
| QoS Data | **YES** | Hex octet string (`'A5B6C7'`) |
| Block Ack | No | — |
| RTS | No | — |
| CTS | No | — |
| ACK | No | — |
| Beacon | No | — |
| Null | No | — |
| QoS Null | No | — |
| CF-End | No | — |
| Trigger | No | — |
## Calling wlanMACFrame
**With payload** (Data, QoS Data):
```matlab
% Payload is the FIRST argument
payload = 'A5B6C7D8E9F0'; % Hex octets only
[frame, frameLen] = wlanMACFrame(payload, cfgMAC, 'OutputFormat', 'bits');
```
**Without payload** (all other frame types):
```matlab
[frame, frameLen] = wlanMACFrame(cfgMAC, 'OutputFormat', 'bits');
```
**With PHY config** (required for HE/VHT/EHT FrameFormat):
```matlab
[frame, frameLen] = wlanMACFrame(payload, cfgMAC, cfgPHY, 'OutputFormat', 'bits');
```
When `FrameFormat` is anything other than `'Non-HT'`, you **must** pass the PHY
config object as the third argument. Non-HT frames do not need it.
## Common Mistakes
- **Wrong argument order:** `wlanMACFrame(cfgMAC, payload)` fails. Payload must
be first.
- **Plain text payload:** `'Hello World'` is invalid. Must be hex octets
(`'48656C6C6F'`).
- **Guessing property names:** Properties like `BAType`, `BABitmap`, `TIDInfo`
do not exist. Use `disp(cfg)` to discover the actual names.
- **MAC addresses:** Must be 12 hex characters without separators
(`'FFFFFFFFFFFF'`, not `'FF:FF:FF:FF:FF:FF'`).
## FrameFormat Property
Controls the MAC frame format (separate from FrameType):
| Value | Standard |
|-------|----------|
| `'Non-HT'` | 802.11a/g |
| `'HT-Mixed'` | 802.11n |
| `'VHT'` | 802.11ac |
| `'HE-SU'` | 802.11ax |
| `'HE-EXT-SU'` | 802.11ax extended |
| `'EHT-SU'` | 802.11be |
## UHR Compatibility
`wlanMACFrame` and `wlanMSDULengths` **do not accept UHR example helper configs**
(`uhrMUConfig`, `uhrTBConfig`, `uhrELRConfig`). They only accept built-in toolbox
types: `wlanHTConfig`, `wlanVHTConfig`, `wlanHESUConfig`, `wlanEHTMUConfig`.
Additionally, `wlanMSDULengths` with EHT format requires a **non-OFDMA** config
(`wlanEHTMUConfig("CBW...")`, not the allocation-index form).
**Workaround:** Create a non-OFDMA `wlanEHTMUConfig` proxy with matching parameters,
use it for MAC frame generation, then feed the resulting PSDU bits into
`uhrWaveformGenerator`. EHT and UHR share the same MAC layer, so the bits are
format-compatible.
```matlab
% Proxy for MAC frame generation
cfgEHTProxy = wlanEHTMUConfig("CBW80");
cfgEHTProxy.User{1}.APEPLength = 4000;
cfgEHTProxy.User{1}.MCS = 11;
cfgEHTProxy.User{1}.ChannelCoding = 'LDPC';
cfgMAC = wlanMACFrameConfig('FrameType', 'QoS Data', 'FrameFormat', 'EHT');
cfgMAC.MSDUAggregation = true;
msduLengths = wlanMSDULengths(cfgEHTProxy.User{1}.APEPLength, cfgMAC, cfgEHTProxy);
msdu = cell(1, numel(msduLengths));
for k = 1:numel(msduLengths)
msdu{k} = randi([0 255], 1, msduLengths(k), 'uint8');
end
[psdu, apepLen] = wlanMACFrame(msdu, cfgMAC, cfgEHTProxy, 'OutputFormat', 'bits');
% Use psdu with UHR config
cfg.User{1}.APEPLength = apepLen;
waveform = uhrWaveformGenerator({psdu}, cfg);
```
## Aggregation
**A-MSDU** (multiple MSDUs in one MPDU):
- Set `cfg.MSDUAggregation = 1` on `'QoS Data'`
- Pass payload as cell array: `wlanMACFrame({'A5B6', 'C7D8'}, cfg)`
- Surfaces `AMSDUDestinationAddress` and `AMSDUSourceAddress` properties
**A-MPDU** (multiple MPDUs in one PHY frame):
- Requires `FrameFormat = 'HT-Mixed'` (or VHT/HE/EHT)
- Set `cfg.MPDUAggregation = 1`
- Must pass a PHY config: `wlanMACFrame(payloads, cfg, cfgPHY)`
## Output Formats
- Default output: hex octet char array
- `'OutputFormat', 'bits'`: binary column vector (int8)
- `frameLen` is always in **octets** (bytes), regardless of output format
----
Copyright 2026 The MathWorks, Inc.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |