h2zero / NimBLE-Arduino

A fork of the NimBLE library structured for compilation with Arduino, for use with ESP32, nRF5x.
https://h2zero.github.io/NimBLE-Arduino/
Apache License 2.0
670 stars 138 forks source link

How does bonding work? #602

Closed shooshx closed 7 months ago

shooshx commented 8 months ago

Bonding seem to be undocumented at all.

I'd like to be able to pair a device (a remote control) with my ESP32 and then have this device be able to just work after a reboot without having to trigger the advertise on the remote. When does the bonding data saved? How can it be used to replace the scanning functionality?

h2zero commented 8 months ago

Bonding is for saving the credentials so that the pin etc does not need to be entered again. There is no way to avoid advertising as the stack would not be listening for connections otherwise.

shooshx commented 7 months ago

Thank you