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

bond question with Peer Manager

I use example ble_app_hrs_pca10040_s132 with SDK12.2.0 to test bonding function.It works as a server and it is bound by client. But I fail to bond. It seems that example has peer manager and also has bond function.

So do I have to do some modification on this example to test bonding function? If yes, what should I do?

Thanks a lot!

  • ble_app_hrs supports bonding. Could you explain a bit more? What kind of central device are you using? How are you bonding? What is failing?

  • I use bluegiga usb dongle as client to bond nrf52832. When connecting, I use blugiga to bond nrf52832. After bonding, I disconnect the two device,. But I find another BLE module(not bulegiga I use) can also connect it. Actually when nrf52832 is bound, only the bulegiga I use can connect nrf52832. So I think bond fail. With debuging, I find event from stack in the function "pm_evt_handler". Both PM_EVT_CONN_SEC_START and PM_EVT_CONN_SEC_SUCCEEDED case are excuted. So I am confused if I should do some modification.
    Thanks a lot!

  • The ble_app_hrs example can be bond with RN4020 BLE module which as a client to send command to build bond with nrf module. But when I disconnect RN4020 and nrf52832, I find nrf52832 can also be connected with other BLE Modules like bulegiga. So I hope to check: If nrf52832 is bound, can it be connected with ohter BLE modules except the module who bond it? It seems that when module is bound, it can only build connection between the two bonding modules.Others can not connect it.
    Am I right? Looking forward to your reply. Thanks a lot!

  • It seems you are mixing up bonding with whitelisting. Even if a device has a bond with another device it can connect with other devices.

    But if you are a peripheral and advertise with a whitelist, you can put the address of a bonded peer into the whitelist, and then only accept connection requests from the specific peer.

    ble_app_hrs supports bonding, but doesn't implement whitelisting, for that you can have a look at the ble_app_hids_keyboard or ble_app_hids_mouse examples.

  • Yes,you are right.I made a mistake and ble_app_hrs supports bonding. I have tested ble_app_hids_keyboard for using whitelist.I find that this example is bond+whitelist. If bonded, the peer address will be added into whitelist. But when I disconnect, it will broadcast whitelist so that the other Ble Modules cannot connect it because it is not in the whitelist.Only the bonded one can connect it. So how can I add another BLE address into whitelist? I think BLE module address should be set into whitelist in the softdevice before advertising. Thanks a lot!

Related