%% Generate BLE LL Data PDU Using Upper-Layer Payload
% Create a BLE LL data channel PDU configuration object, 'cfgLLData', for a data PDU by using the default configuration. View the corresponding default properties.

cfgLLData = bleLLDataChannelPDUConfig

% Generate a BLE LL data PDU by using the corresponding configuration object, 'cgLLData' and the upper-layer payload '030004000A0100'. Display the PDU length in octets.

pdu = bleLLDataChannelPDU(cfgLLData,'030004000A0100');
numel(pdu)/8

% Display the first octet of the generated BLE LL data PDU.

pdu(1:8)

% Copyright 2019 The MathWorks, Inc.