%% Decode Corrupted BLE LL Data Channel PDU
% Specify a BLE LL data channel PDU containing corrupted data values. Initialize the CRC value.

pdu = '040C00010000060000000A00'; % Sample corrupted PDU
crcInit = 'CD3234'; % CRC initialization value

% Decode the specified BLE LL data channel PDU. The returned status indicates that the decoding failed due to the corrupted BLE LL data channel PDU. If the decoding fails, the reason is indicated and the BLE LL data channel PDU configuration object, 'cfgLLData', displays no properties.

[status, cfgLLData, llPayload] = bleLLDataChannelPDUDecode(...
    pdu, crcInit, ...
    'InputFormat', ...
    'octets')

% Copyright 2018 The MathWorks, Inc.