CY_BLE_ERROR_INSUFFICIENT_RESOURCES

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
EdHa_4455331
Level 5
Level 5
25 replies posted 25 sign-ins 10 replies posted

I'm getting a CY_BLE_ERROR_INSUFFICIENT_RESOURCES error during my handling of the CY_BLE_EVT_STACK_ON event. In the snippet below, the GenerateKeys works fine but the StartAdvertisement throws the RESOURCES error. If I swap the two blocks, the StartAdvertisement works but the GenerateKeys will throw the error. Sorta sounds like maybe a shortage of ram, but I can't find anywhere to give the BLE Stack more. Anybody got any ideas about why I'm getting this error and how to make it go away?

Thanks,

Ed H.

 

/* Generates the security keys */
apiResult = Cy_BLE_GAP_GenerateKeys(&keyInfo);
if(apiResult != CY_BLE_SUCCESS)
{
BLE_PRINTF("Cy_BLE_GAP_GenerateKeys API Error: 0x%x \r\n", apiResult);
}

/* Enter into discoverable mode so that remote can find it. */
apiResult = Cy_BLE_GAPP_StartAdvertisement(CY_BLE_ADVERTISING_FAST, CY_BLE_PERIPHERAL_CONFIGURATION_0_INDEX);
if(apiResult != CY_BLE_SUCCESS)
{
BLE_PRINTF("Cy_BLE_GAPP_StartAdvertisement API Error: 0x%x \r\n", apiResult);
}

0 Likes
1 Solution
PratikshaV
Moderator
Moderator
Moderator
100 solutions authored 5 likes given 250 sign-ins

Hi @EdHa_4455331 ,

 

Please let me know what are the security configurations in your project?

if possible can you attach your project to understand the issue better?

Check if you are getting the error if you are using the FindMe code example without any modifications?

 

Thanks

Pratiksha V

View solution in original post

0 Likes
1 Reply
PratikshaV
Moderator
Moderator
Moderator
100 solutions authored 5 likes given 250 sign-ins

Hi @EdHa_4455331 ,

 

Please let me know what are the security configurations in your project?

if possible can you attach your project to understand the issue better?

Check if you are getting the error if you are using the FindMe code example without any modifications?

 

Thanks

Pratiksha V

0 Likes