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