Skip to content

Support larger discovery characterisrics maximum buffer size #296

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: master
Choose a base branch
from

Conversation

tmpfs
Copy link

@tmpfs tmpfs commented Jun 8, 2025

Hi,

I just hit the panic here:

https://github.com/embassy-rs/nrf-softdevice/blob/master/nrf-softdevice/src/ble/gatt_client.rs#L179

And I can't see any way to increase the maximum number of characteristics when discovering services as it's hard-coded in const DISC_CHARS_MAX.

The problem does not exist when I have an att_mtu of 23 but when i increase the att_mtu to 247 which i need for more throughput reading some of the GATT characteristics then the problem appears.

In my case the packet contained 11 characteristics with an att_mtu of 247 so I have bumped it to 12 behind the discovery-chars-12 feature flag (taking inspiration from the evt-max-size-256 feature flag - which I also need).

I am tempted to do the same for DISC_DESCS_MAX but perhaps that's my OCD with consistency and symmetry so perhaps you can advise if you would prefer this or not?

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.

1 participant