zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.02k stars 6.17k forks source link

Bluetooth: Host: missing api: bt_gatt_get_mtu #68070

Open alwa-nordic opened 5 months ago

alwa-nordic commented 5 months ago

As a Bluetooth LE Audio subsystem developer, I need my API to enforce a requirement from the specification: Some audio functions require the UATT MTU to be at least 64. They must return an error otherwise.

Currently, there is no way to get the UATT MTU (in a reliable way) from the Host.

Describe the solution you'd like A new API: uint16_t bt_uatt_get_mtu(struct bt_conn *conn)

Describe alternatives you've considered Not enforcing the ATT MTU at service level. This could cause hard-to-debug errors for the user.

Why the current API does not satisfy my requirements

alwa-nordic commented 5 months ago

Relates to: https://github.com/zephyrproject-rtos/zephyr/issues/64172

ubieda commented 1 month ago

@alwa-nordic is this issue up for grabs? I could tackle it as it would enable me coming up with a solution for #72018.

alwa-nordic commented 1 month ago

Yes, issue is up for grabs. Thanks for taking it! :)