Payload length in bytes for Bluetooth BR/EDR format configuration
Download Required: To use getPayloadLength, first download Communications Toolbox™ Library for the Bluetooth® Protocol. For more information, see Get and Manage Add-Ons. Alternatively, see Communications Toolbox Library for the Bluetooth Protocol File Exchange.
Create a Bluetooth BR/EDR waveform configuration object with default properties.
cfg = bluetoothWaveformConfig
cfg = bluetoothWaveformConfig with properties: Mode: 'BR' PacketType: 'FHS' DeviceAddress: '0123456789AB' LogicalTransportAddress: [3x1 double] HeaderControlBits: [3x1 double] ModulationIndex: 0.3200 SamplesPerSymbol: 8 WhitenStatus: 'On' WhitenInitialization: [7x1 double]
Get the payload length of the default
payloadLength = getPayloadLength(cfg)
payloadLength = 18
Create another Bluetooth BR/EDR waveform configuration object. Set the packet type as
cfgHV1 = bluetoothWaveformConfig('PacketType','HV1');
Get the payload length of the specified
payloadLength = getPayloadLength(cfgHV1)
payloadLength = 10
payloadLength— Payload length of packet
18(default) | nonnegative integer
Payload length of packet, returned as a nonnegative integer. This value indicates the number of bytes to be processed in a packet.
 Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed November 22, 2019. https://www.bluetooth.com/.
 Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification." Version 5.1. https://www.bluetooth.com/.