- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Regards, Paul.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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[60];
NotificationHandle.value.len = 56;
/* Send notifications. */
CyBle_GattsNotification(cyBle_connHandle, &NotificationHandle);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
case CYBLE_EVT_GAP_DEVICE_CONNECTED:
/* Initiate an MTU exchange request */
CyBle_GattcExchangeMtuReq(cyBle_connHandle, CYBLE_GATT_MTU);
break;
This will actually increase the MTU to the configured amount.
I hope this will help somebody.
Paul.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Paul - this was the port I was looking for to solve my problem. !