Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
73
Ver.1.0.0
The “data” pointer points to the starting address of AdvData, while the “len” indicates data
length. The table below lists possible results for the return type “ble_sts_t”.
ble_sts_t
Value
ERR Reason
BLE_SUCCESS
0
HCI_ERR_INVALID_HCI_CMD_PARAMS
0x12
Len exceeds the
maximum length 31
This API can be called in initialization to set adv data, or called in mainloop to modify adv
data when the firmware is running.
In “5316 ble remote” project of 5316 BLE SDK, the definition of AdvData is shown as
below. Please refer to “Data Type Specification” in BLE Spec
CSS v6
(Core Specification
Supplement v6.0) for meanings of fields.
u8
tbl_advData[] = {
0x05, 0x09,
'G'
,
'h'
,
'i'
,
'd'
,
0x02, 0x01, 0x05,
0x03, 0x19, 0x80, 0x01,
0x05, 0x02, 0x12, 0x18, 0x0F, 0x18,
};
The adv device name is set as " Ghid " in the adv data shown above.
3.2.8.6 bls_ll_setScanRspData
Please refer to
Core_v5.0
(Vol 2/Part E/ 7.8.8
“LE Set Scan response Data Command”).
Similar to the setting of Adv packet Payload, an API is used to set Scan response
Payload:
ble_sts_t
bls_ll_setScanRspData
(
u8
*data,
u8
len);
The “data” pointer points to the starting address of scanRspData in Payload, while the
“len” indicates data length. The table below lists possible results for the return type
“ble_sts_t”.
ble_sts_t
Value
ERR Reason
BLE_SUCCESS
0
HCI_ERR_INVALID_HCI_CMD_PARAMS
0x12
Len exceeds the
maximum length 31
This API can be called in initialization to set Scan response data, or called in mainloop to
modify scan response data when the firmware is running.
In
project “5316 ble remote” of 5316 BLE SDK, the definition of Scan response data is
shown as below. The name of scan device is "GRemote".
Please refer to “Data Type
Specification
” in BLE Spec
CSS v6
(Core Specification Supplement v6.0) for meanings of
fields.