Skip to content

fix(nimble): Dynamic services fixes#100

Closed
nebkat wants to merge 2 commits into
espressif:nimble-1.6.0-idffrom
nebkat:fix/dynamic-services-crash
Closed

fix(nimble): Dynamic services fixes#100
nebkat wants to merge 2 commits into
espressif:nimble-1.6.0-idffrom
nebkat:fix/dynamic-services-crash

Conversation

@nebkat

@nebkat nebkat commented May 29, 2025

Copy link
Copy Markdown

Description

I have identified two issues that occur when using only dynamic services:

  1. ble_gatts_get_last_cfg is used which may initially return NULL if there are no static services - this needs to be checked.
  2. ble_gatts_conn_can_alloc may wrongly return false because there are no free blocks in the ble_gatts_clt_cfg_pool, which is empty due to there being no static services.

Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

nebkat added 2 commits May 29, 2025 14:41
When no non-dynamic services have been added the ble_gatts_clt_cfg_pool is empty.
Because of this, it reports having no free blocks, as if it was full.
We must check if there are any blocks available at all, in case they are all
stored in dynamic services.
@CLAassistant

CLAassistant commented May 29, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@nebkat

nebkat commented Jun 16, 2026

Copy link
Copy Markdown
Author

See #126

@nebkat nebkat closed this Jun 16, 2026
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