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.

CCS/CC2640R2F: Pairing problem! Device can't be paired. custom board with revised simple_peripheral program.

Part Number: CC2640R2F

Tool/software: Code Composer Studio

I'm using a custom board with CC2640R2F. The application is revised a little based on Simple_peripheral program from TI. Only add a sensor service and the sensor service work very well. 

The problem is it can't be paired by any center device(Windows/IOS). I use breakpoints to debug and it shows the pairing state can only get to GAPBOND_PAIRING_STATE_STARTED, but never get to GAPBOND_PAIRING_STATE_COMPLETE. 

TI SimpleLink CC2640R2 Software Development Kit (Version 1.50.00.58)

TI Code Composer Studio: CCS-9

TI Code Generation Tools for ARM: 16.09.03.LTS

XDCTools: 3.50.03.3

Debugger: XDS110

BLE 4.2

Usually, what reason can cause pairing unsuccessful? How can I debug it? 

Thanks

  • Hi Shuang,

    Can you post your pairing/bonding settings? Also, can you post a sniffer log of this happening?
  • uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
    // 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.
    uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
    // 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);


    Here is the pairing setting. Although there's no display to show the passcode on my board, I use a default passcode 123456.
  • You should at least get the GAPBOND_PAIRING_STATE_COMPLETE with a timeout status if pairing never completes. Are you waiting long enough?
    Are you ever prompted to enter a passcode on the Windows device? I would assume that this is required at some poitn.

    It's impossible to comment more without some type of log. Can you post a sniffer capture as Marie mentioned? Or at least a Windows log of what is happening.
  • Thanks.

    I'm waiting it until the Windows shows pairing failed. It never shows the passcode enter window. It won't hit the breakpoint on pairing complete, it only hits the pairing started. 

    I don't have a sniffer now but I will get one soon. Here's the window of pairing failed showed on Windows. 

    But it can be connected and read the device information and use the services on this device. 

  • And I print some log on console like below: 

    WhenI click pair on Windows, the console shows paring started. After 3 seconds, it will show advertising again. 

  • Please take either an over-the-air sniffer capture or find a way to show the Windows log of what exactly is failing.
  • Is there any update here?
  • Sorry, I don't have any over the air sniffer. I will buy one ASAP. The only way I can use is to output the information from console, show as below: 

    Is there any other method to find the problem? 

  • Unfortunately, this is not enough information. We need some type of log to see what is happening during the pairing sequence.