addTrafficSource
Syntax
Description
This feature also requires the Wireless Network Toolbox™ product.
addTrafficSource(
adds a data traffic source, bluetoothLENodeObj,trafficSource)trafficSource, to the Bluetooth® low energy (LE) node object bluetoothLENodeObj. The
Role property of the
bluetoothLENodeObj object must be set to
"isochronous-broadcaster" or "broadcaster".
addTrafficSource(
adds a data traffic source to send data to the specified destination node
bluetoothLENodeObj,trafficSource,DestinationNode=destinationNode)destinationNode. The Role property of
bluetoothLENodeObj object must be set to "central"
or "peripheral".
addTrafficSource(
adds a data traffic source to send data to the connected isochronous stream (CIS) connection
bluetoothLENodeObj,trafficSource,DestinationNode=destinationNode,CISConfig=cisConfig)cisConfig of the specified destination node
destinationNode. The Role property of
bluetoothLENodeObj object must be set to "central"
or "peripheral".
addTrafficSource(
adds a data traffic source to send data from the specified element of the source mesh node
bluetoothLENodeObj,trafficSource,DestinationAddress=destinationElementAddress,SourceAddress=sourceElementAddress,varargin)sourceElementAddress to the specified element of the destination mesh
node destinationElementAddress. The Role property of the
bluetoothLENodeObj object must be set to
"broadcaster-observer". varargin specifies one or
more name-value arguments of the upper layer metadata.
addTrafficSource(
additionally specifies the time to live (TTL) for the data communication between the
specified source and destination mesh nodes. The bluetoothLENodeObj,trafficSource,DestinationAddress=destinationElementAddress,SourceAddress=sourceElementAddress,TTL=ttl)Role property of the
bluetoothLENodeObj object must be set to
"broadcaster-observer".
Note
Each time you call this object function, you add a traffic generator (source) to a Bluetooth LE node. You can add multiple traffic sources to a node, directing them to the same or different destination nodes.
Reusing the same traffic source object in another
addTrafficSourceobject function call results in an error.
Examples
Input Arguments
Name-Value Arguments
References
[1] Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed September 12, 2025. 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/.
[3] Bluetooth Special Interest Group (SIG). "Bluetooth Mesh Profile". v1.0.1. https://www.bluetooth.com/specifications/specs/mesh-model-1-0-1/.