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.

CC2642R: Connection failed after bonding

Part Number: CC2642R

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;

  • Hello Burak, 

    Thanks for reaching out. I have a few questions to help us narrow down the problem. Are you using a custom board? Also, what SDK version are you using and are you using the simple_central/simple_peripheral example programs? Let me know! 

    Thanks, 

    Isaac

  • Hi Isaac, 

    Yes I am using a custom board. Also, my SDK version is 5.20. I have changed a bit simple_peripheral for my application. However, the bonding settings are same with example project.

    Thanks,

  • Hi Burak,

    I would suggest to verify if you can reproduce when using the unmodified simple_peripheral and simple_central from the newest SDK version (7.10 as of today).

    The reason I am suggesting this, is because I have noticed a few bug fixes that may impact your use case in the SDKs that have been published since then. In addition, the use case you are referring to has been successfully tested in the SDK I have referred to you.

    If needed, SDK 7.10 can be downloaded here: https://www.ti.com/tool/download/SIMPLELINK-LOWPOWER-F2-SDK

    You can also consider leveraging CCS Cloud (instead of installing the SDK locally). To do so, you may want to review the TI Developer Zone (dev.ti.com/).

    I hope this will help,

    Best regards,