Loading system/bta/gatt/bta_gattc_act.cc +20 −0 Original line number Diff line number Diff line Loading @@ -768,6 +768,26 @@ void bta_gattc_start_discover(tBTA_GATTC_CLCB* p_clcb, p_clcb->p_srcb->update_count = 0; p_clcb->p_srcb->state = BTA_GATTC_SERV_DISC_ACT; /* This is workaround for the embedded devices being already on the market * and having a serious problem with handle Read By Type with * GATT_UUID_DATABASE_HASH. With this workaround, Android will assume that * embedded device having LMP version lower than 5.1 (0x0a), it does not * support GATT Caching. */ uint8_t lmp_version = 0; if (!BTM_ReadRemoteVersion(p_clcb->bda, &lmp_version, nullptr, nullptr)) { LOG_WARN("Could not read remote version for %s", p_clcb->bda.ToString().c_str()); } if (lmp_version < 0x0a) { LOG_WARN( " Device LMP version 0x%02x < Bluetooth 5.1. Ignore database cache " "read.", lmp_version); p_clcb->p_srcb->srvc_hdl_db_hash = false; } /* read db hash if db hash characteristic exists */ if (bta_gattc_is_robust_caching_enabled() && p_clcb->p_srcb->srvc_hdl_db_hash && Loading Loading
system/bta/gatt/bta_gattc_act.cc +20 −0 Original line number Diff line number Diff line Loading @@ -768,6 +768,26 @@ void bta_gattc_start_discover(tBTA_GATTC_CLCB* p_clcb, p_clcb->p_srcb->update_count = 0; p_clcb->p_srcb->state = BTA_GATTC_SERV_DISC_ACT; /* This is workaround for the embedded devices being already on the market * and having a serious problem with handle Read By Type with * GATT_UUID_DATABASE_HASH. With this workaround, Android will assume that * embedded device having LMP version lower than 5.1 (0x0a), it does not * support GATT Caching. */ uint8_t lmp_version = 0; if (!BTM_ReadRemoteVersion(p_clcb->bda, &lmp_version, nullptr, nullptr)) { LOG_WARN("Could not read remote version for %s", p_clcb->bda.ToString().c_str()); } if (lmp_version < 0x0a) { LOG_WARN( " Device LMP version 0x%02x < Bluetooth 5.1. Ignore database cache " "read.", lmp_version); p_clcb->p_srcb->srvc_hdl_db_hash = false; } /* read db hash if db hash characteristic exists */ if (bta_gattc_is_robust_caching_enabled() && p_clcb->p_srcb->srvc_hdl_db_hash && Loading