Thanks for your info. I had read this thread. And I also put one question to Mkim who creat this discussion.
My problem is one 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 any more, 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.
BTW., the 20736 would do the non_connectable ADV when do bleprofile_sendNotification(). We are not sure if my issue is related to the ADV data.
We also study the source code of BCM20734, and there is one function named cfa_hci_AllocateBLEACL(), which would allocate buffer for data transmition. If this is the same as BCM20736, it might be fail here we guess. but unfortunately, there is no source code could be study in BCM20736.
Now we do one test as below: To check the TX buffer size before call bleprofile_sendNotification(), and once it's 0, we stop doing notification. With this solution, it could good improve the system stanbility, but still fail once in whole half day non-stop test.
Could U pls help us to check more ??
Many many many tks....
Question: There is one callback function register to GATT, and also there is one callback function of fine timer. What's the proirity of this two callback function? Would the fine timer callback function interrupt GATT callback function ??
You may also check following thread:
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.
You may also refer to following thread:
"...finetimer callback happens in the application thread...".
All the callback functions exposed in application layer should belong to the application thread. So the answer is NO.
Yes, we study all the materials in the past weeks.
Here, I must say thanks to U, Max and other BCM who helped us.
We now developping a cluster tree type network with BCM20736, and everything goes well now.
In the past 7 days, we build the network with 30 pcs BCM20736 and at the same time, there are 3 mobile phones sending and sync data in the same net
# the data loss in transmition --> we add the condition of (tx buffer > 2), seems workable
# the max connection is 4. (4 peripherals or 1 central & 3 peripherals) --> We still fail to create connection up to 7, but it doesn't matter for our solution
# Advertising stopped during test --> it's solved
# 0x08 error; 0x3e error; 0x16 error --> in long time non-stop tesst, we found out that, most of the 30 pcs BCM20736 feedback the error message, and the error code is 0x08, 0x3e, 0x16. we are debuging now.
By the way, our interval setting is min_interval = 20(25ms), max_interval = 28(35ms). timer out is 1s.
The 0x3e error occurs when the central failed to receive a response packet from the peripheral it is communicating after a period of time. You may want to increase the connection interval and see whether the situation improves.