Skip to content

Conversation

@tmpfs
Copy link
Contributor

@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?

@alexmoon
Copy link
Contributor

Thanks!

@alexmoon alexmoon added this pull request to the merge queue Jun 26, 2025
Merged via the queue into embassy-rs:master with commit 5949a5b Jun 26, 2025
1 check passed
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