Bluetooth: test: Delay SMP pairing distribution phase when testing
Avoid the HCI-USB race condition where HCI data and HCI events can be re-ordered, and pairing information appears to be sent unencrypted. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
62c1e1a52b
commit
9ab17a3eb4
1 changed files with 8 additions and 0 deletions
|
@ -4356,6 +4356,14 @@ static void bt_smp_encrypt_change(struct bt_l2cap_chan *chan,
|
|||
return;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_TESTING)) {
|
||||
/* Avoid the HCI-USB race condition where HCI data and
|
||||
* HCI events can be re-ordered, and pairing information appears
|
||||
* to be sent unencrypted.
|
||||
*/
|
||||
k_sleep(K_MSEC(100));
|
||||
}
|
||||
|
||||
if (bt_smp_distribute_keys(smp)) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue