Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
89
Ver.1.0.0
After
“L2CAP_CMD_CONN_UPD_PARA_REQ” is received in
“L2CAP_CID_SIG_CHANNEL”, it will read interval_min (used as eventual interval),
supervision timeout and long suspend time (interval * (l1)), and check the
rationality of these data. If interval < 200ms, long suspend time<20s and supervision
timeout >= 2* long suspend time, this request will be accepted; otherwise this request will
be rejected. User can modify as needed based on this simple demo design.
No matter whether parameter request of Slave is accepted, the API below can be called
to respond to this request.
void
blc_l2cap_SendConnParamUpdateResponse
(
u16
connHandle,
int
result);
“connHandle” indicates current connection ID. “result” has two options, “accept” and
“reject”.
typedef
enum
{
CONN_PARAM_UPDATE_ACCEPT
= 0x0000,
CONN_PARAM_UPDATE_REJECT
= 0x0001,
}
conn_para_up_rsp
;
If 826x Master accepts request of Slave, it must send an update cmd to Controller via the
API “blm_ll_updateConnection” within certain duration. In demo code,
“host_update_conn_param_req” is used as mark, and a 50ms delay is set in mainloop to
initiate this update.