If your board wait an only character, may be this loop is too fast, so your microcontroller program considere it a many chars. Have you tried to add a sleep between successive writes ?
Addy Tas, suggest to read in another thread, i agree. But the mono-threaded microcontroller probably do not need that. I have the intuition you can simply block while getting your replies.
You can easily wait using a loop like this one :
Which is a dangerous inifnite loop if nothing happend, can be worked around with something like this (i don't have the code here, but it should be something like that)
public int WaitForData(int NbDataToWait, int Timeout)
int timeWaited = 0;
int timeToWait = 1;
while (timeWaited < Timeout && MyCompPort.BytesToRead < NbDataToWait)
timeWaited += timeToWait ;