bluetoothNode
Description
Use the bluetoothNode object to create and configure a
Bluetooth® basic rate/enhanced data rate (BR/EDR) node. This feature also requires the
Wireless Network
Toolbox™ product.
Creation
Syntax
Description
creates a default
Bluetooth BR/EDR node object with a BREDRNode = bluetoothNode"peripheral" role.
creates a Bluetooth BR/EDR node object with the Role
property set to BREDRNode = bluetoothNode(role)role.
sets the properties of
the Bluetooth BR/EDR node object with a BREDRNode = bluetoothNode(PropertyName=Value)"peripheral" role by using one
or more optional name-value arguments. For example, NoiseFigure=5 sets
the noise figure of the Peripheral node to 5 dB.
You can use this syntax to generate a row vector of Bluetooth BR/EDR node objects by
specifying the value of the Position property.
creates a Bluetooth BR/EDR node object with the Role
property set to BREDRNode = bluetoothNode(role,Name=Value)role and the other properties
specified by using one or more optional name-value arguments. For example,
bluetoothNode("central",NoiseFigure=5) sets the noise figure of the
specified node to 5 dB.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: bluetoothNode(InterferenceModeling="non-overlapping-adjacent-channel")
sets the type of interference modeling to
"non-overlapping-adjacent-channel".
Type of interference modeling, specified as
"overlapping-adjacent-channel" or
"non-overlapping-adjacent-channel".
"overlapping-adjacent-channel"— The object considers signals overlapping in time and frequency to be interference. In this figure, fS, fE, and fC are the starting, ending, and center frequencies of the signal of interference (SOI), respectively."non-overlapping-adjacent-channel"— In addition to signals that satisfy the conditions described under"overlapping-adjacent-channel", the object considers signals that overlap with the SOI in time and with the interval [fS – fD, fE + fD] in frequency to be interference. fS, fE, and fC are the starting, ending, and center frequencies of the SOI, respectively. fD is the value of theMaxInterferenceOffsetproperty.
This name-value argument sets the InterferenceModeling property.
Data Types: char | string
Maximum frequency offset for determining signal interference, specified as a
nonnegative scalar. Units are in Hz. This property specifies the offset between the
edge of the SOI frequency and the edge of the interfering signal. If you specify
this property as Inf, the object considers all the signals that
overlap in time, regardless of their frequency, to be interference. If you specify
this property as a finite nonnegative scalar, the object considers all the signals
overlapping in time and with frequency in the range [(f1 –
),
(f2 +
MaxInterferenceOffset)], to be
interference.MaxInterferenceOffset
This name-value argument sets the MaxInterferenceOffset property.
Dependencies
To enable this property, set the InterferenceModeling property to
"non-overlapping-adjacent-channel".
Data Types: double
Properties
This property is read-only.
Role of the Bluetooth BR/EDR node, specified as "central" or
"peripheral". The role argument sets the value
of this property.
Data Types: char | string
Node position in 3-D Cartesian coordinates, specified as a numeric
N-by-3 matrix, where N is the number of nodes.
By specifying a matrix with N greater than one, you can create a
1-by-N vector of bluetoothNode objects.
Specify this value in meters. This value specifies the positions of the nodes in Cartesian x-, y-, and z-coordinates.
Data Types: double
Name of Bluetooth BR/EDR node, specified as a character vector, string scalar,
string vector, or cell array of character vectors. The default format of this property
is "NodeN", where N is the node
identifier specified by the ID
property.
When you create a row vector of bluetoothNode objects by specifying
the Position
property, you can name each node in the vector at once by specifying the
Name as a string vector or cell array of character vectors. If
the length of the Name vector is greater than the number of nodes,
the extra names do not apply. If the length of the Name vector is
less than the number of nodes, the extra nodes get default names.
Note
Since R2026a, you can set this property only when you create the object. After creation, the property is read-only. In releases R2025b and earlier, after creating the object, you can set the value of this property for one Bluetooth LE node object at a time.
Data Types: char | string | cell
Transmitter antenna gain, specified as a finite numeric scalar. Units are in dB.
Data Types: double
Receiver antenna gain, specified as a finite numeric scalar. Units are in dB.
Data Types: double
Receiver sensitivity, specified as a finite numeric scalar. This property sets the minimum power that the receiver requires to detect the incoming packet. If the received power of an incoming packet is below this value, the node drops the packet. Units are in dBm.
Data Types: double
Noise figure, specified as a nonnegative finite scalar. The object uses this value to apply thermal noise on the received packet. Units are in dB.
Data Types: double
Type of interference modeling, specified as
"overlapping-adjacent-channel" or
"non-overlapping-adjacent-channel".
"overlapping-adjacent-channel"— The object considers signals overlapping in time and frequency to be interference. In this figure, fS, fE, and fC are the starting, ending, and center frequencies of the signal of interference (SOI), respectively."non-overlapping-adjacent-channel"— In addition to signals that satisfy the conditions described under"overlapping-adjacent-channel", the object considers signals that overlap with the SOI in time and with the interval [fS – fD, fE + fD] in frequency to be interference. fS, fE, and fC are the starting, ending, and center frequencies of the SOI, respectively. fD is the value of theMaxInterferenceOffsetproperty.
Data Types: char | string
Maximum frequency offset for determining signal interference, specified as a
nonnegative scalar. Units are in Hz. This property specifies the offset between the edge
of the SOI frequency and the edge of the interfering signal. If you specify this
property as Inf, the object considers all the signals that overlap in
time, regardless of their frequency, to be interference. If you specify this property as
a finite nonnegative scalar, the object considers all the signals overlapping in time
and with frequency in the range [(f1 –
),
(f2 +
MaxInterferenceOffset)], to be
interference.MaxInterferenceOffset
Dependencies
To enable this property, set the InterferenceModeling property to
"non-overlapping-adjacent-channel".
Data Types: double
This property is read-only.
Node identifier, stored as an integer scalar. This value specifies a unique
identifier for the node in the simulation. The object assigns this value incrementally,
starting from 1.
Note
If you create and store the Bluetooth BR/EDR nodes in an uninitialized matrix, the IDs that this property allocates to the nodes can be nonsequential because of the memory allocation to the object in the matrix. For more information about MATLAB memory allocation, see How MATLAB Allocates Memory.
Data Types: double
This property is read-only.
Address of the Bluetooth BR/EDR node, stored as a 12-element character vector or a
string scalar denoting a 6-octet hexadecimal value. This value is unique to each
Bluetooth BR/EDR node and is derived from the ID
property.
Data Types: char | string
This property is read-only.
Bluetooth BR/EDR connection configuration parameters, stored as a bluetoothConnectionConfig object.
Since R2026a
Node mobility model, represented as an object of a subclass of
wnet.Mobility class.
Note
Only the bluetoothNode subclass can set the
Mobility property in its constructor or methods. The addMobility object function of the bluetoothNode object
adds a mobility model to Bluetooth nodes.
Since R2026a
This property is read-only.
Node velocity in 3-D Cartesian coordinates, represented as a three-element numeric row vector. The units are in meters per second.
Data Types: double
Object Functions
addMobility | Add random waypoint mobility model to Bluetooth BR/EDR node |
addTrafficSource | Add data traffic source to Bluetooth BR/EDR node on ACL connection |
configureScheduler | Configure baseband scheduler at Bluetooth BR/EDR Central node |
kpi | Returns key performance indicators (KPIs) for Bluetooth BR/EDR nodes |
registerEventCallback | Register callback for event from Bluetooth BR/EDR node |
statistics | Get statistics of Bluetooth BR/EDR node |
updateChannelList | Update channel list of Bluetooth BR/EDR node |
Examples
Initialize the wireless network simulator.
networkSimulator = wirelessNetworkSimulator.init;
Create two Bluetooth BR nodes, one with the "central" role and the other with the "peripheral" role. Specify the position of the Peripheral node, in meters.
centralNode = bluetoothNode("central"); peripheralNode = bluetoothNode("peripheral",Position=[1 0 1]);
Add a random waypoint mobility model to the peripheral node. Set the shape of the node's mobility area to "circle".
addMobility(peripheralNode,BoundaryShape="circle",RefreshInterval=0.1)Create a default Bluetooth BR/EDR connection configuration object to configure and share a connection between the Bluetooth BR Central and Peripheral nodes.
cfgConnection = bluetoothConnectionConfig;
Configure the connection between the Central and the Peripheral nodes.
connection = configureConnection(cfgConnection,centralNode,peripheralNode)
connection =
bluetoothConnectionConfig with properties:
CentralToPeripheralACLPacketType: "DH1"
PeripheralToCentralACLPacketType: "DH1"
SCOPacketType: "None"
HoppingSequenceType: "Connection adaptive"
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 … ] (1×79 double)
PollInterval: 40
InstantOffset: 240
TransmitterPower: 20
SupervisionTimeout: 32000
CentralAddress: "D091BBE70001"
PrimaryLTAddress: 1
Create and configure a networkTrafficOnOff (Wireless Network Toolbox) object to generate an On-Off application traffic pattern.
traffic = networkTrafficOnOff(DataRate=200,PacketSize=27,OnTime=inf);
Add application traffic from the Central to the Peripheral node.
addTrafficSource(centralNode,traffic,DestinationNode=peripheralNode);
Add the Central and Peripheral nodes to the wireless network simulator.
addNodes(networkSimulator,[centralNode peripheralNode]);
Specify the simulation time, in seconds.
simulationTime = 0.3;
Run the simulation for the specified simulation time.
run(networkSimulator,simulationTime);
Retrieve the application, baseband, and physical layer (PHY) statistics corresponding to the Central and Peripheral nodes.
centralStats = statistics(centralNode)
centralStats = struct with fields:
Name: "Node1"
ID: 1
App: [1×1 struct]
Baseband: [1×1 struct]
PHY: [1×1 struct]
peripheralStats = statistics(peripheralNode)
peripheralStats = struct with fields:
Name: "Node2"
ID: 2
App: [1×1 struct]
Baseband: [1×1 struct]
PHY: [1×1 struct]
Initialize the wireless network simulator object.
networkSimulator = wirelessNetworkSimulator.init();
Create two Bluetooth EDR nodes, one with the "central" role and other with the "peripheral" role. Specify the position of the Peripheral node in meters.
centralNode = bluetoothNode("central"); peripheralNode = bluetoothNode("peripheral",Position=[1 0 0]);
Create a default Bluetooth BR/EDR connection configuration object to configure and share a connection between Bluetooth EDR Central and Peripheral nodes.
cfgConnection = bluetoothConnectionConfig(CentralToPeripheralACLPacketType="2-DH3",PeripheralToCentralACLPacketType="2-DH5");
Configure connection between the Central and the Peripheral nodes.
connection = configureConnection(cfgConnection,centralNode,peripheralNode)
connection =
bluetoothConnectionConfig with properties:
CentralToPeripheralACLPacketType: "2-DH3"
PeripheralToCentralACLPacketType: "2-DH5"
SCOPacketType: "None"
HoppingSequenceType: "Connection adaptive"
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 … ] (1×79 double)
PollInterval: 40
InstantOffset: 240
TransmitterPower: 20
SupervisionTimeout: 32000
CentralAddress: "D091BBE70001"
PrimaryLTAddress: 1
Create and configure a networkTrafficOnOff (Wireless Network Toolbox) object to generate an On-Off application traffic pattern.
traffic = networkTrafficOnOff(DataRate=200,PacketSize=27,OnTime=inf);
Add application traffic from the Central to the Peripheral node.
addTrafficSource(centralNode,traffic,DestinationNode=peripheralNode);
Schedule channel list update at the Central node at 0.05 seconds to use channels 0 to 40.
scheduleAction(networkSimulator,@(varargin) updateChannelList(centralNode, ...
0:40,DestinationNode=peripheralNode),[],0.05);Add the Central and Peripheral nodes to the wireless network simulator.
addNodes(networkSimulator,[centralNode peripheralNode]);
Specify the simulation time in seconds.
simulationTime = 0.3;
Run the simulation for the specified simulation time.
run(networkSimulator,simulationTime);
Retrieve application, baseband, and physical layer (PHY) statistics corresponding to the Central and Peripheral nodes.
centralStats = statistics(centralNode); peripheralStats = statistics(peripheralNode);
References
[1] Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed January 10, 2026. https://www.bluetooth.com/.
[2] Bluetooth Core Specifications Working Group. "Bluetooth Core Specification" v6.1. https://www.bluetooth.com/specifications/specs/core-specification-6-1/.
Version History
Introduced in R2022bStarting in R2026a, this feature is available in Bluetooth Toolbox and also requires a Wireless Network Toolbox license. In prior releases, the feature is available through the Communications Toolbox™ Wireless Network Simulation Library add-on.
You can now configure the InterferenceModeling and
MaxInterferenceOffset properties through the respective InterferenceModeling and MaxInterferenceOffset name-value arguments only.
The property will be removed in a
future release. To retrieve the number of active connections associated with the Central
node, use the NumConnectionsConnectionConfig property instead. This table shows the change in syntax after
this update.
| Syntax Before This Update | Syntax After This Update |
|---|---|
numConnections = node.NumConnections |
numConnections = numel(node.ConnectionConfig) |
Since R2026a, you can set the value of the Name property only when
you create the object. After creation, the property is read-only. In releases R2025b and
earlier, after creating the object, you can set the value of this property for one Bluetooth
node object at a time.
The property has been
removed. Use the new InterferenceFidelityInterferenceModeling property instead. For code that uses the default
interference modeling, you do not need to make any changes as the object manages the
transition internally. However, if you have explicitly set the
InterferenceFidelity property, you must change the property name from
InterferenceFidelity to InterferenceModeling,
and modify the value from 0 or 1 to
"overlapping-adjacent-channel" or
"non-overlapping-adjacent-channel", respectively. This table shows the
change in syntax after this update.
| Syntax Before This Update | Syntax After This Update |
|---|---|
bluetoothNode(“central”,InterferenceFidelity=0) |
bluetoothNode(“central”,InterferenceModeling=”overlapping-adjacent-channel”) |
bluetoothNode(“peripheral”,InterferenceFidelity=1) |
bluetoothNode(“peripheral”,InterferenceModeling=”non-overlapping-adjacent-channel”) |
The property issues a
warning that it will be removed in a future release. Use the new InterferenceFidelityInterferenceModeling property instead. For code that uses the
default interference modeling, you do not need to make any changes as the object manages the
transition internally. However, if you have explicitly set the
InterferenceFidelity property, you must change the property name from
InterferenceFidelity to InterferenceModeling,
and modify the value from 0 or 1 to
"overlapping-adjacent-channel" or
"non-overlapping-adjacent-channel", respectively. This table shows the
change in syntax after this update.
| Syntax Before This Update | Syntax After This Update |
|---|---|
bluetoothNode(“central”,InterferenceFidelity=0) |
bluetoothNode(“central”,InterferenceModeling=”overlapping-adjacent-channel”) |
bluetoothNode(“peripheral”,InterferenceFidelity=1) |
bluetoothNode(“peripheral”,InterferenceModeling=”non-overlapping-adjacent-channel”) |
These two new properties of the bluetoothNode object enable you to
model interference by considering signals overlapping in the time and frequency domains.
InterferenceModeling— Use this property to set the type of interference modeling.MaxInterferenceOffset— Use this property to specify the offset between the edge of the SOI frequency and the edge of the interfering signal.
The property will be
removed in a future release. Use the new InterferenceFidelityInterferenceModeling property instead. For code that uses the
default interference modeling, you do not need to make any changes as the object manages the
transition internally. However, if you have explicitly set the
InterferenceFidelity property, you must change the property name from
InterferenceFidelity to InterferenceModeling,
and modify the value from 0 or 1 to
"overlapping-adjacent-channel" or
"non-overlapping-adjacent-channel", respectively. This table shows the
change in syntax after this update.
| Syntax Before This Update | Syntax After This Update |
|---|---|
bluetoothNode(“central”,InterferenceFidelity=0) |
bluetoothNode(“central”,InterferenceModeling=”overlapping-adjacent-channel”) |
bluetoothNode(“peripheral”,InterferenceFidelity=1) |
bluetoothNode(“peripheral”,InterferenceModeling=”non-overlapping-adjacent-channel”) |
The bluetoothNode object now supports adding a random waypoint mobility model to Bluetooth
BR/EDR nodes through the addMobility object function.
See Also
Objects
bluetoothConnectionConfig|bluetoothLENode|wirelessNetworkSimulator(Wireless Network Toolbox)
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)