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

only receiving 20 bytes at a time #19

Open
Zapnologica opened this issue Jan 20, 2021 · 3 comments
Open

only receiving 20 bytes at a time #19

Zapnologica opened this issue Jan 20, 2021 · 3 comments
Labels
question Further information is requested

Comments

@Zapnologica
Copy link

Good day,

I am using your code library. (Thank you by the way for this, very helpful)

however I am having an issue when I get larger responses like 60bytes etc, the receive callback is only getting a byte array of 20 characters?

What could be causing this?

@kai-morich
Copy link
Owner

the default BLE payload size is 20 byte. Only some devices can handle larger size. This is negotiated during connection setup. Longer data is split into appropriate chunks.

@Zapnologica
Copy link
Author

I see that is very interesting.

Does the serial socket not buffer those 20byte segments back into a complete packet?

@kai-morich
Copy link
Owner

the bluetooth stack only knows about these 20byte packets. you have to reconstruct your logical request by knowing your protocol

@kai-morich kai-morich added the question Further information is requested label Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants