Generate two unique Bluetooth LE LL advertising channel PDUs: first one of the type 'Advertising indication'
using advertising data '020106'
and the other of the type 'Connection indication'
using a set of data channels to be used.
Create a Bluetooth LE LL advertising channel PDU configuration object, 'cfgLLAdv'
, with the opcode as 'Advertising indication'
by using advertising data '020106'
.
cfgLLAdv =
bleLLAdvertisingChannelPDUConfig with properties:
PDUType: 'Advertising indication'
ChannelSelection: 'Algorithm1'
AdvertiserAddressType: 'Random'
AdvertiserAddress: '0123456789AB'
AdvertisingData: [3x2 char]
Generate the Bluetooth LE LL advertising channel PDU by using the corresponding configuration object. Display the PDU length in octets.
Display the first octet of the generated Bluetooth LE LL advertising channel PDU.
ans = 8×1
0
0
0
0
0
0
1
0
Create another Bluetooth LE LL advertising channel PDU configuration object, this time using the name-value pairs. Set the Bluetooth LE LL advertising channel PDU opcode to 'Connection indication'
.
cfgLLAdv =
bleLLAdvertisingChannelPDUConfig with properties:
PDUType: 'Connection indication'
ChannelSelection: 'Algorithm1'
AdvertiserAddressType: 'Random'
AdvertiserAddress: '0123456789AB'
InitiatorAddressType: 'Random'
InitiatorAddress: '0123456789CD'
AccessAddress: '01234567'
CRCInitialization: '012345'
WindowSize: 1
WindowOffset: 0
ConnectionInterval: 6
PeripheralLatency: 0
ConnectionTimeout: 10
UsedChannels: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36]
HopIncrement: 5
SleepClockAccuracy: '251 to 500 ppm'
Specify the value of connection interval as 8
and the set of data channels as [0 4 12 16 18 24 25]
.
cfgLLAdv =
bleLLAdvertisingChannelPDUConfig with properties:
PDUType: 'Connection indication'
ChannelSelection: 'Algorithm1'
AdvertiserAddressType: 'Random'
AdvertiserAddress: '0123456789AB'
InitiatorAddressType: 'Random'
InitiatorAddress: '0123456789CD'
AccessAddress: '01234567'
CRCInitialization: '012345'
WindowSize: 1
WindowOffset: 0
ConnectionInterval: 8
PeripheralLatency: 0
ConnectionTimeout: 10
UsedChannels: [0 4 12 16 18 24 25]
HopIncrement: 5
SleepClockAccuracy: '251 to 500 ppm'
Generate the Bluetooth LE LL advertising channel PDU from the corresponding configuration object. Display the PDU length in octets.
Display the first octet of the generated Bluetooth LE LL advertising channel PDU.
ans = 8×1
1
0
1
0
0
0
1
1