Skip to content

Commit 545938e

Browse files
jori-nordicnashif
authored andcommitted
Bluetooth: host: Accept keypress notifications as responder
Ignore peer keypress notifications as a responder, allowing the pairing procedure to continue instead of being aborted. The Bluetooth LE specification does not specify a behavior, the implementation has the choice of ignoring or aborting. Signed-off-by: Jonathan Rico <[email protected]>
1 parent 777718e commit 545938e

File tree

1 file changed

+3
-0
lines changed
  • subsys/bluetooth/host

1 file changed

+3
-0
lines changed

subsys/bluetooth/host/smp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2411,6 +2411,7 @@ static uint8_t legacy_pairing_req(struct bt_smp *smp)
24112411
}
24122412

24132413
atomic_set_bit(smp->allowed_cmds, BT_SMP_CMD_PAIRING_CONFIRM);
2414+
atomic_set_bit(smp->allowed_cmds, BT_SMP_KEYPRESS_NOTIFICATION);
24142415
return send_pairing_rsp(smp);
24152416
}
24162417
#endif /* CONFIG_BT_PERIPHERAL */
@@ -4142,9 +4143,11 @@ static uint8_t smp_public_key_slave(struct bt_smp *smp)
41424143
}
41434144

41444145
atomic_set_bit(smp->allowed_cmds, BT_SMP_CMD_PAIRING_CONFIRM);
4146+
atomic_set_bit(smp->allowed_cmds, BT_SMP_KEYPRESS_NOTIFICATION);
41454147
break;
41464148
case PASSKEY_INPUT:
41474149
atomic_set_bit(smp->allowed_cmds, BT_SMP_CMD_PAIRING_CONFIRM);
4150+
atomic_set_bit(smp->allowed_cmds, BT_SMP_KEYPRESS_NOTIFICATION);
41484151
atomic_set_bit(smp->flags, SMP_FLAG_USER);
41494152
bt_auth->passkey_entry(smp->chan.chan.conn);
41504153
break;

0 commit comments

Comments
 (0)