On Wed, Jun 13, 2018, Li, Jun R wrote:
In my BLE project, a passkey is required to access the NRF51 device;The second one is a bit ambiguous, since it'll also be called for
subsequent connections when the connection gets encrypted, even though
pairing is not in progress (it already happened over some earlier
However, my application was NOT notified if a wrong passkey wasThis seems to be an oversight in the API. I'd propose to add two new
entries to bt_conn_auth_cb, something like the following:
void (*pairing_complete)(struct bt_conn *conn, bool bonded);
void (*pairing_failed)(struct bt_conn *conn);
For the second one we might want to add another parameter for the
reason. An SMP error comes to mind, but then that wont be reusable for
BR/EDR (which we have experimental support for).
Actually, now that I think about it, bt_conn_auth_cb could be
problematic since it's possible to do just-works pairing without
registering such a structure. I wonder if our bt_conn_cb would be
better. That said, these callbacks are strictly about pairing..
Could you open a github issue to track this, so we get it done for 1.13?