Configure baseband scheduler at Bluetooth BR/EDR Central node
Download Required: To use
first download the Communications Toolbox Wireless Network Simulation Library add-on. For more
information, see Get and Manage Add-Ons.
configures the baseband to use the default scheduler at the Bluetooth® basic rate/enhanced data rate (BR/EDR) Central node,
bluetoothNodeObj. If a Peripheral node has data to transmit to the
Central node, and the available asynchronous connection-oriented (ACL) slots are sufficient
for the scheduled transmission, the scheduler selects the corresponding Peripheral node.
Otherwise, the scheduler selects the next Peripheral node in a fixed cyclic order. The
scheduler does not select any Peripheral node in either of these conditions.
If there is data to be communicated between the Central and the Peripheral nodes, but the available ACL slots are insufficient for the communication.
If sufficient ACL slots are available for the communication, but there is no data to be communicated between the Central and the Peripheral nodes.
additionally configures the round-robin (RR) scheduler at the Central node based on the
maximum number of consecutive transmissions between the Central and the Peripheral node,
Note that configuring the baseband scheduler is not mandatory. The default scheduler is preconfigured.
Simulate Bluetooth BR/EDR Network with Round-Robin Scheduler
Check if the Communications Toolbox™ Wireless Network Simulation Library support package is installed. If the support package is not installed, MATLAB® returns an error with a link to download and install the support package.
Create a wireless network simulator object.
networkSimulator = wirelessNetworkSimulator.init;
Create a Bluetooth BR/EDR Central node and two Peripheral nodes.
centralNode = bluetoothNode("central"); peripheralNode1 = bluetoothNode("peripheral",Position=[1 0 0]); peripheralNode2 = bluetoothNode("peripheral",Position=[2 0 0]);
Create two default Bluetooth BR/EDR configuration objects.
cfgConnection1 = bluetoothConnectionConfig; cfgConnection2 = bluetoothConnectionConfig;
Configure and share connections between the Central node and the Peripheral nodes.
Configure an RR scheduler at the Central node by specifying the maximum number of consecutive transmissions as
Create and configure a
networkTrafficOnOff object to generate an On-Off application traffic pattern between the Central and Peripheral nodes. This object enables you to accurately model the real-world data traffic in a system-level simulation.
traffic1 = networkTrafficOnOff(DataRate=200,PacketSize=27, ... GeneratePacket=true,OnTime=inf); traffic2 = networkTrafficOnOff(DataRate=200,PacketSize=27, ... GeneratePacket=true,OnTime=inf);
Add application traffic from the Central to the Peripheral nodes.
Add the nodes to the network simulator
addNodes(networkSimulator,[centralNode peripheralNode1 peripheralNode2])
Set the simulation time, in seconds, and run the simulation.
Retrieve statistics corresponding to the Central and Peripheral nodes.
centralStats = statistics(centralNode); peripheralStats1 = statistics(peripheralNode1); peripheralStats2 = statistics(peripheralNode2);
bluetoothNodeObj — Bluetooth BR/EDR node object
bluetoothNode object | array of
Bluetooth BR/EDR node object, specified as a
bluetoothNode object or an array of
To configure the baseband scheduler, set the
Role property of the
bluetoothNode object to
"central". This input configures
the same scheduler at multiple Peripheral nodes. If you specify this input as an array
bluetoothNode objects, this object function configures the scheduler
at all the Central nodes.
MaxTransmissions — Maximum number of consecutive transmissions scheduled from Central to Peripheral node
 (default) | positive integer |
Maximum number of consecutive transmissions scheduled from the Central to the
Peripheral node, specified as a positive integer or
If you set this input to
1, the scheduler at the Central node selects each Peripheral node once, in a fixed cyclic order. The scheduler schedules consecutive transmission and reception from the Central node to each Peripheral node, regardless of the availability of the data between the nodes. The first transmission occurs from the Central node to the Peripheral node and the second transmission takes place from the Peripheral node to the Central node.
If you set this input to N, where N is an integer in the range (1, Inf), the scheduler at the Central node selects each Peripheral node for a maximum of N times (if data is available) in a fixed cyclic order. If there is no data to be communicated from the Central to the Peripheral node, the scheduler selects the next Peripheral node.
If you set this input to
Inf, the scheduler at the Central node selects each Peripheral node in an exhaustive cyclic order. If there is data to be communicated between the Central-Peripheral node pair, the scheduler selects the same Peripheral node. If there is no data to be communicated between the Central-Peripheral node pair, the scheduler selects the next Peripheral node.
 Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed October 22, 2022. https://www.bluetooth.com/.
 Bluetooth Core Specifications Working Group. "Bluetooth Core Specification" v5.3. https://www.bluetooth.com/.
Introduced in R2023a