B4J Question Astreams, strange error

saunwin

Active Member
Licensed User
Longtime User
Hi All,
I have a micro sending 136 bytes of data to a com port.

AStream_NewData (Buffer() As Byte)
Dim msg As String = conv.HexFromBytes(Buffer)
Log (msg.Length)

As demonstrated above I log the message length (for debug purposes) and 99% of the time I get the 136 bytes.
Occasionally I get an array error (further into the routine) and the reason is - msg length reports only 124 bytes were received.
I've used realterm (com port terminal program) to request (from the microcontroller), the 136 byte string and I ALWAYS get 136 bytes, so it must be B4J.

Any ideas ?
Thanks in advance.
 

saunwin

Active Member
Licensed User
Longtime User
Thanks Erel - Looks like prefix mode is the way to go and put the 4 header bytes on the microcontroller string.Thanks for steering me straight Erel. Much appreciated.
 
Upvote 0
Top