Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
81
Ver.1.0.0
3.2.8.13 Get Connection Parameters
The following APIs are used to obtain current connection parameters including
Connection Interval, Connection Latency and Connection Timeout (only apply to Slave
role).
u16
bls_ll_getConnectionInterval
(
void
);
u16
bls_ll_getConnectionLatency
(
void
);
u16
bls_ll_getConnectionTimeout
(
void
);
1) If return value is 0, it indicates current Link Layer state is None Conn state without
connection parameters available.
2) The returned non-zero value indicates the corresponding parameter value.
API “bls_ll_getConnectionInterval” returns the current conn interval, unit being
1.25ms. Suppose current conn interval is 10ms, the return value should be
10ms/1.25ms=8.
API “bls_ll_getConnectionLatency” returns the actual Latency value.
API “bls_ll_getConnectionTimeout” returns the current conn timeout, unit being
10ms. Suppose current conn timeout is 1000ms, the return value would be
1000ms/10ms=100.
3.2.8.14 blc_ll_getCurrentState
The API below is used to obtain current Link Layer state.
u8
blc_ll_getCurrentState(
void
);
The return values of this function are as below (5316 SDK does not support
BLS_LINK_STATE_SCAN and BLS_LINK_STATE_INIT)
#define
BLS_LINK_STATE_IDLE
0
#define
BLS_LINK_STATE_ADV
BIT(0)
#define
BLS_LINK_STATE_SCAN
BIT(1)
#define
BLS_LINK_STATE_INIT
BIT(2)
#define
BLS_LINK_STATE_CONN
BIT(3)
3.2.8.15 blc_ll_getLatestAvgRSSI
The API serves to obtain latest average RSSI of connected peer device after Link Layer
enters Slave role or Master role.
u8
blc_ll_getLatestAvgRSSI
(
void
)
The return value is u8-type rssi_raw, and the real RSSI should be: rssi_real = rssi_raw-
110. Suppose the return value is 50, rssi = -60 db.