fix(ble): remove deprecated NimBLEService::start() call, use btStop() on C5#2560
Open
r13xr13 wants to merge 1 commit into
Open
fix(ble): remove deprecated NimBLEService::start() call, use btStop() on C5#2560r13xr13 wants to merge 1 commit into
r13xr13 wants to merge 1 commit into
Conversation
… on C5 pService->start() was removed in recent NimBLE-Arduino versions, causing build failure. Use btStop() instead of esp_bt_controller_deinit() on ESP32-C5 for cleaner shutdown.
Ninja-jr
reviewed
Jun 26, 2026
Ninja-jr
left a comment
Contributor
There was a problem hiding this comment.
As long as we don't update nimble dependency from 2.5 on platformio.ini it's not a problem as it will simply be ignored and throw a warning at build time but no harm at all.
We adapted for 2.5 anyway and it works well so imo better to leave as is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Two BLE fixes:
Removed
pService->start()— This method was removed in recent NimBLE-Arduino versions. The service is already started implicitly when advertising begins, so the call was redundant.Use
btStop()on ESP32-C5 —esp_bt_controller_deinit()is not available on the RISC-V ESP32-C5. Replaced withbtStop()which works across all ESP32 variants.Changes
ble_common.cpp: RemovepService->start()call before advertisingble_common.cpp: Replaceesp_bt_controller_deinit()withbtStop()in C5 path