A bit of an odd one here. I'm sending an image file from a raspberry pi over serial connected via USB to another machine. I have a Qt thread that receives the data and writes it to an image file. Everything is working but its very slow. I'm currently sending a 320x240 image and it takes 20 seconds.
The pi side uses Termios to make the connection and logs any errors and its currently logging 6 million errors of 'resource busy' for 230400 byte transfer.
I don't do checksums now. The software works as a 3D laserline scanner.
The laser intersects a point on an object and this point is calculated using triangulation from the brightest pixel on the row of the image. This yields a xyz coordinate and a pixel colour. This information is transferred over serial in a predetermined format such as <X:Y:Z:C>. The receiving machine can check if the format has been maintained and the data is complete. if not it can discard that point.
It seems to get 100% success with transfer of the data. worst case is a few points are discarded from up to 1 million points.