I might have missed it somewhere, but how do you send and receive hex data over the async prefix mode?
Sub Globals
[...]
Dim BConv As ByteConverter ' Needs ByteConverter library
End Sub
Sub btnSend_Click
AStream.Write(BConv.HexToBytes(txtInput.Text.Replace(" ", "")))
[...]
End Sub
Sub AStream_NewData (Buffer() As Byte)
LogMessage("You", BConv.HexFromBytes(Buffer))
End Sub
There are 3 control bytes + a checksum byte in the beginning of the arrived array of bytes (00 00 00 nn).
I removed the "prefix" but didn't work.
If AStream.IsInitialized = False Then
'AStream.InitializePrefix(Main.serial1.InputStream, True, Main.serial1.OutputStream, "AStream")
AStream.Initialize(Main.serial1.InputStream, True, Main.serial1.OutputStream, "AStream")
End If