Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
112
Ver.1.0.0
3.5.3.2 BLT_EV_FLAG_PAIRING_END
Event trigger condition: This event will be triggered when pairing is finished in success or
failure. If Slave or Master fails to follow standard pairing procedure, or communication
abnormity occurs (e.g. report error), pairing will fail.
Data length “n”: 1.
Pointer
“p”: It points to a flag variable, which should be either 0 (pairing success) or non-
zero value (pairing failure).
3.5.4 SMP Bonding Information
SMP bonding information herein is discussed relative to Slave device. Please refer to the
code of “direct adv” setting in initialization in “5316 remote” project.
Slave can store pairing information of up to four Master devices at the same time. All of
the four devices can be re-connected successfully. The API below serves to set the
maximum device number for current storage, which should not exceed 4
(SMP_BONDING_DEVICE_MAX_NUM). The default value is 4.
#define
SMP_BONDING_DEVICE_MAX_NUM
4
ble_sts_t
blc_smp_param_setBondingDeviceMaxNumber
(
int
device_num);
Suppose it
’s set as “blc_smp_param_setBondingDeviceMaxNumber (4)”: When pairing
information of four paired devices are stored, if the 5
th
device is paired, the pairing info of
the oldest device will be deleted automatically, so that the pairing info of the 5
th
device
can be stored.
Suppose it
’s set as “blc_smp_param_setBondingDeviceMaxNumber (2)”: When pairing
information of two paired devices are stored, if the 3
rd
device is paired, the pairing info of
the oldest device will be deleted automatically, so that the pairing info of the 3
rd
device
can be stored.
The API below is used to obtain the number of successfully paired Master devices with
pairing info stored in Slave Flash.