-
Notifications
You must be signed in to change notification settings - Fork 49
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
Webserial must open a large size buffer to transmit data #166
Comments
The What you might be running into is #123, where because at most
|
This works. |
Well. Thanks for you reply, i think we're good on windows. |
There is a performance penalty but it is unavoidable in order to work around this particularly picky device behavior. The firmware should be fixed to not make invalid assumptions about how the driver constructs USB packets from the data provided by the application. |
Yeah. You're right. |
Let say I need to transfer 1MB data to my device. And the protocol between device and host is "sending 4096 bytes data, device return OK, and then send another 4096 data, repeat it until all data sent"
The persudo code is like:
Since i only send 4096 bytes everytime. I think 8192 bytes buffer is enough.
However i found only
bufferSize: 1024*1024
works (e.g. the total size i need to transfer). If i set it to 8192 bytes, the device will send me an error when i sent third 4096 packet. (Seems the device think i'm done sending data.)Did i miss anything on that? What if i need to transfer 1GB file?
The text was updated successfully, but these errors were encountered: