Bluetooth: Add support for confirming incoming JustWorks pairing
If incoming pairing request would result in JustWorks pairing this can be used to request consent from user for accepting it. Change-Id: If0695d0e1bb010bade6a16abe1b57a2ce07856cc Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
parent
931afc81a4
commit
c2a1ac8ae7
5 changed files with 153 additions and 13 deletions
|
@ -315,6 +315,7 @@ struct bt_conn_auth_cb {
|
|||
void (*passkey_entry)(struct bt_conn *conn);
|
||||
void (*passkey_confirm)(struct bt_conn *conn, unsigned int passkey);
|
||||
void (*cancel)(struct bt_conn *conn);
|
||||
void (*pairing_confirm)(struct bt_conn *conn);
|
||||
#if defined(CONFIG_BLUETOOTH_BREDR)
|
||||
void (*pincode_entry)(struct bt_conn *conn, bool highsec);
|
||||
#endif
|
||||
|
@ -364,6 +365,17 @@ int bt_conn_auth_cancel(struct bt_conn *conn);
|
|||
*/
|
||||
int bt_conn_auth_passkey_confirm(struct bt_conn *conn);
|
||||
|
||||
/** @brief Reply if incoming pairing was confirmed by user.
|
||||
*
|
||||
* This function should be called only after pairing_confirm callback from
|
||||
* bt_conn_auth_cb structure was called if user confirmed incoming pairing.
|
||||
*
|
||||
* @param conn Connection object.
|
||||
*
|
||||
* @return Zero on success or negative error code otherwise
|
||||
*/
|
||||
int bt_conn_auth_pairing_confirm(struct bt_conn *conn);
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_BREDR)
|
||||
/** @brief Reply with entered PIN code.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue