Optimizing L2CAP throughput

On the nRF5350 I'm currently seeing about 30 kB throughput via bt_l2cap_chan_send.  It seems that could be optimized to over 100 kB.  I'm looking at some values in the l2cap struts to check if things are setup correctly.  See below.  One thing I noticed is the credits seem to have unexpected values.

The tx credits is 65525.  Is that expected?  I was assuming it would be some small number.

Is it possible only 1 packet is sent per connection interval?  Maybe due to a credits issue?

Is there any way to add some firmware checks to get the number of packets sent per connection interval?

bluetooth status:
disconnect reason: 0
mtu: 247
interval: 24
latency: 0
timeout: 400
tx max len: 251
tx max time: 2120
rx max len: 251
rx max time: 2120
tx phy: 2
rx phy: 2
tx l2cap mtu: 1251
tx l2cap mps: 1251
tx l2cap credits: 65525
rx l2cap mtu: 4980
rx l2cap mps: 247
rx l2cap credits: 1

Parents Reply
  • Here is a screenshot from the wireshark trace:

    From what I can tell, the nRF5 device have the MD-bit (MoreData) set at the end of each connection event, so from the nRF5-side of things, the packet exchange can continue. But the central ends the connection event. Looks like the central only support up-to 5 pack-pair each connection event. Maybe the central is doing something else, other connections, scanning for other devices at the same time, that is causing this, or maybe the central simply only support 5 packet-pair each connection event.

Children
No Data
Related