Create, Configure, and Simulate Bluetooth LE Broadcast Audio Network
This example enables you to:
Create and configure a Bluetooth LE piconet with an isochronous broadcaster and receivers.
Add application traffic at the broadcaster.
Simulate the broadcast isochronous network and retrieve the statistics and KPIs of the broadcaster and receivers.
Create a wireless network simulator.
networkSimulator = wirelessNetworkSimulator.init;
Create a Bluetooth LE node, specifying the role as "isochronous-broadcaster". Specify the name and position of the node.
broadcasterNode = bluetoothLENode("isochronous-broadcaster",Name="Broadcaster"); broadcasterNode.Position = [0 0 0]; % In x-, y-, and z-coordinates, in meters
Create two Bluetooth LE nodes, specifying the role as "synchronized-receiver". You can use this syntax to generate an array of Bluetooth LE node objects by specifying the value of the Position property.
receiverNodes = bluetoothLENode("synchronized-receiver",Position=[2 0 0; 5 0 0],Name=["Receiver1" "Receiver2"]);
Create a default Bluetooth LE broadcast isochronous group (BIG) configuration object.
cfgBIG = bluetoothLEBIGConfig
cfgBIG =
bluetoothLEBIGConfig with properties:
SeedAccessAddress: "78E52493"
PHYMode: "LE1M"
NumBIS: 1
ISOInterval: 0.0050
BISSpacing: 0.0022
SubInterval: 0.0022
MaxPDU: 251
BurstNumber: 1
PretransmissionOffset: 0
RepetitionCount: 1
NumSubevents: 1
BISArrangement: "sequential"
BIGOffset: 0
ReceiveBISNumbers: 1
UsedChannels: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36]
InstantOffset: 6
BaseCRCInitialization: "1234"
Configure the broadcaster and receiver nodes.
updatedCfgBIG = configureBIG(cfgBIG,broadcasterNode,receiverNodes)
updatedCfgBIG =
bluetoothLEBIGConfig with properties:
SeedAccessAddress: "78E52493"
PHYMode: "LE1M"
NumBIS: 1
ISOInterval: 0.0050
BISSpacing: 0.0022
SubInterval: 0.0022
MaxPDU: 251
BurstNumber: 1
PretransmissionOffset: 0
RepetitionCount: 1
NumSubevents: 1
BISArrangement: "sequential"
BIGOffset: 0
ReceiveBISNumbers: 1
UsedChannels: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36]
InstantOffset: 6
BaseCRCInitialization: "1234"
Create a networkTrafficOnOff (Wireless Network Toolbox) object to generate an On-Off application traffic pattern. Specify the data rate in kb/s and the packet size in bytes. Enable packet generation to generate an application packet with a payload.
traffic = networkTrafficOnOff(DataRate=500,PacketSize=10);
Add application traffic at the broadcaster node by using the addTrafficSource object function.
addTrafficSource(broadcasterNode,traffic);
Create a broadcast isochronous network consisting of LE broadcast audio nodes.
nodes = {broadcasterNode receiverNodes};Add the LE broadcast audio nodes to the wireless network simulator.
addNodes(networkSimulator,[broadcasterNode receiverNodes]);
Set the simulation time in seconds and run the simulation.
simulationTime = 0.5; run(networkSimulator,simulationTime);
Retrieve application, link layer (LL), and physical layer (PHY) statistics corresponding to the broadcaster and receiver nodes. For more information about the statistics, see Bluetooth LE Node Statistics.
broadcasterStats = statistics(broadcasterNode)
broadcasterStats = struct with fields:
Name: "Broadcaster"
ID: 1
App: [1×1 struct]
LL: [1×1 struct]
PHY: [1×1 struct]
receiver1Stats = statistics(receiverNodes(1))
receiver1Stats = struct with fields:
Name: "Receiver1"
ID: 2
App: [1×1 struct]
LL: [1×1 struct]
PHY: [1×1 struct]
receiver2Stats = statistics(receiverNodes(2))
receiver2Stats = struct with fields:
Name: "Receiver2"
ID: 3
App: [1×1 struct]
LL: [1×1 struct]
PHY: [1×1 struct]
Retrieve application layer (APP) KPIs such as latency, packet loss ratio (PLR), and packet delivery ratio (PDR) for the connection between the broadcaster node and Receiver1.
kpi(broadcasterNode,receiverNodes(1),"latency",Layer="App")
ans = 0.2397
kpi(broadcasterNode,receiverNodes(1),"PLR",Layer="App")
ans = 0.9471
kpi(broadcasterNode,receiverNodes(1),"PDR",Layer="App")
ans = 0.0529
References
[1] Bluetooth® Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed November 22, 2025. https://www.bluetooth.com/.
[2] Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification." v6.1. https://www.bluetooth.com/specifications/specs/core-specification-6-1/.
See Also
Functions
Objects
wirelessNetworkSimulator(Wireless Network Toolbox) |bluetoothLENode|bluetoothLEBIGConfig