Main Content

updateChannelList

Update channel list of Bluetooth BR node

    Description

    example

    status = updateChannelList(bluetoothBRNodeObj,newUsedChannelsList,DestinationNode=destinationNode) updates the channel map for the physical link between the Bluetooth® basic rate (BR) node, bluetoothBRNodeObj, and the specified destination node, destinationNode, by providing a new list of used channels, newUsedChannelsList, to the Bluetooth BR node, bluetoothBRNodeObj, object. The object function returns a status, status, indicating whether bluetoothBRNodeObj accepts the new channel list. To enable this syntax, set the Role property of the bluetoothBRNodeObj object to "central".

    Examples

    collapse all

    Initialize the wireless network simulator.

    networkSimulator = wirelessNetworkSimulator.init();

    Create two Bluetooth BR 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 connection configuration object to configure and share a connection between Bluetooth BR Central and Peripheral nodes.

    cfgConnection = bluetoothConnectionConfig;

    Configure 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 ... ]
                            PollInterval: 40
                           InstantOffset: 240
                        TransmitterPower: 20
                      SupervisionTimeout: 32000
    
       Read-only properties:
                          CentralAddress: "D091BBE70001"
                        PrimaryLTAddress: 1
    
    

    Create and configure a networkTrafficOnOff object to generate an On-Off application traffic pattern.

    traffic = networkTrafficOnOff(DataRate=200,PacketSize=27, ...
        GeneratePacket=true,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);
    Custom channel model is not added. Using free space path loss (fspl) model as the default channel model.
    

    Retrieve application, baseband, and physical layer (PHY) statistics corresponding to the Central and Peripheral nodes.

    centralStats = statistics(centralNode);
    peripheralStats = statistics(peripheralNode);

    Input Arguments

    collapse all

    Bluetooth BR node object, specified as a bluetoothNode object with the Role property set to "central". To enable this input, perform these steps.

    List of good channels, specified as a vector of integers in the range [0, 78]. This input specifies the new list of used channels with which to update the channel map for the specified Bluetooth BR node. To ensure that at least 20 channels are set as used (good) channels, specify this vector with unique values and a length greater than or equal to 20.

    Data Types: double

    Name of the destination node, specified as a bluetoothNode object. The destination node specified by this input must be connected to the Bluetooth BR node specified by the bluetoothBRNodeObj input by using the configureConnection object function.

    Output Arguments

    collapse all

    Flag indicating whether the baseband layer of the specified Bluetooth BR node accepts the new channel list, returned as a logical 0 (false) or 1 (true).

    Data Types: logical

    References

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

    [2] Bluetooth Core Specifications Working Group. "Bluetooth Core Specification" v5.3. https://www.bluetooth.com/.

    Version History

    Introduced in R2022b