QN908xcdk Connection time set and QPP bps

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QN908xcdk Connection time set and QPP bps

1,104 Views
syd
Contributor III

The maximum throughput test is in progress.
Test environment.
1. using two qn908xcdk
2. qn908xcdk_wireless_examples_bluetooth_private_profile_server_bm and qn908xcdk_wireless_examples_bluetooth_private_profile_client_bm sample projects
3. 2M Phy

In the above environment, 950kbps throughput was obtained.
I set the connection interval to 6 under the assumption that reducing the connection interval would yield higher throughput. But rather lowered to 500kbps.

Next, I set the connection interval to 20. (If I didn't put the code to change the connection interval, it would be 20.)
Then I expected the same 950kbps as the first test and I got 300kbps.

I wonder why this happens?

Questions

1. Does the connection interval and bps have nothing to do with it?
2. Why is it lowered when I set it to the same connection interval of 20?

Note that the connection interval is set in the profile_client project.
The code is as follows:

case mAppExchangeMtu_c:
    {
        if (event == mAppEvt_GattProcComplete_c)
        {
            (void) Gap_UpdateLeDataLength (peerDeviceId, gBleMaxTxOctets_c, gBleMaxTxTime_c);

            / * I added to update connection interval * /
            Gap_UpdateConnectionParameters (peerDeviceId, 20, 20, 0, gGapConnSuperTimeoutMax_d, gGapConnEventLengthMin_d, gGapConnEventLengthMax_d);

            / * Moving to Service Discovery State * /
            mPeerInformation [peerDeviceId] .appState = mAppServiceDisc_c;

            / * Start Service Discovery * /
            BleServDisc_Start (peerDeviceId);
        }
        else if (event == mAppEvt_GattProcError_c)
        {
            Gap_Disconnect (peerDeviceId);
        }
    }
    break;

Labels (1)
0 Kudos
2 Replies

970 Views
Xiang_Li
NXP Employee
NXP Employee

Hi jinjee seo,

In the ideal world, throughput should not be affected by the connection interval. Because no matter large or small connection interval is, 100% of the air time should be filled with packets exchanging data between the 2 BLE devices. So the throughput should be the same.

But in reality, when 1 interval is finished, we need to switch to a different RF channel for the next interval. In the meantime, the BLE chip also needs to do some other preparation works. These works take small amount of time. This means for each interval, there will be a small time gap wasted, which cannot be used for data transmission.

So the smaller your interval is, the more overhead it is in total. Which would reflect in the throughput value, and make it lower. I think it is logical for your measurements when using interval 20 x 1.25ms = 25ms ==> interval 6 x 1.25ms = 7.5ms.

Then, how about setting the interval to maximum possible (4s)? Because then we have minimum overhead for channel switching etc. Well, yes in theory, but in reality, due to the interference, communication quality maybe bad on certain RF channels. And according to BLE spec, if there are 1 packet missing, or 2 packets have CRC errors in a row, the interval (or connection event) is closed, and both BLE devices must jump to the next interval. And therefore the remaining air time for this interval would be wasted.

To conclude, to achieve best throughput, we need to choose an interval neither too large nor too small. It depends on the use cases and many other factors, like:

- PHY type, 2Mbps is faster than 1Mbps

- packet length, generally packet length extension would improve on the throughput

- interference on the 2.4GHz band

- and connection event length.

Connection event length is a recommended value for BLE device on how much time can be used within the interval. E.g. connection interval is 1s and connection event length is 100ms. The BLE device may use only up to 100ms (wasting 900ms) and then go to the next interval.

I don't know for sure but your 2nd question maybe connection even length related. I suggest you to change your gGapConnEventLengthMin_d to a higher value and test if it makes any difference.

Regards,

Xiang

970 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

In which environment are you testing this behavior? Could you please help me checking this https://community.nxp.com/thread/510224  thread?

It is possible also that besides the theoretical throughput that your environment might be affecting it. Also, how are you testing it and measuring it?

Regards,
Estephania

0 Kudos