Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I set the connection interval? #1259

Open
yinghuochongfire opened this issue Sep 17, 2024 · 1 comment
Open

How do I set the connection interval? #1259

yinghuochongfire opened this issue Sep 17, 2024 · 1 comment

Comments

@yinghuochongfire
Copy link

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?

@lucaswitch
Copy link
Contributor

lucaswitch commented Sep 17, 2024

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."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants