react-native-ble-plx icon indicating copy to clipboard operation
react-native-ble-plx copied to clipboard

How to improve throughput

Open TreeOfLearning opened this issue 1 year ago • 1 comments

Prerequisites

  • [X] I checked the documentation and FAQ without finding a solution
  • [X] I checked to make sure that this issue has not already been filed
  • [X] I'm sure that question is related to the library itself and not Bluetooth Low Energy or Classic in general. If that so, please post your question on StackOverflow.
  • [X] I'm running the latest version

Question

Hello,

We are currently seeing a throughput of around 3KB/s for receiving data from a monitored characteristic. I'm trying to figure out if there's anything I can do to speed this up. The suggestions I can find on the web are:

  1. Enable DLE (data length extension)
  2. Use the smallest possible connection interval
  3. Use the largest possible MTU
  4. Use the LE 2M PHY mode

I only seem to be able to control the MTU with react-native-ble-plx.

Are any of these other options supported (perhaps automatically enabled?) by the library? Are there any other suggestions on how to improve the throughput?

Thanks

TreeOfLearning avatar Nov 16 '23 12:11 TreeOfLearning

https://developer.apple.com/library/archive/qa/qa1931/_index.html Apple has some pretty specific requirements for connection intervals/latency on connections made to their devices. I don't believe that anything from the Core Bluetooth library allows for manually altering many connection parameters, not sure about natively on Android. If you are in control of the code running on the peripheral that the phone is trying to connect to, you would be able to make tweaks to increase the throughput that way.

ethansisk avatar Nov 22 '23 21:11 ethansisk