matlab-generate-ble-waveform

Generate and analyze Bluetooth Low Energy PHY waveforms in MATLAB.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-generate-ble-waveform
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-generate-ble-waveform
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/wireless-communications/matlab-generate-ble-waveform
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-generate-ble-waveform

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing BLE waveform code in MATLAB is error-prone because AI agents often hallucinate nonexistent APIs (like bleWaveformConfig), misuse PHY mode parameters, or violate Bluetooth spec constraints such as CTE mode compatibility and advertising channel rules. This Skill provides verified API patterns, spec constraints, and ready-to-use recipes so generated code works correctly the first time.

Core Features & Use Cases

  • Waveform Generation: Generate BLE PHY waveforms for all four modes (LE1M, LE2M, LE500K, LE125K) using bleWaveformGenerator with correct parameters.
  • Direction Finding: Build complete CTE pipelines from waveform generation through IQ sampling to AoA/AoD angle estimation with bleAngleEstimate.
  • RF-PHY Compliance & Measurements: Create standardized test waveforms with bluetoothTestWaveform, measure output power, occupied bandwidth, and PAPR, and run BER simulations with ideal or practical receivers.
  • Use Case: Ask your agent to compare all four BLE PHY modes in time and frequency domains, and it produces a tiled-layout figure with correct sample rates, spectrum plots, and spec-compliant channel assignments.

Quick Start

Ask your AI agent to generate a BLE LE1M waveform with a 37-byte payload on channel 37 and plot its time-domain IQ and spectrum.

Frequently Asked Questions about matlab-generate-ble-waveform

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a BLE waveform in MATLAB?

Call bleWaveformGenerator with a binary column vector of message bits and name-value arguments like Mode, SamplesPerSymbol, and ChannelIndex. There is no bleWaveformConfig object; pass bits directly, for example bleWaveformGenerator(bits, Mode="LE1M", SamplesPerSymbol=8, ChannelIndex=37).

What is the difference between bleWaveformGenerator and bluetoothTestWaveform?

bleWaveformGenerator takes user-defined message bits for general waveform generation, while bluetoothTestWaveform uses a bluetoothTestWaveformConfig object to produce standardized RF-PHY test packets with predefined payload sequences like PRBS9 for compliance testing.

Which BLE PHY modes support Constant Tone Extension for direction finding?

CTE works only on LE1M and LE2M uncoded modes over data channels 0-36. ConnectionlessCTE is restricted to LE1M only, and coded modes LE500K and LE125K do not support CTE at all per the Bluetooth 5.1 specification.

Can I use LE2M on BLE advertising channels 37, 38, or 39?

No, primary advertising channels 37, 38, and 39 only support LE1M or LE Coded PHY per the Bluetooth specification. Requesting LE2M on these channels is a spec violation and should be refused or corrected to LE1M.

How do I convert Eb/No to SNR for BLE BER simulation?

Use SNR = EbNo + 10*log10(codeRate) - 10*log10(sps), where codeRate is 1 for LE1M/LE2M, 1/2 for LE500K, and 1/8 for LE125K. Pass explicit signal power to awgn rather than the "measured" flag for correct noise levels.

Why does bleIdealReceiver fail to decode my impaired BLE waveform?

bleIdealReceiver performs ideal demodulation with no impairment correction, so it fails on waveforms with CFO, timing drift, or DC offset. Use helperBLEPracticalReceiver from the Bluetooth Toolbox example, which includes AGC, CFO compensation, and timing recovery.