%% End-to-End Workflow of BLE LL Advertising Channel PDU
% Create a BLE LL advertising channel PDU configuration object, 'cfgTx'. Set the values of PDU type as 'Connection indication', the connection interval as 8, and the set of data channels as [0 4 12 16 18 24 25].

cfgTx = bleLLAdvertisingChannelPDUConfig('PDUType', ...
    'Connection indication');
cfgTx.ConnectionInterval = 8;
cfgTx.UsedChannels       = [0 4 12 16 18 24 25]

% Generate a BLE LL advertising channel PDU by using the corresponding configuration object.

pdu = bleLLAdvertisingChannelPDU(cfgTx);

% Decode the generated BLE LL advertising channel PDU. The returned status indicates decoding is successful. View the output of 'status' and 'cfgRx'.

[status, cfgRx] = bleLLAdvertisingChannelPDUDecode(pdu)

% Copyright 2019 The MathWorks, Inc.