How to delete BLE bonded/paired information from NRF Connect SDK 1.5.1

Hello,

I am using NRF connect SDK v1.5.1.  I want to delete the last paired and all paired from central and peripheral also.

I found thatpm_peer_delete() & pm_peers_delete() in old tickets at devzone but there api's are not there in NCS v1.5.1

Please let me know how can I do that?

Regards,

SC

Parents Reply
  • Sorry for the late reply,

    I found this function in bluetooth.h:

    /**
     * @brief Clear pairing information.
     *
     * @param id    Local identity (mostly just BT_ID_DEFAULT).
     * @param addr  Remote address, NULL or BT_ADDR_LE_ANY to clear all remote
     *              devices.
     *
     * @return 0 on success or negative error value on failure.
     */
    int bt_unpair(uint8_t id, const bt_addr_le_t *addr);

    It will disconnect the link if connected, delete the keys, and delete the connection reference. 

Children
Related