Using b4j or b4a I try using Astream object writing byte sequence dim b() as byte
b(0) = 40
b(1) = 1
b(2) = 126
b(3) = 10
b(4) = 1
b(5) = 7
astream.Write( b)
works !!
b(0) = 40
b(1) = 1
b(2) = 234
b(3) = 228
b(4) = 1
b(5) = 7
astream.Write( b)
does not works !!!
I also try sendig word instead of byte with following code with no result !!
dim b(6) as string
Dim bc As ByteConverter
dim J as int
For J = 0 To 6
Dim I As Short = data(J)
Dim bytes() As Byte = bc.ShortsToBytes(Array As Short(I))
Try
If astream.Write( bytes) Then
' ...
Else
' ...
End If
Catch
Log("error ...")
End Try
Next