Higher connection interval with lower throughput

Hi

I am using NCS 2.8 and running one pair of peripheral and central devices using nRF52832.

At first, the default interval is 50 ms, and I can get the throughput around 200 kbps, which is correct.

After updating the connection interval to 625 units, the througphut became lower, around 5kbps. I have even checked the maximum interval 3200 units, the throughput is quite low, with 2 packets sent in one interval inducing 0.98kbps. Seems that every interval only send two packets (my payload is 244 bytes).

[TP] t=28060 ms, bytes=488, tp=0.976 kbps

[TP] t=32060 ms, bytes=488, tp=0.976 kbps

[TP] t=36060 ms, bytes=488, tp=0.976 kbps

[TP] t=40059 ms, bytes=488, tp=0.976 kbps

[TP] t=44059 ms, bytes=488, tp=0.976 kbps

[TP] t=48059 ms, bytes=488, tp=0.976 kbps

[TP] t=52058 ms, bytes=488, tp=0.976 kbps

[TP] t=56058 ms, bytes=488, tp=0.976 kbps

My project config has considered the "high througput config" like this in both peripheral and central:

CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_ATT_TX_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=498
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=502
 
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT_OVERRIDE=y
CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=4000000

But I still cannot get stable througput, why the packets number in the interval has been fixed? Could you give me some advice on that?

My code are:

5417.peripheral.zip

4331.central.zip

Parents
  • Hi Zhou, 
    I assume you already tested with the throughput sample in the SDK ? 
    What's the throughput you achieve with the sample ? 

    I would suggest to try capturing a sniffer trace.  This way we can check if there is any bottle neck causing the issue. 

    Do you have the central or peripheral doing any any other activity when they are exchanging data (like scanning or advertising) ? 

  • Hi

    Yes, for the througput sample I can get around 1400 kbps.

    I will try the sniffer, but I think the thing is clear now, the interval only send a few packets rather than send it all the time. And I think I have corretly include all nessesary config.

    I am doing the time sychronization along with the data transfer, but I have checked close the sychronization, the throughput will still be quite low after changing the interval.

    Could you kindly check my code in the attached file? Thank you so much!

  • Hi Zhou, 
    I agree that we need to see why it only send a few packets per connection interval. 
    I suspect it may have something to do with the connection event length, but I already see that you have set 
    CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=4000000

    So it could be something else. 
    We need to look at how you send data from the peripheral to the central. Are you just looping infinitely and calling bt_nus_send() without any delay ?

    Anything in your central application that can slow down the receiving of those package ? 

    If you can provide the sniffer we can check if it's the peripheral didn't send or if the central couldn't receive. 


Reply
  • Hi Zhou, 
    I agree that we need to see why it only send a few packets per connection interval. 
    I suspect it may have something to do with the connection event length, but I already see that you have set 
    CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=4000000

    So it could be something else. 
    We need to look at how you send data from the peripheral to the central. Are you just looping infinitely and calling bt_nus_send() without any delay ?

    Anything in your central application that can slow down the receiving of those package ? 

    If you can provide the sniffer we can check if it's the peripheral didn't send or if the central couldn't receive. 


Children
Related