Which device are you using? What do you mean with mirrored?
I use the industrial Android tablet with Android 4.1 that has 4 Uarts. I connect UART0 to PC COM port and use the PC program UART Terminal. In Android I use the following code:
Dim fo As OutputStream
Dim fi As InputStream
fo = File.OpenOutput("/dev/ttyS0", "", False)
fi = File.OpenInput("/dev/ttyS0", "")
astreams.Initialize(fi,fo,"astreams") 'connect with asyncstream
...
Sub astreams_NewData (Buffer() As Byte)
Log("NewData")
Log(BytesToString(Buffer, 0, Buffer.Length, "UTF8"))
End Sub
...
Sub btnAction_Click
' astreams.Write("abcde".GetBytes("UTF8"))
File.WriteString("/dev/ttyS0", "","abcdefghklm" & CRLF)
End Sub
...
When I send from PC any string(assume "12345" & CRLF) I get it in astreams_NewData, but at the same time it appears in the Receive window of PC Uart Terminal as if Android sent it back. That I mean mirror effect and I want to avoid this.
Using the command File.WriteString("/dev/ttyS0", "","abcdefghklm" & CRLF) I successfully send any data from Android To PC.