Hi team,
I am developing a BLE central and peripheral applications with using CC2642R. Without pairing and bonding everything works perfectly. Central can discover and connect each other.
However, I am facing a problem while enabling bonding.
When I enable pairing and bonding, both devices goes through GAPBOND_PAIRING_STATE_STARTED => GAPBOND_PAIRING_STATE_COMPLETE => GAPBOND_PAIRING_STATE_BOND_SAVED.
After bond_saved I checked the bondCount in both devices and both result is 1.
However, while I terminate connection after bonding. Devices can not communicate again if I am not erasing bondings.
After termination of connection, central can discover the peripheral and attemp connection. I got GAP_LINK_ESTABLISHED_EVENT from each devices. But, I couldn't get any event from GAPBond_Mgr
However, I can't send data from central to peripheral or vice-versa.
After a while, the link is terminated with reason 0x22.
What could be the problem, I couldn't figure out the situation after reconnection without erasing the bonds.
/*********************************************************************
* Bond Manager Configuration for Peripheral
*/
uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
uint8_t mitm = true;
uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
uint8_t bonding = true;
uint8_t secureConnection = GAPBOND_SECURE_CONNECTION_ALLOW;
uint8_t authenPairingOnly = false;
uint8_t autoSyncWL = false;
uint8_t eccReGenPolicy = 0;
uint8_t KeySize = 16;
uint8_t removeLRUBond = false;
uint8_t KeyDistList = GAPBOND_KEYDIST_MENCKEY | GAPBOND_KEYDIST_MIDKEY | GAPBOND_KEYDIST_MSIGN | GAPBOND_KEYDIST_SENCKEY | GAPBOND_KEYDIST_SIDKEY | GAPBOND_KEYDIST_SSIGN;
uint8_t eccDebugKeys = false;
uint8_t allowDebugKeys = true;
uint8_t eraseBondWhileInConn = false;
* Bond Manager Configuration for Central
*/
uint8_t pairMode = GAPBOND_PAIRING_MODE_INITIATE;
uint8_t mitm = true;
uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
uint8_t bonding = true;
uint8_t secureConnection = GAPBOND_SECURE_CONNECTION_ALLOW;
uint8_t authenPairingOnly = false;
uint8_t autoSyncWL = false;
uint8_t eccReGenPolicy = 0;
uint8_t KeySize = 16;
uint8_t removeLRUBond = false;
uint8_t bondFailAction = GAPBOND_FAIL_TERMINATE_LINK;
uint8_t KeyDistList = GAPBOND_KEYDIST_MENCKEY | GAPBOND_KEYDIST_MIDKEY | GAPBOND_KEYDIST_MSIGN | GAPBOND_KEYDIST_SENCKEY | GAPBOND_KEYDIST_SIDKEY | GAPBOND_KEYDIST_SSIGN;
uint8_t eccDebugKeys = false;
uint8_t allowDebugKeys = true;
uint8_t eraseBondWhileInConn = false;