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

How do I set the connection interval?

Open yinghuochongfire opened this issue 1 year ago • 1 comments

In my current project, I need to transfer a large amount of data from the device to the APP, so I want to set the Bluetooth connection interval. What should I do? Also, what is the default connection interval?

yinghuochongfire avatar Sep 17 '24 15:09 yinghuochongfire

In my current project, I need to transfer a large amount of data from the device to the APP, so I want to set the Bluetooth connection interval. What should I do? Also, what is the default connection interval?

Not sure if that exists on Bluetooth Low Energy but i can negotiate the bluetooth MTU size. You can use: https://innoveit.github.io/react-native-ble-manager/methods/#requestmtuperipheralid-mtu-android-only-api-21 after retrieving peripheral services.

Make sure to read the requestMtu docs for Android and iOS cause both have different behaviors for the mtu size(up to ~512 bytes which is very small).

Also take note that: "BLE isn't intended for large data streaming but focuses on periodic transfers of small amounts of data. This fundamental difference makes it an ideal choice for applications where conserving battery life is crucial."

lucaswitch avatar Sep 17 '24 23:09 lucaswitch

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

marcosinigaglia avatar Dec 17 '24 02:12 marcosinigaglia

We can close this issue since not a issue with the library itself.

lucaswitch avatar Dec 17 '24 13:12 lucaswitch