This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

HOW TO CHECK OR READ THE LIST OF BONDED DEVICE FROM NRF52832

Hi,

  •      Our project is 2D-3D mouse. we are using nordic  "ble_hid_mouse" application with some required changes for our application.
  •      SDK we are using is 15.3

ISSUES

The problem we are facing .If we connected our mouse(peripheral) and with a pc (central) you known that bonding information of mouse will store on pc and vise versa . 

Suppose if we remove the our device (mouse)  from the pc device  list .Bonding information from  pc(central side) will delete. So if we try to connect the our device(peripheral) again to the same pc  driver error will shown and the connection will not establish .These is because our device contains the bonding information of pc but pc has not. If we delete the bond information from our device too then there is no issue.

In the nordic nrf-Mouse there method for deleting the bond information from nrf52832 side is by pressing a button manually . But in our case its not applicable .We need to delete the bond information from nrf52832 side automatically if the central delete the bond .

So we find-out a solution for these by referring https://devzone.nordicsemi.com/f/nordic-q-a/9506/bond-deletion-notification  this nordic ticket. Please look the marked portion of screen shot 

we are following the first scenario.

So based on these ticket .After the central(pc) and peripheral( our mouse) connected and also if the central sends pairing  request  and the peripheral application receive the BLE_GAP_EVT_SEC_PARAMS_REQUEST event  we  deleting the bonding information from  nrf52832.Look the screen shot below.

It is an effective way but it showing some issue if we connected on multiple pc without removing it.

WE NEED

In the above code(screen shot) before deleting the bond information we need to  check list of bonded device in peripheral(nrf52832) and if the central address is already present  in bonded device list then only we need to delete the specific bond from nrf52832 .

Is there any way for thsese.

Which function is used to the list of the read address bonded device from nrf52832.

which are the function to get the address of the central device.

Please reply as soon as possible.

  • please reply as soon as possible.

  • Hi Nandhu,

    Please disregard the information you have been looking at before, as that is both outdated and irrelevant for what you want to achieve. The Peer manager library, which is responsible for handling bonding information in SDK 15.3, has support for the functionality you want. You can allow the nRF to bond again with a peer that has deleted the bonding information by adding the following case to the handling of peer manager events in your application (typically in a function called pm_evt_handler() in SDK examples).

            case PM_EVT_CONN_SEC_CONFIG_REQ:
            {
                // Allow pairing request from an already bonded peer.
                pm_conn_sec_config_t conn_sec_config = {.allow_repairing = true};
                pm_conn_sec_config_reply(p_evt->conn_handle, &conn_sec_config);
            } break;

    This is all you need to change since everything is handled for you by the peer manager.

    Br,

    Einar

  • THANKS EINAR  ITS WORKING FINE NOW

Related