Main Content

bluetoothMeshProfileConfig

Bluetooth mesh profile configuration parameters

    Description

    Use the bluetoothMeshProfileConfig object to set mesh profile configuration parameters at a Bluetooth® low energy (LE) node based on Bluetooth Mesh Profile v1.0.1 [3].

    Creation

    Description

    example

    cfgMesh = bluetoothMeshProfileConfig creates a default Bluetooth mesh profile configuration object.

    cfgMesh = bluetoothMeshProfileConfig(Name=Value) sets properties by using one or more name-value arguments. For example, Relay=true enables relay support at the mesh node.

    Properties

    expand all

    Unicast address of the mesh node element, specified as a 4-element character vector or a string scalar denoting a 2-octet hexadecimal unicast address. If the mesh profile contains multiple elements, specify this property as a character vector of size N-by-4 or a string vector of size N, where N is the total number of elements in the mesh profile. Set this property to a unique value for each element in the mesh network. For more information about node element addresses, see Section 2.3.4 of Bluetooth Mesh Profile v1.0.1 [3].

    Data Types: char | string

    Flag to enable the relay feature, specified as true or false. Enable the relay feature for a mesh node by setting this property to true. For more information about the relay feature, see Section 2.3.11 of Bluetooth Mesh Profile v1.0.1 [3].

    Data Types: logical

    Flag to enable the friend feature, specified as true or false. Enable the friend feature for a mesh node by setting this property to true. For more information about the friend feature, see Section 2.3.11 of Bluetooth Mesh Profile v1.0.1 [3].

    Data Types: logical

    Flag to enable the low power feature, specified as true or false. Enable the low power feature for a mesh node by setting this property to true. For more information about the low power feature, see Section 2.3.11 of Bluetooth Mesh Profile v1.0.1 [3].

    Data Types: logical

    Number of network transmissions, specified as an integer in the range [1, 8]. This value specifies the number of times a mesh node transmits a network message. For more information about network transmissions, see Section 4.2.19.1 of Bluetooth Mesh Profile v1.0.1 [3].

    Data Types: double

    Time interval between consecutive network transmissions, specified as a scalar in the range [0.01, 0.320]. Specify this value in seconds. This value specifies the time interval between consecutive network messages that the mesh node transmits. Set this value as an integer multiple of 10 milliseconds. For more information about the network transmission interval, see Section 4.2.19.2 of Bluetooth Mesh Profile v1.0.1 [3].

    Data Types: double

    TTL for the message, specified as an integer in the range [0, 127], excluding 1. This value specifies the maximum number of hops that the transmitted message can traverse in the mesh network. When no value is set for the transmitted message, as in the higher layers of the mesh profile, the bluetoothMeshProfileConfig object uses this value in the generated network message. For more information about TTL, see Section 4.2.7 of Bluetooth Mesh Profile v1.0.1 [3].

    Data Types: double

    Number of relay retransmissions, specified as an integer in the range [1, 8]. This value specifies the number of times a node retransmits a relayed network message. For more information about relay retransmissions, see Section 4.2.20.1 of Bluetooth Mesh Profile v1.0.1 [3].

    Data Types: double

    Time interval between two consecutive relay retransmissions, specified as a scalar in the range [0.01, 0.320]. Specify this value in seconds. This value specifies the time interval between the consecutive relayed messages that the mesh node retransmits. Set this value as an integer multiple of 10 milliseconds. For more information about the relay retransmission interval, see Section 4.2.20.2 of Bluetooth Mesh Profile v1.0.1 [3].

    Data Types: double

    Examples

    collapse all

    Create a default Bluetooth mesh profile configuration object.

    meshCfg = bluetoothMeshProfileConfig
    meshCfg = 
      bluetoothMeshProfileConfig with properties:
    
                 ElementAddress: "0001"
                          Relay: 0
                         Friend: 0
                       LowPower: 0
           NetworkTransmissions: 1
        NetworkTransmitInterval: 0.0100
                            TTL: 127
    
    

    Specify the element address of the mesh node.

    meshCfg.ElementAddress = "0002";

    Enable the relay feature of the mesh node. Set the number of network transmissions.

    meshCfg.Relay = true;
    meshCfg.NetworkTransmissions = 3;

    Create a Bluetooth LE mesh node, specifying the role as "Broadcaster-Observer". Assign the mesh profile configuration to the mesh node.

     meshNode = bluetoothLENode("broadcaster-observer");
     meshNode.MeshConfig = meshCfg;

    Specify the advertising interval and scan interval.

     meshNode.AdvertisingInterval = 0.03; % In seconds
     meshNode.ScanInterval = 0.02;        % In seconds

    Specify the name and position of the mesh node.

     meshNode.Name = "SampleRelayNode";
     meshNode.Position = [0 0 0]        % In meters
    meshNode = 
      bluetoothLENode with properties:
    
            TransmitterPower: 20
             TransmitterGain: 0
               ReceiverRange: 100
                ReceiverGain: 0
         ReceiverSensitivity: -100
                 NoiseFigure: 0
        InterferenceFidelity: 0
         AdvertisingInterval: 0.0300
           RandomAdvertising: 0
                ScanInterval: 0.0200
                  MeshConfig: [1x1 bluetoothMeshProfileConfig]
                        Name: "SampleRelayNode"
                    Position: [0 0 0]
    
       Read-only properties:
                        Role: "broadcaster-observer"
            FriendshipConfig: [1x1 bluetoothMeshFriendshipConfig]
              TransmitBuffer: [1x1 struct]
                          ID: 17
    
    

    References

    [1] Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed November 22, 2021. https://www.bluetooth.com/.

    [2] Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification." Version 5.3. https://www.bluetooth.com/.

    [3] Bluetooth Special Interest Group (SIG). "Bluetooth Mesh Profile". v1.0.1. https://www.bluetooth.com/.

    Version History

    Introduced in R2022a