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.

CC2340R5: How to erase a specific bond (by MAC address) instead of all bonds?

Part Number: CC2340R5


Tool/software:

Hi Forum,

I understand that we can erase all bonding information using the following API: GAPBondMgr_SetParameter(GAPBOND_ERASE_ALLBONDS, NULL, NULL)

However, my requirement is to delete only one specific bond, given the device’s MAC address (BD_ADDR). Is there a way to do this using the GAP Bond Manager, or any workaround?

I don’t want to remove all bonds—just the one associated with a particular MAC.
Is there any API like GAPBondMgr_RemoveBond() or another recommended method to achieve this?

Thanks in advance!

Regards,
Vaibhav

  • Hello Vaibhav,

    Thank you for reaching out! I believe what you're looking for is the GAPBOND_ERASE_SINGLEBOND. It should be the parameter used inside GAPBondMgr_SetParameter().

    I hope this answers your question!

    Best Regards,

    Tarek D

  • Hi Tarek,

    Thanks for reply, i was looking to erase a particular bond using MAC. May i know if i use "GAPBOND_ERASE_SINGLEBOND" flag, which bond will erase in bond table? i mean to ask, say i have 3 device in my bond list, so which one will erase if i use above flag?

    And is there any work around for reading all bond entries and deleting particular bond info manually?

    Regards

    Vaibhav

  • Hello Vaibhav,

    To delete the particular bond, you would need to use the GAPBondMgr_SetParameter() API, and pass into it the macro GAPBOND_ERASE_SINGLEBOND, followed by the size (7 Bytes), followed by the pointer which points to address type followed by a 6 byte address, which will be the MAC address. Please use the links I provided earlier as reference.

    I hope this answers your question! Please let me know if you still need help with implementing this.

    Best Regards,

    Tarek D