Hello,
I'm still testing l2cap bandwidth with two usb dev kits(see my earlier post on Wed, 2020-01-01 16:24 ). I see certain patterns, which I can not explain.
The first one, see attached picture (pic.pdf). After reset, when the central connects to the periph. the first 8-10sec or so I always get 1.1-1.2Mbps (the task prints the bandwidth every 500ms). After that it drops down approx. 15-20%. Then after some time it drops down to half. I tested several payload sizes (245 - 1751 bytes), connection interval was 6, phy 2M, DLE 251 bytes and it always happens like this. When I set the connection interval to 7, the first 15-20% drop still happens after 8-10 sec, but the second one not. But with 7 interval I get lower initial bandwidth also, regardless of the payload size. (with 6 I get 1.2mbps initially, then 1mbps, with 7 I get 1mbps intially, then 0.8mbps). There is no memory leak in the main task, idlehook gets time.
With interval 6 intially there is 75-80 packets per 500ms, then it drops to 65-70 packets per 500ms (checked with ad_ble_get_lld_stats).
With interval 7 intially there is 67-70 packets per 500ms, then it drops to 56-58 packets per 500ms (checked with ad_ble_get_lld_stats).
The second one is just an observation: regardless of the payload size, the available credit is always decreased by one. To my understanding for each pdu (251bytes) one credit should be deducted. I can only get two credits deducted, if I set the payload size within 2 bytes of the mtu size. I may be wrong here.
Can you maybe give me a hint what I should check, why the 15-20% drop happens after 8-10 sec?
Thank You!
Hi VargaAdam,
你之前提到过论坛线程,在创eral the 2Mps is not added by the SIG to increase the throughput, but to increase the bandwidth so more BT devices can co-exist. I would strongly recommend you to use a BLE sniffer to check if the connection interval is fully utilized. Printing in UART delays the system. Possible reasons for the bandwidth drop might be:
Thanks, PM_Dialog
Hello,
I set pm_sleep_mode_set(pm_mode_active) and USE_BLE_SLEEP to 0. The throughput still falls back after 8 sec.
The connection params are 7 on connected event on both sides and I don't see any conn. param update event on either side during the test. I used the ble_central and ble_peripheral project as a starting point.
The printf's slow the system only by very little, but I don't use too much, only 1 per 500ms. I don't plan to use the system continuously at this rate, I need short but high throughput bursts. But if the bandwidth decreases for some reason by 15-20% that is quite relevant for me.
I don't have a sniffer currently, but I would appreciate any further tips, what to check.
Regards,
Hi VargaAdam
What is the connection interval that you are using? In your initial comments you mentioned that you are using connection interval 6 and 7. Can you please clarify it? In addition, have you done any modification in the SDK projects that you are using? A BLE sniffer would be very helpful…
Thanks, PM_Dialog
Hello,
I tried with interval 6 then also with 7. The throughput fall comes always after 8 sec. Since then I also tried with interval 10. Same result. Tried different payload length. Same result.
Yes, I have done modifications to the SDK projects, since the ble central and peripheral project doesn't have l2cap communication. I modified the events that have to be handled. Removed the gatt services and added the l2cap channel creation code.
The problem is still, regardless what I do, the throughput drops by 15-20% after 8sec. Currently I don't understand the connection between the low power clock stabilization timer and the throughput.
If I can give more information, don't hesitate to ask.
Regard,
Hi VargaAdam,
My apologies for the late response. Probably I missed you last comment. Would it be possible to share the modifications you have done? Do you perform connection parameters update?
Thanks, PM_Dialog
Hello,
别介意,meanti问题已经解决了me. Thanks!
Regards,