Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
61
Ver.1.0.0
When Controller Link Layer scans the right adv packet, the packet will be reported to
Host via
“HCI_SUB_EVT_LE_ADVERTISING_REPORT”.
Data length of this event is not fixed and it depends on payload of the adv packet, as
shown below. Please refer to BLE Spec for data definition.
hci
event
event
code
param
len
subevent
code
event
type
address[1...i]
0x04
0x3e
0x02
num
report
address type[1...i]
length[1..i]
data[1...i]
rssi[1..i]
Figure 3-17 LE Advertising Report Event
Note: In Telink BLE SDK, each
“LE Advertising Report Event” only reports an adv
packet
, i.e. “i” in
is 1.
3) HCI_SUB_EVT_LE_CONNECTION_UPDATE_COMPLETE
Please refer to
Core_v5.0
(Vol 2/Part E/7.7.65.3
“LE Connection Update Complete
Event”).
When
“connection update” in Controller takes effect,
“HCI_SUB_EVT_LE_CONNECTION_UPDATE_COMPLETE” will be reported to
Host.
Total data length of this event is 13, and 1-
byte “param len” is 10, as shown below.
Please refer to BLE Spec for data definition.
hci
event
event
code
param
len
subevent
code
connection
handle
conn interval
conn latency
0x04
0x3e
10
0x03
status
supervision
timeout
Figure 3-18 LE Connection Update Complete Event
“HCI LE event” needs the interface below to enable mask.
ble_sts_t
blc_hci_le_setEventMask_cmd
(
u32
evtMask);
//eventMask: LE
The following lists some evtMask definitions. Users can view other events in
“hci_const.h”.
#define
HCI_LE_EVT_MASK_CONNECTION_COMPLETE 0x00000001
#define
HCI_LE_EVT_MASK_ADVERTISING_REPORT 0x00000002
#define
HCI_LE_EVT_MASK_CONNECTION_UPDATE_COMPLETE 0x00000004
If users do not set HCI LE event masks via this API, masks of all HCI LE events in SDK
are disabled by default.