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.

CC2640R2F: the phone doesnt pop pairing dialog during pairing.

Part Number: CC2640R2F


I face an issue when I trying to pair with my android phone but it didnt pop passcode input dialog then pairing fail.

I am using BLE5 peripheral mode with these setting:

#if defined(GAP_BOND_MGR)
// Setup the GAP Bond Manager. For more information see the GAP Bond Manager
// section in the User's Guide:
// Don't send a pairing request after connecting; the peer device must
// initiate pairing
// Use authenticated pairing: require passcode.
uint8_t mitm = TRUE;
// This device only has display capabilities. Therefore, it will display the
// passcode during pairing. However, since the default passcode is being
// used, there is no need to display anything.
// Request bonding (storing long-term keys for re-encryption upon subsequent
// connections without repairing)
uint8_t bonding = TRUE;

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);

These codes is working on simple peripherial example code, but I conuld not understand why it fail on my side.

Any idea to debug it??


  • Hello,

    Thank you for posting on the E2E forums. I have assigned this thread to an expert. In the meantime, what SDK version are you using?



  • i am using cc2640R2F SDK 5.3.

    I am using this code and port to cc2640R2F with some changes like reduce stack size for task and disable unnecessary task to me.

  • Hi,

    First of all, I would recommend to make sure to clean up the bonded devices list on the phone. When re-flashing a same device, this may be an issue.

    I would then recommend to verify if the Android phone manages to pair with a non-modified simple_peripheral example.

    After that, depending on the results, a review of the differences between the projects may be relevant.

    I hope this will help,

    Best regards,

  • Hi,

    Just found strange way to fix it. (SDK and non-modify demo code is great)

    One of my task allocate 4096 K stack size (HIDEMUKBD_TASK_STACK_SIZE) and after I change it to 1024, it works well now.

    But I cant understand why allocate too many memory will cause passcode call back cant be called....?(pairing call back is working).