-
Notifications
You must be signed in to change notification settings - Fork 8k
Support BLE multiple connection in the BLE part of the esp_hid component. (IDFGH-16865) #17936
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
Conversation
👋 Hello paul356, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
0894a72 to
cc9902d
Compare
…dd interfaces to allow users to select which connection to use or boradcast events to all connections.
|
I have trouble with pre-commit hooks. Because this fork is created years ago, I will create a new fork and fix the pre-commit hooks first, then create a new PR. |
Description
Since BLE supports multiple connections, it is not uncommon for a BLE hid host to support multiple connections. This PR address the need to support multiple connections in the BLE hid module. The core data struct is to add these memebers to esp_ble_hidd_dev_s. These fields help to track which connection currently is selected. I also update the handlers to use these members to respond to different events.
Related
Testing
I have tested this change using the esp_hid_device example. For single connection the behavior stays the same. I have a keyboard project which supports multiple BLE clients. I was able to switch between different BLE clients.
Checklist
Before submitting a Pull Request, please ensure the following:
Note
Add BLE HID multi-connection support with per-connection CCC and APIs to set active connection, query connections, and toggle broadcast mode, updating send and event paths accordingly.
esp_hidd):esp_hidd_conn_info_tand new APIs:esp_hidd_dev_set_active_conn,esp_hidd_dev_get_connections,esp_hidd_dev_set_broadcast_mode.ble_hidd):connections[],conn_mutex,active_conn_index,broadcast_mode.connected, battery, input, and feature report paths to support unicast to active connection or broadcast to all.esp_ble_hidd_dev_set_active_conn,...get_connections,...set_broadcast_mode.Written by Cursor Bugbot for commit 3b7ab64. This will update automatically on new commits. Configure here.