cancel
Showing results for 
Search instead for 
Did you mean: 

BLE insufficient resource - error code 0x64

JGM
Associate

Hi,

I am writing a client/server application for STM32WB55. Server behavior is ok. On client side, I connect to a peripheral and try to send 32 bytes packets every 100 ms on peripheral's RX characteristic using aci_gatt_write_without_response function. MTU is set to 156. Nevertheless most of the time the function return with error code 0x64 (insufficient resource). The application is connected to 1 peripheral only, no advertising. I didn't find any helpful information.

Any idea? Any orientation for investigation?

Thanks, 

Jacques

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

Thanks a lot for your advices.

Finally I found that the parameters I used for the connection (aci_gap_create_connection) were not suitable. For example the connection intervals (min & max) were too high in comparison to the frequency of the call of the aci_gatt_write_without_response function. This is detailed in chapter 6 of the PM0271 document.

I hope this can help someone else also.

Regards.

View solution in original post

2 REPLIES 2
ghrairim
ST Employee

Hello @JGM ,

The error indicates that the BLE stack on your STM32WB55 client device does not have enough resources to perform the requested operation at the time the aci_gatt_write_without_response function is called. This could be due to various reasons, such as buffer constraints, timing issues, or limitations in the BLE stack's concurrency management.

Here are some considerations to help you resolve the issue:

- Ensure that the buffer sizes allocated for GATT operations are sufficient for your needs.

- Check if there is a way to query the BLE stack for buffer availability before attempting to send a packet.

- The BLE stack may have limitations on the number of concurrent GATT operations that can be processed. Sending data too quickly might exceed this limit.

- Instead of sending packets strictly every 100 ms, consider implementing a dynamic delay that adjusts based on the success or failure of the previous write operation.

Best Regards.

Hello,

Thanks a lot for your advices.

Finally I found that the parameters I used for the connection (aci_gap_create_connection) were not suitable. For example the connection intervals (min & max) were too high in comparison to the frequency of the call of the aci_gatt_write_without_response function. This is detailed in chapter 6 of the PM0271 document.

I hope this can help someone else also.

Regards.