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

BLE automatic connection to other BLE device

Hello

I'm using multiple nRF52840-dk (SDK17.1.0, Windows, Segger, S140).  

I'm trying to make BLE device(nRF52840-dk) that automatically connects to specific BLE device(nRF52840-dk) whenever it turns on without connecting to other devices.

Is there any great example/tutorial for this case?

After some search, in ble_app_hrs example I discovered that peer_manager_init() provides pairing and bonding, but I don't know how to utilize it. Can you tell me how to use it?

PS, Does pairing/bonding save anything else beside encryption key? Where/ which variable is the key saved at?

PSS I did found filter, but the central device will connect to any other peripheral

  • It will do so by default. If it doesn't have any devices in the whitelist, it will advertise without the whitelist, accepting any connections. When bonded, it will add the device in the whitelist. The next time it starts advertising scanning, it will use the whitelist unless you specify it to not do so, which means it will only connect to the device in the whitelist. 

    Best regards,

    Edvin

Related