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

[Help]: Fast Data transfer from BLE device. #685

Closed
karthikmohan4 opened this issue Nov 15, 2023 · 6 comments
Closed

[Help]: Fast Data transfer from BLE device. #685

karthikmohan4 opened this issue Nov 15, 2023 · 6 comments
Labels
help Questions, help, observations, or possible bugs

Comments

@karthikmohan4
Copy link

As read & write method is async. It would ideally take 54sec to transfer 9654 Bytes , packet by packet from the BLE device. If MTU is set more than 23, there is data loss.

How to basically achieve the fast data transfer in less time.

BLE device version : 4.2

@chipweinberger chipweinberger added the help Questions, help, observations, or possible bugs label Nov 15, 2023
@chipweinberger chipweinberger changed the title Fast Data transfer from BLE device. [Help]: Fast Data transfer from BLE device. Nov 15, 2023
@chipweinberger
Copy link
Owner

chipweinberger commented Nov 15, 2023

increase mtu is the only solution.

if there is data loss it is a bug in your code or device.

@joyhope
Copy link

joyhope commented Nov 16, 2023

The library is no problem for fast BLE data transfer. Thanks to the author's hard working.

If problems happen, it is the device and your code.

@karthikmohan4
Copy link
Author

So what should be the ideal time to receive the data from BLE device for ex: 9654 bytes.?

Apart from read/write does any method helps us to retrieve data fast like sstream.

My code follows (req-res) method.

  1. write some data
  2. read the data (takes 2 sec to read 517 Bytes).

Also the ble device version is 4.2. Would that be a reason for slow transfer. ?

Can you provide any resource related to this.

BTW thanks for the package.

@joyhope
Copy link

joyhope commented Nov 16, 2023

In fact, it is a little complicated. There is a negotiation between PHONE (BLE SERVER) and the device for the interval, MTU, and some other communication parameters. If you could control your device's BLE code, and then you could adjust BLE data performance, otherwise nothing could be improved. These parameters are much more important than the BLE library.

@chipweinberger
Copy link
Owner

chipweinberger commented Nov 16, 2023

also, it will be faster if your ble device supports notifications & you use setNotifyValue and onValueReceived.

@chipweinberger
Copy link
Owner

closing because there is nothing more for FBP to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help Questions, help, observations, or possible bugs
Projects
None yet
Development

No branches or pull requests

3 participants