This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC2640R2F: Pairing always failed after reboot when set pairing mode as GAPBOND_PAIRING_MODE_INITIATE

Part Number: CC2640R2F


Tool/software: TI-RTOS

I tried to implement the function of starting piring procedure by peripheral, hence I initialize gap bond manager as below:

uint32_t passkey = 123456;
uint8_t pairMode = GAPBOND_PAIRING_MODE_INITIATE;
uint8_t mitm = TRUE;
uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;//I/O能力
uint8_t bonding = TRUE;
uint8_t scMode = GAPBOND_SECURE_CONNECTION_ALLOW;

GAPBondMgr_SetParameter(GAPBOND_DEFAULT_PASSCODE, sizeof(uint32_t), &passkey);
GAPBondMgr_SetParameter(GAPBOND_PAIRING_MODE, sizeof(uint8_t), &pairMode);
GAPBondMgr_SetParameter(GAPBOND_MITM_PROTECTION, sizeof(uint8_t), &mitm);
GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t), &ioCap);
GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t), &bonding);
GAPBondMgr_SetParameter(GAPBOND_SECURE_CONNECTION, sizeof(uint8_t), &scMode);

I use an android smartphone as master device to test it, when the first time two device perform pairing procedure, everything is OK. Disconnect the connection, reconnect it, pairing procedure was also performed successfully.

But when I reboot or reset the slave device, the trouble appear, pairing failed, by siffering, I found the error code is PIN_OR_KEY_MISSING(0x0B). I get the bond count by GAPBondMgr_SetParameter(GAPBOND_BOND_COUNT, ... ), it is correct. That is, the bond records is stored by SNV. I try use some other android smartphone to test it, The problem still exist. Is it a bug of the BLE Stack SDK? Who can help me?