Check if bleprofile_sendNotification() was successful (con't)

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

cross mob
LeCa_2156671
Level 4
Level 4
First like received First like given

Hi mkim

Per the thread you participating in here: Check if bleprofile_sendNotification() was successful

     Have U solved the issue of bleprofile_sendNotification() fail ??

     Now I have the similar problem that, oen of my 20736 works in slave, and call bleprofile_sendNotification() to send data to its master, sometimes, the master could not get data from this slave 20736, and we check the tx buffer always keeps 0, which seems that, the bleprofile_sendNotification() is blocking some where in the stack.

     It's realy confusing me, and have no any idea about this issue.

     If you have already sovled this issue, could U pls share with me?

     Or pls let me know if my problem is / isn't the same as U

     Many thanks...

1 Solution
Anonymous
Not applicable

Yes. Stop calling bleprofile_sendNotification() when size of free tx buffer decreased to 2.

Resume to send notification after the size of free tx buffer >=2.

Max Song

+86-21-61856384

View solution in original post

0 Likes
5 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

blecm_getAvailableTxBuffers() usually precede bleprofile_sendNotification() so as to ensure that there are available Tx buffers. As pointed by Victor, you may want to check out this part of the code in the speed_test app

0 Likes
Anonymous
Not applicable

You may also check following thread:

Maximum BLE throughput for reliable data transfer

try the solution by esmith:

Thanks for suggestion, KT. The speed test example tests for the tx buffer count being non-zero, which does mean that it can (temporarily) tie up the last buffer. Yesterday I added a #define to my code to set a threshold, currently with a value of 2, and if I don't send notifications unless the available buffer count is >= 2, I don't see any of the lel2cap error messages in the trace output. I think this confirms that something else in the stack needed a buffer and I was starving it.  Perhaps in a future SDK release Broadcom might wish to make this change to the speed_test application to avoid other developers encountering the same issue.

Dear Max,

     Does Esmith mean that, it's recommand to call bleprofile_sendNotification() when the TX buffer size is over 2 ?

     Now our setting is over 0.

     Pls help confirm. Many thanks...

0 Likes
Anonymous
Not applicable

Yes. Stop calling bleprofile_sendNotification() when size of free tx buffer decreased to 2.

Resume to send notification after the size of free tx buffer >=2.

Max Song

+86-21-61856384

0 Likes

Got it, tks...

0 Likes