BLE Stack to busy and unresponsive!

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

cross mob
Anonymous
Not applicable

Hi,

   

i have PSoC4 BLE as a Bluetooth modem which connects a microprocessor via UART and a smartphone via BLE.

   

I get a lot of debug info from the microprocessor which i want to send to the Smartphone. But often, BLE reads time out and i get the debug message "BLE STACK BUSY".

   

I am transferring 26 bytes with debug info on 11 characteristics. Each time the microprocessor sends debug info, i use

   

CyBle_GattsNotification(connectionHandle, &hrConfigHandle);

   

on each of the 11 characteristics. That notifies the smartphone, that there is new data available. Those same characteristics also support "read", but when i want to read them selectively, my BLE connection times out.

   

The reason why i made separate characteristics for the debug data fields is that it gets too long in one characteristic for the Android smartphone to receive.

   

How can i speed up the BLE stack or am i having a bad approach of doing things?

   

Thanks,

   

Patrick

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Patrick,

   

When you use printf(), recommendation is to set a minimum Heap size of 0x400 bytes in .cydwr.

   

Thanks,

   

Anjana

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

Hi,

   

Please create a Tech Support case so that we can examine why your reads get time out.

   

Regards,

   

-Madhu Sudhan

0 Likes
Anonymous
Not applicable

Hi,

   

i increased the heap size and now i dont experience any problems. For debugging reasons i was using printf() calls which probably used the heap up. How much heap should be reserved for the BLE stack?

   

Also, how do i monitor the available heap properly? I also asked this question here.

   

Thank you,

   

Patrick

0 Likes
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Patrick,

   

When you use printf(), recommendation is to set a minimum Heap size of 0x400 bytes in .cydwr.

   

Thanks,

   

Anjana

0 Likes