mirror of
https://github.com/esphome/esphome.git
synced 2025-11-19 08:15:49 +00:00
[esp32_ble] Wake main loop for GAP security events (#11677)
This commit is contained in:
@@ -581,9 +581,17 @@ void ESP32BLE::gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_pa
|
|||||||
GAP_ADV_COMPLETE_EVENTS:
|
GAP_ADV_COMPLETE_EVENTS:
|
||||||
// Connection events - used by ble_client
|
// Connection events - used by ble_client
|
||||||
case ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT:
|
case ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT:
|
||||||
|
enqueue_ble_event(event, param);
|
||||||
|
return;
|
||||||
|
|
||||||
// Security events - used by ble_client and bluetooth_proxy
|
// Security events - used by ble_client and bluetooth_proxy
|
||||||
|
// These are rare but interactive (pairing/bonding), so notify immediately
|
||||||
GAP_SECURITY_EVENTS:
|
GAP_SECURITY_EVENTS:
|
||||||
enqueue_ble_event(event, param);
|
enqueue_ble_event(event, param);
|
||||||
|
// Wake up main loop to process security event immediately
|
||||||
|
#ifdef USE_SOCKET_SELECT_SUPPORT
|
||||||
|
global_ble->notify_main_loop_();
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Ignore these GAP events as they are not relevant for our use case
|
// Ignore these GAP events as they are not relevant for our use case
|
||||||
|
|||||||
Reference in New Issue
Block a user