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

Uart is sending very small packed to the peripheral device #93

Open
ethanHuntoo7 opened this issue Apr 18, 2020 · 1 comment
Open

Uart is sending very small packed to the peripheral device #93

ethanHuntoo7 opened this issue Apr 18, 2020 · 1 comment

Comments

@ethanHuntoo7
Copy link

I managed to connect this app with a peripheral and now I can easily send and receive data from this app. This app is sending only 600 characters to other end how can I change the size of packet transfer??

I saw in your code you are using writeResquest.split to send long write but again in split method (inside your library) you are using datasplitter of fixed size that seems like I can't change.

can you give me a solution for sending big data as I heard I can easily send 20 bytes data in ble and also after some changes like request.mtu I can change it to 520 bytes...
please help!

@philips77
Copy link
Member

Hello,
When you use write with response, the app will use long write, which is limited to around 512 (?) bytes. When write without response, using split() will cut your data in MTU-3 bytes long packets and send all of them. There's not limit. On android devices running Android 6 and older, the outgoing buffer may get overflowed. You need to come up with some synchronization mechanism, like a notification (like we have Package Receipt Notification in DFU), or write with response every now and then.

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