Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
107
Ver.1.0.0
result in invoking failure, and the return value “ble_sts_t” will indicate the corresponding
error reason.
When this API is called in APP layer, i
t’s recommended to check whether the return value
is “BLE_SUCCESS”. If the return value is not “BLE_SUCCESS”, a delay is needed to re-
push the data.
The return values are shown as below:
ble_sts_t
Value
ERR reason
BLE_SUCCESS
0
HCI_ERR_CONN_NOT_ESTABLISH
0x3E
Link Layer is in None
Conn state.
SMP_EER_PAIRING_IS_GOING_ON
0x8F
Data cannot be sent
during pairing phase.
HCI_ERR_CONTROLLER_TX_FIFO_NOT_ENOUG
H
0x3A
Tasks with mass data are
being executed, software
Tx
FIFO
is not enough.
3.4.3.11 Handle Value Indication
Please refer to Core_v5.0 (Vol 3/Part F/3.4.7.2
) for details about “Handle Value
Indication
”.
Figure 3-44 Handle Value Indication in BLE Spec
The figure above shows the format of
“Handle Value Indication” in BLE Spec.
5316 BLE SDK supplies an API for Handle Value Indication of an Attribute. By invoking
this API, user can push the indicate data into bottom-layer BLE software FIFO. Stack will
push the data of software FIFO into hardware FIFO during the latest packet transfer
interval, and finally send the data out via RF.
ble_sts_t
bls_att_pushIndicateData
(
u16
handle,
u8
*p,
int
len);
“handle” is attHandle corresponding to Attribute, “p” is the head pointer of successive
memory data to be sent, while “len” specifies byte number of data to be sent. Since this
API supports auto packet disassembly, long indicate data to be sent can be
disassembled into multiple BLE RF packets, large “len” is supported.