mirror of
https://github.com/esphome/esphome.git
synced 2025-10-22 11:43:51 +01:00
[bluetooth_proxy] Batch BLE service discovery messages for 67% reduction in API traffic
This commit is contained in:
@@ -93,12 +93,8 @@ void BluetoothConnection::send_service_for_discovery_() {
|
|||||||
ESP_LOGE(TAG, "[%d] [%s] esp_ble_gattc_get_service %s, status=%d, service_count=%d, offset=%d",
|
ESP_LOGE(TAG, "[%d] [%s] esp_ble_gattc_get_service %s, status=%d, service_count=%d, offset=%d",
|
||||||
this->connection_index_, this->address_str().c_str(),
|
this->connection_index_, this->address_str().c_str(),
|
||||||
service_status != ESP_GATT_OK ? "error" : "missing", service_status, service_count, this->send_service_);
|
service_status != ESP_GATT_OK ? "error" : "missing", service_status, service_count, this->send_service_);
|
||||||
// If first service fails, return. If second fails, send what we have.
|
|
||||||
if (services_processed == 0) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->send_service_++;
|
this->send_service_++;
|
||||||
resp.services.emplace_back();
|
resp.services.emplace_back();
|
||||||
|
Reference in New Issue
Block a user