feat(ble): Add simultaneous client and server example #12141
+285
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
This pull request introduces a new BLE Client-Server coexistence example for the ESP32, demonstrating how to run both BLE client and server functionalities on a single device. The example allows an ESP32 to advertise its own BLE service while simultaneously scanning for and connecting to other BLE servers, enabling two-way communication between devices running the same code. Additionally, a CI configuration file is added to ensure the example is built with appropriate partition settings and only on compatible hardware.
Key additions and changes:
New BLE Client-Server Example:
Client_Server.ino, which implements simultaneous BLE server and client roles on the ESP32, including periodic characteristic updates, connection management, and notification handling. The example is well-documented and suitable for testing with two ESP32 boards.Continuous Integration Configuration:
ci.ymlto specify the use of thehuge_apppartition scheme and require BLE support or NimBLE support in the build environment, ensuring compatibility and successful builds on supported hardware.Test Scenarios
Locally with NimBLE and Bluedroid