Bluetooth: host: Pairing callback fail and complete for SSP
Proved the Authentication callback for pairing failed and pairing complete when BR/EDR SSP is complete. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
1fb68828ef
commit
3263f93747
3 changed files with 39 additions and 0 deletions
|
@ -744,6 +744,21 @@ static int ssp_confirm_neg_reply(struct bt_conn *conn)
|
|||
NULL);
|
||||
}
|
||||
|
||||
void bt_conn_ssp_auth_complete(struct bt_conn *conn, u8_t status)
|
||||
{
|
||||
if (!status) {
|
||||
bool bond = !atomic_test_bit(conn->flags, BT_CONN_BR_NOBOND);
|
||||
|
||||
if (bt_auth && bt_auth->pairing_complete) {
|
||||
bt_auth->pairing_complete(conn, bond);
|
||||
}
|
||||
} else {
|
||||
if (bt_auth && bt_auth->pairing_failed) {
|
||||
bt_auth->pairing_failed(conn, status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void bt_conn_ssp_auth(struct bt_conn *conn, u32_t passkey)
|
||||
{
|
||||
conn->br.pairing_method = ssp_pair_method(conn);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue