mirror of
https://github.com/esphome/esphome.git
synced 2025-11-18 07:45:56 +00:00
[ble_client] Fix premature disconnections by reading characteristics immediately after service discovery (#11410)
This commit is contained in:
@@ -77,6 +77,9 @@ void BLESensor::gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t ga
|
||||
}
|
||||
} else {
|
||||
this->node_state = espbt::ClientState::ESTABLISHED;
|
||||
// For non-notify characteristics, trigger an immediate read after service discovery
|
||||
// to avoid peripherals disconnecting due to inactivity
|
||||
this->update();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user