Serial.ReadAll reading transmitted data as well as received. Just want Received.

Hi - I’m evaluating Xojo for an application I’m tasked with writing that communicates with a device over USB/serial. I’ve got a small application running that takes the text in a text box and writes it to the serial port:

If Serial1.Open Then
Serial1.Write(TextToSend.Text + chr(13) )
Serial1.XmitWait
Serial1.Flush
Else
MsgBox(“The serial port could not be opened.”)
End If

And on DataAvailable event, the serial port writes the received bytes to a different text area.:

TextArea1.Text = TextArea1.Text + Me.ReadAll(Encodings.ASCII)

This is working, communications are going fine back and forth. My issue is that the TextToSend.Text is also being read into the TextArea1.Text. I would have thought the Serial.ReadAll method would only read the receive buffer of the serial port, but I seem to be getting the transmitted data as well, which I do not want. Any advice?

Why do you need a flush?
Just let write do it asynchronously.

I user serial devices all the time and haven’t encountered that problem.
Make sure your device isn’t in echo mode.

D’oh! Thank you John, you were correct, turns out my device echos by default. Oops.