2023-09-05 06:45 AM
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
2023-09-05 07:11 AM
Hello @Olive
I suggest you to:
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
2023-09-05 08:17 AM
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
2023-09-05 01:22 PM
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
2023-09-05 01:40 PM
According to the AN5270, the Status error code of "Insufficient resources" is 0x64 not 0x88.
Weld you verify this.
Best regards.
II
2023-09-06 08:31 AM
Thanks for your reply! I use BlueNRG-LP SDK.
2023-09-06 08:35 AM
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
2023-09-06 08:38 AM - edited 2023-09-06 08:39 AM
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
2023-09-07 06:33 AM
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
2023-09-07 06:42 AM
For sure, free RTOS will be a good solution for ressources management.
Best regards.
II