cancel
Showing results for 
Search instead for 
Did you mean: 

BLE Insufficient resource error: code 0x88

Olive
Associate II

Hi,

I am trying to transfer 2k bytes data every a while (20s for example) from BlueNRG-LP to my computer with one connection event. the 2KB data is divided into 5 chunks (data packets), which means 5 data packets contain a complete data set.  After I received the complete data set four times on my computer, the data received following that became only the first data packet, then after an other few more transmission, On the BlueNRG-LP side it gave an error code 0x88 (insufficient resource)  from aci_gatt_srv_notify function. I did notice that if BlueNRG-LP is disconnected from the computer, and reconnectted, then the transmission could continue, which seems indicating that the resources reserved are for one connection event. I am wondering if there is a way to release the resources (for example the memory allocated to BLE transmission buffer etc.)  allocated during the connection and reclaim it in the same connection event so that the recourses can be reused or is there any way to avoid "insufficient resource" error?

Thanks,

Olive

10 REPLIES 10
Issamos
Lead II

Hello @Olive 

I suggest you to:

  • Upgrade your firmware to the last version.
  • Implement a flow control to organise the transmission operation using acknowledges,...
  • Increase ressource allocation as maximum as you can.
  • Consider reducing the data size if possible to avoid unnecessary allocations.

If this problem persists you may have to look for a new hardware that can give you the resources you need for your application.

Best regards

II

Thanks for your reply II!

I ever tried using INDICATE to get acknowledges, however only the first data packet was received. I am not sure what might cause the issue. Any suggestion?

Thanks,

Olive

Imen.D
ST Employee

Hello @Olive ,

Have you tried to do this with available BLE example under STM32Cube firmware? Maybe incorrect flash parameters.

Maybe these resources helped you: PM0269 and AN5270 which contains Status error codes description.

Ime

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Issamos
Lead II

According to the AN5270, the Status error code of "Insufficient resources" is 0x64 not 0x88.

Weld you verify this.

Best regards.

II

Thanks for your reply! I use BlueNRG-LP SDK.

AN5270 uses STM32Cube, and my application uses BlueNRG-LP DK in which the error code is defined in ble_status.h file. 

/**
* @brief The requested operation failed for a temporary lack of resources
* (e.g. packet pool or timers), but it may be retried later when resources may
* become available (packets or timers may have been released by other consumers).
*/#define BLE_STATUS_INSUFFICIENT_RESOURCES ((tBleStatus)(0x88))

 

Thanks,

Olive

Hello again @Olive and thank you for the feed back.

I think that using a real time operating system (RTOS) can solve your problem.

Best regards.

II

Hi II,

Thanks for your suggestion!

would RTOS itself add overhead on resources use? I noticed there is a FreeRTOS example delivered with the BlueNRG-LP DK. If I use FreeRTOS, will FreeRTOS help to manage the resources used by BLE more efficiently?

Thanks,

Olive 

For sure, free RTOS will be a good solution for ressources management.

Best regards.

II