Skip to content

Commit

Permalink
fix:esp_ble_conn_mgr no disconnect event
Browse files Browse the repository at this point in the history
fixed #362
  • Loading branch information
loop233 committed May 22, 2024
1 parent d7b0715 commit 4dd6f15
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions components/bluetooth/ble_conn_mgr/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion components/bluetooth/ble_conn_mgr/idf_component.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
1 change: 1 addition & 0 deletions components/bluetooth/ble_conn_mgr/src/esp_nimble.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4dd6f15

Please sign in to comment.