Skip to content

fix(nimble): Dynamic services fixes #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: nimble-1.6.0-idf
Choose a base branch
from

Conversation

nebkat
Copy link

@nebkat nebkat commented May 29, 2025

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
Copy link

CLAassistant commented May 29, 2025

CLA assistant check
All committers have signed the CLA.

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