matlab-simulate-bluetooth-network

$npx mdskill add matlab/matlab-agentic-toolkit/matlab-simulate-bluetooth-network

Simulate Bluetooth system-level networks with various topologies and configurations.

  • Models BLE ACL, LE Audio, GAP, Classic BR/EDR, and coexistence scenarios.
  • Uses Bluetooth Toolbox nodes and connection configuration objects.
  • Selects topology and parameters based on user-specified Bluetooth profile.
  • Returns simulation results via KPIs and statistics from the wireless network simulator.

SKILL.md

.github/skills/matlab-simulate-bluetooth-networkView on GitHub ↗
---
name: matlab-simulate-bluetooth-network
description: >
    Simulate Bluetooth system-level networks using the Bluetooth Toolbox. Use this skill for any Bluetooth topology: BLE ACL (Asynchronous Connection-Less) data connections, CIS (Connected Isochronous Stream) and LE Audio for stereo speakers or hearing aids, BLE GAP (Generic Access Profile) connection establishment with advertising and scanning, Classic BR/EDR piconets with ACL data and SCO (Synchronous Connection-Oriented) voice links, and BLE+BR/EDR coexistence with adaptive frequency hopping. Covers bluetoothLENode, bluetoothNode, bluetoothLEConnectionConfig, bluetoothLECISConfig, bluetoothLEGAPConfig, bluetoothConnectionConfig, configureConnection, kpi (), updateChannelList, and all Bluetooth statistics.
license: MathWorks BSD-3-Clause
compatibility: ">=R2026a"
metadata:
  author: MathWorks
  version: "1.0"
---

# Bluetooth System-Level Simulation

Entry point for all Bluetooth system-level simulation. All Bluetooth simulations use `sim = wirelessNetworkSimulator.init` and follow the workflow defined in `matlab-simulate-wireless-network` (simulator init, traffic, mobility, instrumentation, addNodes, run).

## When to Use

- BLE ACL point-to-point or star network connections
- LE Audio unicast with CIS/CIG (stereo speakers, hearing aids)
- BLE GAP connection establishment (advertising, scanning, connection timing)
- Classic BR/EDR piconets with ACL data or SCO voice
- BLE + BR/EDR coexistence with adaptive frequency hopping
- Any simulation using `bluetoothLENode`, `bluetoothNode`

## When Not to Use

- Non-Bluetooth wireless simulations (use `matlab-simulate-wireless-network` instead)
- PHY-layer or link level Bluetooth waveform generation, receiver analysis or BER analysis
- Generic simulator setup, traffic models, or mobility (use `matlab-simulate-wireless-network`)

## Scenario → Reference Routing

| Scenario | Reference |
|----------|-----------|
| BLE realistic connection setup (advertising, scanning, GAP) | `references/ble-gap-connection.md` |
| BLE point-to-point data, star network, ACL connections | `references/ble-connection.md` |
| LE Audio unicast (stereo speakers, hearing aids, CIS/CIG) | `references/ble-cis.md` |
| Classic Bluetooth earbuds, SCO voice, ACL data | `references/bluetooth-bredr.md` |
| BLE + BR/EDR coexistence, adaptive frequency hopping | `references/bluetooth-coexistence.md` |
| Capture and visualization (PCAP, IQ, event tracing, traffic viewer) | See `matlab-simulate-wireless-network` skill |

## Node Roles

- BLE (ACL, CIS): `bluetoothLENode("central")`, `bluetoothLENode("peripheral")`
- BR/EDR: `bluetoothNode("central")`, `bluetoothNode("peripheral")` — max 7 peripherals per central

## Traffic Attachment Rules

`addTrafficSource(sourceNode, traffic, ...)`:
- **ACL/CIS/BR/EDR**: `DestinationNode=peer` required. CIS also needs `CISConfig=cfgCISOut`.
- **BR/EDR SCO**: No traffic call — implicit via `SCOPacketType` in connection config.

## kpi() Availability

| Topology | `"throughput"` | `"latency"` | `"PLR"` / `"PDR"` | Layer |
|----------|:-:|:-:|:-:|-------|
| BLE ACL | LL only | App only | Both LL and App | `"LL"` or `"App"` |
| BLE CIS | LL only | App only | Both LL and App | `"LL"` or `"App"` |
| BR/EDR | Baseband | — | Baseband | `"Baseband"` |

## Connection/Configuration Setup

| Topology | Config Object | Function | Notes |
|----------|--------------|----------|-------|
| BLE ACL | `bluetoothLEConnectionConfig` | `configureConnection(cfg, central, peripheral)` | Per-peripheral in loop; unique `AccessAddress` per connection |
| BLE CIS | `bluetoothLEConnectionConfig` + `bluetoothLECISConfig` | `[~, cfgCISOut] = configureConnection(cfg, central, peripheral, CISConfig=cfgCIS)` | Pass `cfgCISOut` to `addTrafficSource(..., CISConfig=cfgCISOut)` |
| BR/EDR | `bluetoothConnectionConfig` | `configureConnection(cfg, central, peripherals)` | Single call with vector of peripherals |

## Common Mistakes

- **`bluetoothNode` for BLE** (or vice versa): BR/EDR = `bluetoothNode`, BLE = `bluetoothLENode`
- **Wrong kpi Layer**: BLE throughput → `"LL"`, BLE latency → `"App"`, BR/EDR → `"Baseband"` only
- **Properties locked after `run()`**: Node/connection properties cannot change mid-sim. Use `updateChannelList` for mid-sim channel updates.
- **`configureConnection` with peripheral vector for BLE**: Must call per-peripheral in loop (BR/EDR accepts vector)
- **Unique `AccessAddress` per connection**: Each BLE connection on same central needs different AccessAddress
- **DataRate in Kbps**: `DataRate=100` means 100 Kbps, not 100 bps
- **`GeneratePacket=true` is not valid**: Not applicable for network-level simulation. Use `OnTime=Inf` for continuous traffic.

<!-- Copyright 2026 The MathWorks, Inc. -->

More from matlab/matlab-agentic-toolkit

SkillDescription
matlab-access-datafeed>
matlab-add-awgnRead BEFORE writing any code that adds Additive White Gaussian Noise (AWGN) to signals and converts between SNR, Eb/No, Es/No, and per-subcarrier SNR for communications simulations, using awgn(), convertSNR(), berawgn(). The default MATLAB patterns for AWGN (e.g., 'measured' option, manual SNR formulas) produce subtly incorrect results. This skill specifies the correct calling conventions, required function usage, and critical anti-patterns that must be avoided.
matlab-analyze-ams-waveformAnalyze AMS waveform data using Mixed-Signal Blockset utilities: phase noise measurement, clock jitter, anti-aliased resampling, timing measurements, lock time, INL/DNL, ADC/DAC calibration, HSpice import. Use when analyzing time-domain voltage from PLL/VCO/clock simulations, measuring phase noise from variable-step solver output, computing jitter, or resampling non-uniform data.
matlab-analyze-dataAnalyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, filtering, sorting, cleaning, transforming, aggregating, smoothing, padding, trimming, and answering questions about data. MATLAB provides extensive, easy-to-use built-in functions for these workflows with no additional products required.
matlab-analyze-dependenciesAnalyze the effective toolbox file set to produce a Dependency Manifest — classify all transitive dependencies as included, product, add-on, or external-unresolved, then present resolution options with tradeoffs. Use after matlab-define-toolbox-api when the spec is approved.
matlab-analyze-emS-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters() or solver code — API is non-obvious. SKIP: designing or creating components (use the specific matlab-design-pcb-* skill), material/stackup setup only (use matlab-manage-pcb-material), optimization sweeps (use matlab-optimize-pcb-design), PDN/IR-drop analysis (use matlab-analyze-pcb-pdn).
matlab-analyze-installed-antennaAnalyze antennas installed on electrically large conducting platforms using MATLAB Antenna Toolbox. Loads platform geometry from STL/STEP/IGES, installs antenna elements, selects electromagnetic solvers (MoM-PO, FMM, MoM), and computes patterns, impedance, coupling, and efficiency. Use when the user wants to model an antenna on a vehicle, aircraft, ship, satellite, or other large structure.
matlab-analyze-pcb-pdnPDN DC voltage/current analysis, IR drop, design rule checking, and multi-net batch analysis on imported PCB layouts. TRIGGER: user asks about power integrity, PDN analysis, IR drop, voltage distribution, current density, power nets, or design rule checking on a PCB. Invoke BEFORE writing code — the PDN API chain is specialized and non-obvious. SKIP: importing a PCB file (use matlab-read-pcb-layout), EM field/S-parameter extraction (use matlab-analyze-em), material/stackup setup only (use matlab-manage-pcb-material), transmission line design (use matlab-design-pcb-txline).
matlab-analyze-rcsCalculate and visualize monostatic and bistatic radar cross section (RCS) using MATLAB Antenna Toolbox. Computes RCS of platforms, antennas, and arrays with PO, MoM, and FMM solvers, supporting HH/VV/HV/VH polarization, GPU acceleration, and near-field observation. Use when the user wants to compute, plot, or analyze radar cross section.
matlab-analyze-rf-propagationAnalyze RF propagation and plan wireless sites using MATLAB Antenna Toolbox. Creates transmitter/receiver sites, computes signal strength, coverage maps, SINR, line-of-sight, and ray tracing in geographic or indoor environments. Supports multiple propagation models (free-space, close-in, Longley-Rice, ray tracing, rain/gas/fog), custom terrain, building data, and directional antennas. Use when the user wants to compute coverage, signal strength, path loss, SINR, ray tracing, or plan a wireless network.