Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5326a73 authored by Srinu Jella's avatar Srinu Jella Committed by Andre Eisenbach
Browse files

Reset the pairing state on pairing failure

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
parent fcc7e11c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -4452,6 +4452,14 @@ void btm_sec_connected (UINT8 *bda, UINT16 handle, UINT8 status, UINT8 enc_mode)
        }
        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;