Serial Communication - How to read large bytes of data

soleilsword:
I need to send a command "+++" to interrrupt my host device before requesting a data.

I suspect you only need to send that once for every message. And DO NOT read data outside recvWithStartEndMarkers().

Keep in mind that the function recvWithStartEndMarkers() may need to be callled several times to get the whole of a single message.

The way you are doing things it seems to me you are sending the "+++" in the middle of receiving a message.

I suggest you only send the "+++" if (newData == true) and before you set it back to false. That way you will only be sending the "+++" after a complete message is received.

...R