Generate three unique Bluetooth LE GAP AD blocks: first one with AD types 'Flags'
and 'Tx power level'
, the second one with AD types 'Advertising interval'
and 'Local name'
and the third one with AD type 'Flags'
. All the three GAP AD blocks have simultaneous support for Bluetooth LE and basic rate/enhanced data rate (BR/EDR) at the host.
Create a configuration object for a Bluetooth LE GAP AD block and specify the AD types as 'Flags'
and 'Tx power level'
. Set the values of LED discoverability to 'Limited'
and Tx power level to 45
.
Generate the Bluetooth LE GAP AD block from the corresponding configuration object.
dataBlock1 = 6x2 char array
'02'
'01'
'05'
'02'
'0A'
'2D'
Create a configuration object for a Bluetooth LE GAP AD block, this time with the advertising data types as 'Advertising interval'
and 'Local name'
. Specify the values of the advertising interval as 48
, the local name as 'MathWorks'
and the local name shortening as true
.
Generate the Bluetooth LE GAP AD block from the corresponding configuration object.
dataBlock2 = 15x2 char array
'03'
'1A'
'30'
'00'
'0A'
'08'
'4D'
'61'
'74'
'68'
'57'
'6F'
'72'
'6B'
'73'
Create a configuration object for a Bluetooth LE GAP AD block with type 'Flags'
. Set the values of LE discoverability to 'Limited'
, BR/EDR support to true
, and simultaneous support for LE and BR/EDR to 'Host'
.
Generate the Bluetooth LE GAP AD block from the corresponding configuration object.
dataBlock3 = 3x2 char array
'02'
'01'
'11'