Skip to main content
Associate III
Sep 5, 2023 1:45 PM UTC
Question

BLE Insufficient resource error: code 0x88

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

This topic has been closed for replies.

10 replies

Issamos
Super User
Sep 5, 2023 2:11 PM UTC

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

OliveAuthor
Associate III
Sep 5, 2023 3:17 PM UTC

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

ST Technical Moderator
Sep 5, 2023 8:22 PM UTC

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
OliveAuthor
Associate III
Sep 6, 2023 3:31 PM UTC

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

Issamos
Super User
Sep 5, 2023 8:40 PM UTC

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

Weld you verify this.

Best regards.

II

OliveAuthor
Associate III
Sep 6, 2023 3:35 PM UTC

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

Issamos
Super User
Sep 6, 2023 3:38 PM UTC

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