fix(hosted): Make BLE work on older hosted firmwares#12270
Conversation
👋 Hello me-no-dev, 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.
Pull request overview
This pull request adds version compatibility checks for BLE operations on ESP-Hosted firmware to prevent errors when running on older firmware versions (< 2.6.0). The changes ensure that Bluetooth controller initialization and deinitialization are only performed when the slave firmware supports these operations.
Changes:
- Added firmware version checks (>= 2.6.0) before BLE controller initialization and enabling
- Added firmware version checks (>= 2.6.0) before BLE controller disabling and deinitialization
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 90 files 90 suites 33m 39s ⏱️ Results for commit 3e19571. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This pull request updates the BLE initialization and deinitialization logic in
cores/esp32/esp32-hal-hosted.cto ensure that Bluetooth controller operations are only performed if the slave firmware version meets a minimum requirement. This helps maintain compatibility and prevents errors on older firmware versions.Version compatibility checks for BLE operations:
hostedInitBLE()to only initialize and enable the Bluetooth controller if the slave firmware version is at least 2.6.0. [1] [2]hostedDeinitBLE()to only disable and deinitialize the Bluetooth controller if the slave firmware version is at least 2.6.0. [1] [2]