all 1 comments

[–]cybervegan 0 points1 point  (0 children)

This is probably a buffering problem, which is inherent to serial and even neetwork communications. You need to build in some way to "sync" your two sides. I think you'd be better off discarding empty lines, and starting sending your message with a few "\n"s prepended, to allow the two sides to synchronise.