How to Change NRF52832 Bluetooth MTU

Argiris_Mouratidis
Mon, 04 Oct 2021 13:36:27 +0000
Best practice

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.

3 posts - 2 participants