Loading system/stack/btm/btm_dev.cc +1 −0 Original line number Diff line number Diff line Loading @@ -530,6 +530,7 @@ tBTM_SEC_DEV_REC* btm_sec_allocate_dev_rec(void) { p_dev_rec->sec_flags = BTM_SEC_IN_USE; p_dev_rec->bond_type = BOND_TYPE_UNKNOWN; p_dev_rec->timestamp = btm_cb.dev_rec_count++; p_dev_rec->rmt_io_caps = BTM_IO_CAP_UNKNOWN; return p_dev_rec; } Loading system/stack/btm/btm_sec.cc +12 −3 Original line number Diff line number Diff line Loading @@ -3539,18 +3539,28 @@ void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p) { /* The device record must be allocated in the "IO cap exchange" step */ STREAM_TO_UINT32(evt_data.cfm_req.num_val, p); BTM_TRACE_DEBUG("BTM_SP_CFM_REQ_EVT: num_val: %u", evt_data.cfm_req.num_val); evt_data.cfm_req.just_works = true; /* process user confirm req in association with the auth_req param */ #if (BTM_LOCAL_IO_CAPS == BTM_IO_CAP_IO) if (p_dev_rec->rmt_io_caps == BTM_IO_CAP_UNKNOWN) { BTM_TRACE_ERROR( "%s did not receive IO cap response prior" " to BTM_SP_CFM_REQ_EVT, failing pairing request", __func__); status = BTM_WRONG_MODE; BTM_ConfirmReqReply(status, p_bda); return; } if ((p_dev_rec->rmt_io_caps == BTM_IO_CAP_IO) && (btm_cb.devcb.loc_io_caps == BTM_IO_CAP_IO) && ((p_dev_rec->rmt_auth_req & BTM_AUTH_SP_YES) || (btm_cb.devcb.loc_auth_req & BTM_AUTH_SP_YES))) { /* Both devices are DisplayYesNo and one or both devices want to authenticate -> use authenticated link key */ authenticate -> use authenticated link key */ evt_data.cfm_req.just_works = false; } #endif Loading @@ -3570,7 +3580,6 @@ void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p) { case BTM_SP_KEY_NOTIF_EVT: /* Passkey notification (other side is a keyboard) */ STREAM_TO_UINT32(evt_data.key_notif.passkey, p); BTM_TRACE_DEBUG("BTM_SP_KEY_NOTIF_EVT: passkey: %u", evt_data.key_notif.passkey); Loading system/stack/include/btm_api_types.h +1 −0 Original line number Diff line number Diff line Loading @@ -1402,6 +1402,7 @@ typedef uint8_t tBTM_SP_EVT; #define BTM_IO_CAP_NONE 3 /* NoInputNoOutput */ #define BTM_IO_CAP_KBDISP 4 /* Keyboard display */ #define BTM_IO_CAP_MAX 5 #define BTM_IO_CAP_UNKNOWN 0xFF /* Unknown value */ typedef uint8_t tBTM_IO_CAP; Loading Loading
system/stack/btm/btm_dev.cc +1 −0 Original line number Diff line number Diff line Loading @@ -530,6 +530,7 @@ tBTM_SEC_DEV_REC* btm_sec_allocate_dev_rec(void) { p_dev_rec->sec_flags = BTM_SEC_IN_USE; p_dev_rec->bond_type = BOND_TYPE_UNKNOWN; p_dev_rec->timestamp = btm_cb.dev_rec_count++; p_dev_rec->rmt_io_caps = BTM_IO_CAP_UNKNOWN; return p_dev_rec; } Loading
system/stack/btm/btm_sec.cc +12 −3 Original line number Diff line number Diff line Loading @@ -3539,18 +3539,28 @@ void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p) { /* The device record must be allocated in the "IO cap exchange" step */ STREAM_TO_UINT32(evt_data.cfm_req.num_val, p); BTM_TRACE_DEBUG("BTM_SP_CFM_REQ_EVT: num_val: %u", evt_data.cfm_req.num_val); evt_data.cfm_req.just_works = true; /* process user confirm req in association with the auth_req param */ #if (BTM_LOCAL_IO_CAPS == BTM_IO_CAP_IO) if (p_dev_rec->rmt_io_caps == BTM_IO_CAP_UNKNOWN) { BTM_TRACE_ERROR( "%s did not receive IO cap response prior" " to BTM_SP_CFM_REQ_EVT, failing pairing request", __func__); status = BTM_WRONG_MODE; BTM_ConfirmReqReply(status, p_bda); return; } if ((p_dev_rec->rmt_io_caps == BTM_IO_CAP_IO) && (btm_cb.devcb.loc_io_caps == BTM_IO_CAP_IO) && ((p_dev_rec->rmt_auth_req & BTM_AUTH_SP_YES) || (btm_cb.devcb.loc_auth_req & BTM_AUTH_SP_YES))) { /* Both devices are DisplayYesNo and one or both devices want to authenticate -> use authenticated link key */ authenticate -> use authenticated link key */ evt_data.cfm_req.just_works = false; } #endif Loading @@ -3570,7 +3580,6 @@ void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p) { case BTM_SP_KEY_NOTIF_EVT: /* Passkey notification (other side is a keyboard) */ STREAM_TO_UINT32(evt_data.key_notif.passkey, p); BTM_TRACE_DEBUG("BTM_SP_KEY_NOTIF_EVT: passkey: %u", evt_data.key_notif.passkey); Loading
system/stack/include/btm_api_types.h +1 −0 Original line number Diff line number Diff line Loading @@ -1402,6 +1402,7 @@ typedef uint8_t tBTM_SP_EVT; #define BTM_IO_CAP_NONE 3 /* NoInputNoOutput */ #define BTM_IO_CAP_KBDISP 4 /* Keyboard display */ #define BTM_IO_CAP_MAX 5 #define BTM_IO_CAP_UNKNOWN 0xFF /* Unknown value */ typedef uint8_t tBTM_IO_CAP; Loading