I have created a custom service with a notify characteristic that sends an uint8 array with a size of 20.
How do I increase the size to 60? When I increase to anything over 20 it stops working.
I tied increasing the MTU without success.
Just to clarify, I can increase the length for characteristic to 60 without any issues.
However, when I change the notification len in my code to a higher value it stops working.
NotificationHandle.attrHandle = REALTIME_CHAR_HANDLE;
NotificationHandle.value.val = BLETemp; //is unsigned char BLETemp;
NotificationHandle.value.len = 56;
/* Send notifications. */
Can you confirm if you have given the length as 60 in the characteristic of the service in the BLE component? Also, please set the MTU size as 63.
Yes, I set the length of the characteristic to 60 and the MTU to 63 or higher.
It turns out that is not sufficient.
You must also add this to the BLE event handler
/* Initiate an MTU exchange request */
This will actually increase the MTU to the configured amount.
I hope this will help somebody.