diff --git a/components/bluetooth/ble_conn_mgr/CHANGELOG.md b/components/bluetooth/ble_conn_mgr/CHANGELOG.md index 57ea02a92..6b9056d58 100644 --- a/components/bluetooth/ble_conn_mgr/CHANGELOG.md +++ b/components/bluetooth/ble_conn_mgr/CHANGELOG.md @@ -1,3 +1,9 @@ +## v0.1.2 - 2024-5-22 + +### Bug Fixes: + +- Fix esp_ble_conn_mgr not report disconnect event + ## v0.1.1 - 2023-6-12 ### Bug Fixes: diff --git a/components/bluetooth/ble_conn_mgr/idf_component.yml b/components/bluetooth/ble_conn_mgr/idf_component.yml index 67726e30d..2675025b7 100644 --- a/components/bluetooth/ble_conn_mgr/idf_component.yml +++ b/components/bluetooth/ble_conn_mgr/idf_component.yml @@ -1,4 +1,4 @@ -version: "0.1.1" +version: "0.1.2" description: A common layer to manage the BLE connection, support both Bluedroid and Nimble url: https://github.com/espressif/esp-iot-solution/tree/master/components/bluetooth/ble_conn_mgr dependencies: diff --git a/components/bluetooth/ble_conn_mgr/src/esp_nimble.c b/components/bluetooth/ble_conn_mgr/src/esp_nimble.c index 328666b3b..b6b520651 100644 --- a/components/bluetooth/ble_conn_mgr/src/esp_nimble.c +++ b/components/bluetooth/ble_conn_mgr/src/esp_nimble.c @@ -1801,6 +1801,7 @@ static void esp_ble_conn_disconnect_cb(struct ble_gap_event *event, void *arg) conn_session->conn_handle = 0; esp_ble_conn_event_send(conn_session, ESP_BLE_CONN_EVENT_DISCONNECTED, NULL, 0, NULL); + esp_event_post(BLE_CONN_MGR_EVENTS, ESP_BLE_CONN_EVENT_DISCONNECTED, NULL, 0, portMAX_DELAY); } static void esp_ble_conn_set_mtu_cb(struct ble_gap_event *event, void *arg) diff --git a/examples/bluetooth/ble_conn_mgr/ble_spp/spp_server/main/app_main.c b/examples/bluetooth/ble_conn_mgr/ble_spp/spp_server/main/app_main.c index 30648cd4d..ef582bd37 100644 --- a/examples/bluetooth/ble_conn_mgr/ble_spp/spp_server/main/app_main.c +++ b/examples/bluetooth/ble_conn_mgr/ble_spp/spp_server/main/app_main.c @@ -90,6 +90,7 @@ static void app_ble_conn_event_handler(void *handler_args, esp_event_base_t base break; case ESP_BLE_CONN_EVENT_DISCONNECTED: ESP_LOGI(TAG, "ESP_BLE_CONN_EVENT_DISCONNECTED\n"); + connection_handle[0] = 0; break; default: break;