Peripheral: Nordic nRF52840 chipset with Zephyr
Central: Android smartphone
Bond is created and "pairing_complete" callback is called in peripheral. But when manually delete the bonding(from Bluetooth > [peripheral device]Unpair), how can the peripheral gets a notification?
BT_CONN_CB_DEFINE(conn_callbacks) = {
.connected = connected,
.disconnected = disconnected,
};
struct bt_conn_auth_cb cb = {
.cancel = cancel,
.oob_data_request = NULL,
.pairing_confirm = NULL,
.passkey_confirm = pass_confirm,
.passkey_display = pass_display,
.passkey_entry = NULL,
};
bt_conn_auth_cb_register(&cb);
struct bt_conn_auth_info_cb info_cb = {
.bond_deleted = bond_deleted, // ------> not getting called when central deletes the pairing
.pairing_complete = pairing_complete,
.pairing_failed = pairing_failed,
};
bt_conn_auth_info_cb_register(&info_cb);
The callbacks are implemented as usual. My question is, when user deletes the bonding(unpair) from smartphone:
- Why the peripheral not getting notification in "bond_deleted' callback?
- Is there any other way to get this notification?
- Or is this BLE concept?
- FYI:
- "disconnected" callback is getting called
- After disconnection, if I connect from another central, peripheral gets the "bond_deleted" called before bonded