Skip to content

matlab/matlab-agentic-toolkit / skills-catalog/wireless-communications/matlab-generate-ble-waveform

matlab-generate-ble-waveform

Verified

Generate Bluetooth Low Energy (BLE) PHY waveforms. Read BEFORE writing any BLE waveform code to avoid hallucinating API patterns. Covers bleWaveformGenerator, bleIdealReceiver, bleCTEIQSample, bleAngleEstimate, bluetoothTestWaveform for LE1M/LE2M/LE500K/LE125K. Bluetooth Toolbox R2022a+.

references/data-whitening.md

View on GitHub
# Data Whitening Reference

## Overview

BLE data whitening XORs payload bits with a Linear Feedback Shift Register
(LFSR) sequence to randomize the bit pattern and flatten the spectrum.

## How Whitening Works

- LFSR polynomial: x^7 + x^4 + 1
- Seed: derived from ChannelIndex (7 bits)
- Applied to: PDU + CRC (not preamble or access address)
- Each channel uses a different whitening seed

## Effect on Spectrum

| WhitenStatus | Bit Pattern | Spectrum |
|-------------|-------------|----------|
| On (default) | Pseudo-random transitions | Flat, noise-like |
| Off | Correlated (payload-dependent) | Spectral peaks/nulls |

## When to Disable Whitening

- Generating known test patterns (e.g., all-zeros, alternating)
- Analyzing raw modulation characteristics
- Debugging specific bit sequences
- RF-PHY tests using predefined payload sequences

## Channel-Dependent Whitening Seeds

Each channel index produces a different LFSR seed:
- Channel 37: seed = 37 (binary: 0100101)
- Channel 38: seed = 38 (binary: 0100110)
- Channel 39: seed = 39 (binary: 0100111)

Same payload on different channels produces different spectral fine structure
(same overall shape, different nulls/peaks in the spectrum).

----

Copyright 2026 The MathWorks, Inc.
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall