Please try the following code:
obj is an Object from the Door library
serial1 is the SerialPort object.
B4X:
Sub App_Start
serial1.New1
obj.New1(False)
... 'open port
obj.FromLibrary("serial1","sp",B4PObject(2))
Msgbox(GetTX)
End Sub
Sub GetTX
Return obj.GetProperty("BytesToWrite")
End Sub
According to Microsoft documentation it should return the number of bytes in the output buffer.
Is it possible that the data was already sent?
Maybe you should try to continuously send large data and see if the size is greater than zero.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.