How to Change NRF52832 Bluetooth MTU

I have already implemented a GATT service with 3-4 characteristics using values below 20 bytes.
Now I want to create a characteristic with 24 bytes.

My main issue is that whenever I READ a value from this characteristic the value is 24 bytes,
BUT whenever I try to subscribe for notification the value is empty.
I’ve tried to change the value from 24 bytes to 20 and notificatinos work correctly.

After searching for a while i found out that i had to change “cordio.desired-att-mtu”
from the default value 20 to my desired value 28, but still the notifications are not working.

I want to ask if it’s ok to change the default MTU value (I’ve seen some issues with mobile phones not accepting values above 20bytes (23 with headers) and if so how can i change it ??

My project is on Visual Code with PlatformIO and Mbed OS.

From my understanding and my experience: you cannot force a MTU unless you know for a fact that both device accept longer MTU.

If they don’t, it will fall back to the standard.

Here’s an interesting read:

1 Like

That was very useful!! I’ll try getting both sides on my desired MTU and hope for the best :crossed_fingers: