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: BLE Pairing and Bonding issue

Part Number: CC2642R
Other Parts Discussed in Thread: SYSCONFIG, UNIFLASH

Hello,

Q1. On Hardware#1 ,we are facing an issue where the BLE chip is not able to pair with more than 10 Mobile phones.

From 11th phone onwards we are getting timeout issues in either pairing or making a connection for the first time.

 I came across this TI Forum Link which talks about almost similar issue:

We limited it to 10 because when using privacy and scanning/establishing connections with devices you've already paired with, the device has to first traverse the full resolving list and bond entries to check if it can resolve the RPA of the advertiser before sending request. It has to do this for all three 4 PHYS, S=2, S=8, 1Mbps and 2Mbps. The limitation for 10 was defined because in the instance that the 2M phy was used, there was not enough time for the device to see the advertiser using an RPA, check it against the resolving list/bonds, form a connect request all in the minimum turn around time defined by the specification, if there was 11 devices bonded and beyond. After 10, we have not characterized this behavior and cannot guarantee it so using it past 10 is a risk that you and your customer will have to assume as a device limitation that you are exceeding. 

We suspect the issue we are facing is due to the above  limitation on pairing. Could  you confirm form your side the maximum number of Paired devices supported by TI BLE Chip?

Q2. On Hardware#2, we can pair up to 18 phones. 

Bond entries is set to 10

RLU config is set to 0  

With the above settings, only first 10 should be bonded. However, when we try to reconnect for the second time, all the initial 10 phones are able to connect without a new pairing request. This confirms that first 10 are bonded.

However, among phones from 11 to 18, few are able to reconnect without another pairing request, few others give pairing pop up and then timeout with pairing error. So we are not sure what exactly is happening for devices form 11 to 18. Are they just paired for one time only and not bonded? Then how some phones are able to connect second time without going through pairing pop up? Mostly pairing timeout issue is happening in iPhones and some other latest model phones. Does different models of phone treat the scenario of not having the keys bonded on other device differently? 

Appreciate your quick reply and any further details related to this!

  • Hi,

    Thank you for reaching out.

    Q1 - You are not specifying the SDK version being used here, but I guess you are using a fairly new SDK (at least newer than 6.10).
    The E2E thread referenced is 5+ years old. As of today, the CC2642 is tested to support up to 32 bonds.
    By default, the number of bond entries is set to 10. This value can be changed using SysConfig > BLE > Bond Manager > Maximum Number of Supported Bonds

    Q2- If LRU bond replacement is deactivated, the device won't form more bonds - but will still pair if required. I guess you could get confirmation whether the device is bonded using a Bluetooth sniffer.
    In general, if you want to increase the number of bonds, I recommend following the guidance at first question.

    I hope this will help,

    Best regards,

  • Hi Clement,

    The SDK we are using is 

    SimpleLink CC13x2_26x2 SDK 5.20.00.52. Please confirm if this is outdated or may create issues mentioned in first question.

  • Hi,

    In general, we recommend using the newest SDK version to go to production.
    Based, on my observations, SDK 5.20 should allow you to reach the 32 bonds mentioned before.

    Please refer to the applicable documentation to increase the number of bonding entries: https://software-dl.ti.com/simplelink/esd/simplelink_cc13x2_26x2_sdk/5.20.00.52/exports/docs/ble5stack/ble_user_guide/html/ble-stack-5.x/gapbondmngr-cc13x2_26x2.html#increasing-number-of-bonding-entries

    Best regards,

  • Hi Clement,

    Yes, we will increase the number of bandings from 10 to 32. 

     What is the best way to verify the BLE bonded addresses in NVM? Is it possible to view the NVM data in JTAG Debugger watch window?

    If yes, what is  the address to be checked for that? We checked in debugger by giving the start address of NVM - 0x520000, but couldn't locate any of the 10 devices which we have already bonded.

  • Reshmi,

    Please reference the Extract Bonding Information section of the User's Guide. This section contains code examples and an explanation on how to extract bonding data. The GAP Bond Manager and LE Secure Connections chapter as a whole will be a very valuable reference if dealing with bonding information.

    Best regards,
    Luke

  • Hi Clement,

    1)The document you shared explains how to extract bonding data in the code. My question is how to check NV memory locations to verify the bonded devices addresses easily without making additional changes in the code. Is it possible to view these addresses in JTAG debugger or taking a flash dump? If yes, which is the starting address we should check?

    2) We have modified the start and end locations of GAP , GATT config and sutom data to make the change from 10 t0 20 bonded devices.

    (I found that the indexes are crossing FF if I do it for 32 devices)

    Kindly review the values and let us know if these values are ok or not for 20 devices for now.

    // Bonding NV Items -      - Modified for 20 bondings
    #define BLE_NVID_GAP_BOND_START         0x20  //!< Start of the GAP Bond Manager's NV IDs
    #define BLE_NVID_GAP_BOND_END           0x98  //!End of the GAP Bond Manager's NV IDs Range

    // GATT Configuration NV Items - Range   - This must match the number of Bonding entries
    #define BLE_NVID_GATT_CFG_START         0xA0  //!< Start of the GATT Configuration NV IDs
    #define BLE_NVID_GATT_CFG_END           0xB4 //!< End of the GATT Configuration NV IDs

    // Customer NV Items - Range  0x80 - 0x8F - This must match the number of Bonding entries
    #define BLE_NVID_CUST_START             0xC0  //!< Start of the Customer's NV IDs
    #define BLE_NVID_CUST_END               0xD4  //!< End of the Customer's NV IDs

    3) There is a note in the SDK documentation :

    "Note:Any change in the bonding configuration, such as increasing the max number of bonding entries, must be followed by a full erase of the NV. Since there is no API in the stack for doing this, the erase must be performed using a programming tool such as CCS or Uniflash."

    Is this NV erase same as mass erase of flash that we normally do just before programming the flash? Or is there a special erase for NV region which can be done only using UniFlash or CCS. We are using WinIDea for Programming and erasing the flash.

    4) When we reflash the chip, will the NV region/Bonding data be retained?

  • Or else, pls share a calculation of NVIDs for 32 bonded devices.

  • Hi,

    The complete NV erase can be completed using the Mass Erase functionality. It should be possible to view the addresses that the bonding information is stored at and extract the information that way. Taking a step back, could you clarify why are you attempting to view the bonded devices? Is this for debugging purposes?

    Best Regards,

    Jan

  • Yes, this is for debugging.

  • Can you please answer the remaining questions as well?

  • Can you pls confirm if the path of gapbondmgr.h which we need to edit is this one?

    ->C:\ti\simplelink_cc13x2_26x2_sdk_5_20_00_52\source\ti\ble5stack\inc\gapbondmgr.h

    Our device is acting as BLE Peripheral.

    We are making GAP_BONDINGS_MAX from 10 to 32, and do a clean and build. we will then perform Mass erase and flash the code.But in our testing it looks like the changes did not take effect. In debugger we can see gapbondmax variable is still having value 10. Please review the steps and le tme know if we are missing anything.

  • Reshmi,

    Could you clarify which questions are still unanswered that you need more details on?

    C:\ti\simplelink_cc13x2_26x2_sdk_5_20_00_52\source\ti\ble5stack\inc\gapbondmgr.h

    This is the correct file path that needs to be edited. The steps you have outlined are correct. Let us know if you have any issues in implementing these steps. 

    Best regards,

    Luke