Loading system/stack/btm/btm_ble.cc +14 −3 Original line number Diff line number Diff line Loading @@ -1533,10 +1533,21 @@ void btm_ble_link_encrypted(const RawAddress& bd_addr, uint8_t encr_enable) { } if (encr_enable) { /* Link is encrypted, start EATT */ uint8_t remote_lmp_version = 0; if (!BTM_ReadRemoteVersion(p_dev_rec->ble.pseudo_addr, &remote_lmp_version, nullptr, nullptr) || remote_lmp_version == 0) { LOG_WARN("BLE Unable to determine remote version"); } if (remote_lmp_version == 0 || remote_lmp_version >= HCI_PROTO_VERSION_5_2) { /* Link is encrypted, start EATT if remote LMP version is unknown, or 5.2 * or greater */ bluetooth::eatt::EattExtension::GetInstance()->Connect( p_dev_rec->ble.pseudo_addr); } } /* to notify GATT to send data if any request is pending */ gatt_notify_enc_cmpl(p_dev_rec->ble.pseudo_addr); Loading system/stack/include/hcidefs.h +1 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #define HCI_PROTO_VERSION_4_1 0x07 /* Version for BT spec 4.1 */ #define HCI_PROTO_VERSION_4_2 0x08 /* Version for BT spec 4.2 */ #define HCI_PROTO_VERSION_5_0 0x09 /* Version for BT spec 5.0 */ #define HCI_PROTO_VERSION_5_2 0x0B /* Version for BT spec 5.2 */ /* * Definitions for HCI groups Loading Loading
system/stack/btm/btm_ble.cc +14 −3 Original line number Diff line number Diff line Loading @@ -1533,10 +1533,21 @@ void btm_ble_link_encrypted(const RawAddress& bd_addr, uint8_t encr_enable) { } if (encr_enable) { /* Link is encrypted, start EATT */ uint8_t remote_lmp_version = 0; if (!BTM_ReadRemoteVersion(p_dev_rec->ble.pseudo_addr, &remote_lmp_version, nullptr, nullptr) || remote_lmp_version == 0) { LOG_WARN("BLE Unable to determine remote version"); } if (remote_lmp_version == 0 || remote_lmp_version >= HCI_PROTO_VERSION_5_2) { /* Link is encrypted, start EATT if remote LMP version is unknown, or 5.2 * or greater */ bluetooth::eatt::EattExtension::GetInstance()->Connect( p_dev_rec->ble.pseudo_addr); } } /* to notify GATT to send data if any request is pending */ gatt_notify_enc_cmpl(p_dev_rec->ble.pseudo_addr); Loading
system/stack/include/hcidefs.h +1 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #define HCI_PROTO_VERSION_4_1 0x07 /* Version for BT spec 4.1 */ #define HCI_PROTO_VERSION_4_2 0x08 /* Version for BT spec 4.2 */ #define HCI_PROTO_VERSION_5_0 0x09 /* Version for BT spec 5.0 */ #define HCI_PROTO_VERSION_5_2 0x0B /* Version for BT spec 5.2 */ /* * Definitions for HCI groups Loading