CC1354P10: Change bond manager configuration dynamically

Part Number: CC1354P10
Other Parts Discussed in Thread: SYSCONFIG

Hello,

I have a customer asking if there's a way to dynamically change the supported bond manager pairing configurations for different IO capabilities?

They have tried using the GAPBondMgr_SetParameter() function and calling SimplePeripheral_init() but both seem to cause the device to go into hard fault.

It looks like the opcode here along with the io capabilities should allow for this to change dynamically:

TI BLE5-Stack API Documentation: GAP Bond Manager Parameters

TI BLE5-Stack API Documentation: GAP Bond Manager I/O Capabilities

Any suggestions on how to correctly call into this API?

Munan

  • Hi !

    The SimplePeripheral_init function should only be called once. It's responsible for adding the services, constructing clocks and many many other things. Calling this function twice is a sure way to have issues. Among other things, SimplePeripheral_init also calls the setBondManagerParameters function, which will call GAPBondMgr_SetParameter on every GAP Bond parameters with the default parameters that were specified in SysConfig.

    Calling GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t), GAPBOND_IO_CAP_DISPLAY_YES_NO); after calling SimplePeripheral_init should be able to update the IO capabilities. Can you try to call this function after calling SimplePeripheral_init and see what it returns ? The odds of this function causing a hard fault are very low because it just writes to a static int called "gapBond_IOCap" in C:\ti\simplelink_cc13xx_cc26xx_sdk_8_31_00_11\source\ti\ble5stack\host\gapbondmgr.c

    Do note that updating the IO capabilities will only affect new connections/authentications. the "gapBond_IOCap" is only used in the "gapBondMgrAuthenticate" function, which only triggers for a new authentication.

    Kind regards,
    Lea

  • Hi,
    I initially tried calling this function after SimplePeripheral_init(), but it consistently resulted in a hard fault because it was being invoked from the application context. After moving the GAPBondMgr function call to the ICall BLE Stack context, the issue was resolved and it worked as expected.
    Since SimplePeripheral_init() is executed only once during startup and handles most of the Bluetooth stack initialization, could you please provide guidance on which BLE/GAPBondMgr parameters can be modified dynamically at runtime and which parameters must be be configured during initialization only in simple peripheral_init?
    I have a requirement to update certain parameters dynamically during operation, so understanding these limitations and recommendations would be very helpful.
    Thank you.

  • Hi !

    All parameters from the link that you have shared in "TI BLE5-Stack API Documentation: GAP Bond Manager Parameters" can be changed at run-time. I don't have an exhaustive list of what is applied in the middle of the connection, and what is applied only when the connection is formed or the bonding is done, but you can check for yourself by opening the SDK in VSCode and looking for where the relevant variables are used.

    If you're not able to find where your specific parameter is applied because it's applied in the controller only, you can give me the list of parameters you were not able to figure out and I can try to give you more insight.

    Kind regards,
    Lea