mirror of
https://github.com/esphome/esphome.git
synced 2026-02-25 21:43:14 -07:00
3ae32423629beeb4d56fd297e71c32907682fdb8
ESP_GATTC_DISCONNECT_EVT only indicates that the link-layer disconnection has started, not that the controller has fully freed resources (L2CAP channels, ATT resources, HCI connection handle). Transitioning to IDLE immediately allowed reconnection attempts before cleanup was complete, causing the controller to reject new connections with status=133 (ESP_GATT_CONN_FAIL_ESTABLISH) or crash with ASSERT_PARAM in lld_evt.c. This applies the same fix that was made for bluetooth_proxy in #10303 to the base BLEClientBase class, which is used by the ble_client component. Changes: - DISCONNECT_EVT now transitions to DISCONNECTING instead of IDLE - CLOSE_EVT (already existing) handles the final IDLE transition - connect() now blocks while in DISCONNECTING state - OPEN_EVT ignores events received during DISCONNECTING state
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
488 MiB
Languages
C++
64.1%
Python
35.6%
C
0.2%
