- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My app sends about 10 notifications per second. Sometimes it gets CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED from Cy_BLE_GATTS_SendNotification().
Should the memory allocated to the BLESS stack be increased and if so how is it done? I am using the COMPONENTS+=BLESS_HOST BLESS_CONTROLLER on the M4 configuration.
Alternatively, what is the best course of action when this error is encountered?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Yugandhar I was already doing it via a variable set from the stack callback CY_BLE_EVT_STACK_BUSY_STATUS event like the throughput example.
But doing it directly like you said seems to work better. Must be a race condition there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Before sending a Notification from the Server could you please check whether the stack is busy or not. Send the notification when the stack is free as shown in below.
if(Cy_BLE_GATT_GetBusyStatus(appConnHandle.attId) == CY_BLE_STACK_STATE_FREE)
{
/* Send notification data to the GATT Client*/
Cy_BLE_GATTS_SendNotification();
}
Thanks,
P Yugandhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Yugandhar I was already doing it via a variable set from the stack callback CY_BLE_EVT_STACK_BUSY_STATUS event like the throughput example.
But doing it directly like you said seems to work better. Must be a race condition there.