%% End-to-End Workflow of BLE ATT PDU
% Create a BLE ATT PDU configuration object. Change the value of opcode to 'Read by type request'. View the applicable properties of the specified value of opcode.

cfgTx = bleATTPDUConfig;
cfgTx.Opcode = 'Read by type request'

% Generate a BLE ATT PDU from the corresponding configuration object.

attPDU = bleATTPDU(cfgTx);

% Decode the generated BLE ATT PDU. The returned status indicates decoding is successful. View the applicable properties of the opcode 'Error response'.

[status, cfgRx] = bleATTPDUDecode(attPDU)

% Copyright 2018 The MathWorks, Inc.