wjwwood / serial

Cross-platform, Serial Port library written in C++
http://wjwwood.github.com/serial/
MIT License
2.11k stars 1.03k forks source link

Question : Do I need to add some protocol for large bulk of data? #225

Closed Hish15 closed 3 years ago

Hish15 commented 4 years ago

I want to send a frame with 12kB to a USB 2.0 Full Speed capable device.

Is there a risk of frame loss in the process or worse of packets inversion?

wjwwood commented 3 years ago

I don't know if you need it or not. I believe it may depend on the devices being used, but it would be best to assume at least error in the data is possible. To that end, we usually used a CRC or similar check to ensure what we sent was correctly sent. Afterwards, if you detect something was wrong, a protocol might let you mitigate that better than say, resending everything.

Hope that helps, but since this is more of a question than an issue, I'll close this.