
Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
84
Ver.1.0.0
connHandle
Connect handle. Use BLS_CONN_HANDLE by default.
all_phys
Set if there are preferred Tx PHY and Rx PHY. An enum
variable.
PHY_TRX_PREFER
is the common value. See the definitions
of
le_phy_prefer_mask_t
for other values.
tx_phys
Preferred Tx PHY. An enum. Two optional values:
PHY_PREFER_1M
and
PHY_PREFER_2M
. Whether this
parameter will be used depends on if there is preferred Tx PHY
in all_phys.
rx_phys
Preferred Rx PHY. An enum. Two optional values:
PHY_PREFER_1M
and
PHY_PREFER_2M
. Whether this
parameter will be used depends on if there is preferred Rx
PHY in all_phys.
If users want to do some custom operations after PHY Update is finished, users can
register callback function. The function below is used for the registration of the callback
function:
void
bls_app_registerEventCallback
(
u8
e,
blt_event_callback_t
p)
Please see section 3.2.7
“Telink Defined Event” for the usage of this function.
3.2.10 Data Length Extension
Data Length Extension(DLE for short) is available from BLE core 4.2. For BLE versions
before BLE 4.2, a BLE packet can transmit 27Byte (ATT_MTU = 23) at most, and long
packets only can be transmitted in fragmented packets, thus the transmission efficiency
is low and it cannot meet actual demands. With DLE data of 251B can be transmitted at
once, which greatly improves the transmission efficiency and is very favorable for
applications of big data transmission, such as Audio and OTA.
DLE is a feature of link layer, please refer to
Core_v5.0
(Vol 6/Part B/ Link Layer
Specification) for details.
DLEs use LL_LENGTH_REQ and LL_LENGTH_RSP to exchange the largest byte
numbers of transmitting and receiving they each support and finally the smallest byte
numbers among them are used as the the numbers of bytes for Tx and Rx. DLE is only
available in connection and unavailable in disconnection. DLE can be started by master
or slave.
5316 BLE SDK supports DLE and provides interfaces for users. If DLE is started by
master, users do not need to do any configuration, BLE stack will process automatically;
if it is started by slave, users need to call the function below after the connection is
established.
ble_sts_t
blc_ll_exchangeDataLength
(
u8
opcode,
u16
maxTxOct)
After DLE is finished, BLT_EV_FLAG_DATA_LENGTH_EXCHANGE will be reported.
Users can register callback to complete custom operations.
The appropriate sizes of Tx FIFO and Rx FIFO must be configured when using DLE.
A large size takes too much RAM space, while a small size cannot meet demands.