%% Create Bluetooth BR/EDR Waveform Configuration Objects
% Create three unique Bluetooth BR/EDR waveform configuration objects for synchronous connection oriented (SCO), connectionless slave broadcast (CSB), and asynchronous connectionless (ACL) logical transports.
% Create a Bluetooth BR/EDR waveform configuration object for an SCO logical transport by specifying packet type as HV1. For SCO logical transport, the PHY transmission mode must be basic rate (BR).

cfg = bluetoothWaveformConfig;
cfg.PacketType = 'HV1'

% Create a second Bluetooth BR/EDR waveform configuration object for a CSB logical transport by specifying the packet type as DH1 and disabling the whiten status.

cfg = bluetoothWaveformConfig('PacketType','DH1','WhitenStatus','Off')

% Create a third Bluetooth BR/EDR waveform configuration object for an ACL logical transport with enhanced data rate mode. Set the value of packet type to DH3, and payload length to 184 bytes.

cfg = bluetoothWaveformConfig;
cfg.Mode = 'EDR2M';
cfg.PacketType = 'DH3';
cfg.PayloadLength = 184  % in bytes

% Copyright 2019 The MathWorks, Inc.