EasyManua.ls Logo

TELINK SEMICONDUCTOR TLSR8232 - Update Connection Parameters; Slave Requests for Connection Parameter Update

Default Icon
211 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1 87 Ver.1.0.0
3.3.2 Update Connection Parameters
3.3.2.1 Slave Requests for Connection Parameter Update
In BLE stack, Slave can actively apply for a new set of connection parameters by sending
command “CONNECTION PARAMETER UPDATE REQUEST” to Master in L2CAP
layer. The figure below shows the command format. Please refer to Core_v5.0 (Vol
3/Part A/ 4.20 “CONNECTION PARAMETER UPDATE REQUEST”).
Figure 3-25 Connection Para Update Req Format in BLE Stack
5316 BLE SDK provides an API in L2CAP layer for Slave to send command
CONNECTION PARAMETER UPDATE REQUEST” to Master and actively apply for a
new set of connection parameters.
void bls_l2cap_requestConnParamUpdate (u16 min_interval,
u16 max_interval,
u16 latency, u16 timeout);
The four parameters of this API correspond to the parameters in the “data” field of the
“CONNECTION PARAMETER UPDATE REQUEST”. The “min_interval” and
“max_interval” are in a unit of 1.25ms (e.g. for 9ms connection interval, the value should
be 10ms); the “timeout” is in a unit of 10ms (e.g. for 100s timeout, the value should be
1000ms).
Application example: Slave requests for new connection parameters when connection is
established.
void task_connect (u8 e, u8 *p)
{
//interval=7.5ms latency=99 timeout=4s
bls_l2cap_requestConnParamUpdate (6, 6, 99, 400);
}
Figure 3-26 BLE Sniffer Packet Sample: conn para Update Request & Response

Table of Contents