%% Decode Corrupted BLE L2CAP Frame
% Specify a BLE L2CAP frame containing corrupted data values.

l2capFrame = ['090005000107040060005000']; % Sample frame

% Decode the specified BLE L2CAP frame. The returned status indicates that the decoding failed due to the corrupted input L2CAP frame. In this case, when decoding fails, the output displays the reason of failure and the BLE L2CAP frame configuration object, 'cfgL2CAP', displays no properties.

[status, cfgL2CAP, SDU] = bleL2CAPFrameDecode(l2capFrame)

% Copyright 2019 The MathWorks, Inc.