Use case: Test the paring scenario with remote device with security mode 3.
STR:
1. Create a connection from Remove dev with Security Mode-3 to DUT.
2. Enter pin key in remote, when pin key pop-up comes in DUT, reject the same.
3. Try to create connection from DUT to Remote dev-2, within 30 seconds.
Failure: Create connection not sent from DUT to remote, even though
there was no pairing taking place
Root cause: As the pairing state is not reset properly it disturbs
the next pairing process.
Reproducible using MecApp test application.
Fix: Reset the pairing state to idle in case stored paring
device matches with the device for which the pairing
failure happened.
Bug:
21896912
Change-Id: I0a9e143a44bb2ae7e296d7d76c1323e517f9cc42
}
else
{
+ /* If the device matches with stored paring address
+ * reset the paring state to idle */
+ if ((btm_cb.pairing_state != BTM_PAIR_STATE_IDLE) &&
+ (memcmp (btm_cb.pairing_bda, bda, BD_ADDR_LEN) == 0))
+ {
+ btm_sec_change_pairing_state(BTM_PAIR_STATE_IDLE);
+ }
+
/* can not find the device record and the status is error,
* just ignore it */
return;