I install JSerial. I open an serial object assigned to the com1 port and connected an asyncStream to the serial object.
The serial object is set to receive and input stream and transmit on an output stream.
How can I tell if the printer is receiving data?
B4X:
sp.Open(cmbPort.Value)
astream.InitializePrefix(sp.GetInputStream, True, sp.GetOutputStream, "astream")
Sub senddata(Data As String)
Dim buffer() As Byte =Data.getbytes("UTF8")
astream.Write(buffer)
EndSub