Android Question Bluetooth serial port, Async stream without prefix

peacemaker

Expert
Licensed User
Longtime User
Hi,

Receiving from port

B4X:
Sub AStream_NewData (Buffer() As Byte)
ProgressDialogHide
Dim a As String
a = BytesToString(Buffer, 0, Buffer.Length, "UTF8")

and buffer is always different length, the string "test" sent is received letter by letter in this sub. Sometime 2 letters together, and later others one by one.

How to be sure that whole the reply is fully received ?
 

peacemaker

Expert
Licensed User
Longtime User
Thanks, Erel,
But how to be if the other side is the ready device working with some fixed system prefix "qwerty" ? And CRLF not used.
 
Upvote 0
Top