Skip to content

fix(ble): remove deprecated NimBLEService::start() call, use btStop() on C5#2560

Open
r13xr13 wants to merge 1 commit into
BruceDevices:mainfrom
r13xr13:fix/nimble-deprecated-start
Open

fix(ble): remove deprecated NimBLEService::start() call, use btStop() on C5#2560
r13xr13 wants to merge 1 commit into
BruceDevices:mainfrom
r13xr13:fix/nimble-deprecated-start

Conversation

@r13xr13

@r13xr13 r13xr13 commented Jun 18, 2026

Copy link
Copy Markdown

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-C5esp_bt_controller_deinit() is not available on the RISC-V ESP32-C5. Replaced with btStop() which works across all ESP32 variants.

Changes

  • ble_common.cpp: Remove pService->start() call before advertising
  • ble_common.cpp: Replace esp_bt_controller_deinit() with btStop() in C5 path

… 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 Ninja-jr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Successfully merging this pull request may close these issues.

2 participants