Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp_ble_conn_mgr no disconnect event (AEGHB-663) #362

Closed
3 tasks done
AlejandroHuerta opened this issue May 22, 2024 · 1 comment
Closed
3 tasks done

esp_ble_conn_mgr no disconnect event (AEGHB-663) #362

AlejandroHuerta opened this issue May 22, 2024 · 1 comment

Comments

@AlejandroHuerta
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

5.2.1

Espressif SoC revision.

esp32-c3 (QFN32) v0.4

Operating System used.

Windows

How did you build your project?

VS Code IDE

If you are using Windows, please specify command line type.

None

Development Kit.

esp32-c3-devkitm-1

Steps to reproduce.

  1. Build spp_server
  2. Flash to device
  3. Connect to device via another bluetooth device
  4. Disconnect via another device
  5. Observer that a connect message was outputted but not a disconnect message

Build Logs.

No response

More Information.

Here's the logs from the serial output

I (422) blecm_nimble: BLE Host Task Started
I (422) blecm_nimble: No characteristic(0x2a00) found
I (422) blecm_nimble: No characteristic(0x2a01) found
I (422) blecm_nimble: No characteristic(0x2a05) found
I (432) blecm_nimble: No characteristic(0x2b3a) found
I (432) blecm_nimble: No characteristic(0x2b29) found
I (442) app_main: Callback for read
I (452) NimBLE: GAP procedure initiated: stop advertising.

I (452) NimBLE: GAP procedure initiated: advertise;
I (462) NimBLE: disc_mode=2
I (462) NimBLE: adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=256 adv_itvl_max=256
I (472) NimBLE:

I (472) main_task: Returned from app_main()
I (7882) app_main: ESP_BLE_CONN_EVENT_CONNECTED

I (17692) NimBLE: GAP procedure initiated: advertise;
I (17692) NimBLE: disc_mode=2
I (17692) NimBLE: adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=256 adv_itvl_max=256
I (17702) NimBLE:

@github-actions github-actions bot changed the title esp_ble_conn_mgr no disconnect event esp_ble_conn_mgr no disconnect event (AEGHB-663) May 22, 2024
@lisir233
Copy link

lisir233 commented May 22, 2024

Hi, @AlejandroHuerta Thanks for the feedback, for some reason the disconnect event is not being reported to app_ble_conn_event_handler. as a temporary solution you can add
esp_event_post(BLE_CONN_MGR_EVENTS, ESP_BLE_CONN_EVENT_DISCONNECTED, NULL, 0, portMAX_DELAY).
to

esp_ble_conn_event_send(conn_session, ESP_BLE_CONN_EVENT_DISCONNECTED, NULL, 0, NULL);

We will fix this in a subsequent commit, thanks again for your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants