Hallo
I am sending a bluetooth string to a device (Lego NXT) using ByteToString, for example:
Dim text As String
Dim Byt(10) As Byte
Dim conv As ByteConverter
Byt(0)=6
Byt(1)=0
Byt(2)=0
Byt(3)=3
Byt(4)=232
Byt(5)=3
Byt(6)=244
Byt(7)=1
Byt(8)=0
text = BytesToString(Byt,0,9,"ISO-8859-1")
Looking at the string with hexa reader (after sent to file) it seems that the Byt(4) and Byt(6) are written in the string with two Byte instead of one (for example 232 should be E8 but I find C3 and A8).
It is strange (for me) that if I check for the "text" string lenght the results is 9 but the string sent via bluetooth or to a file is 11 byte long.
I read some post with similar issue, but I did not find a solution that works for me. May be that this is for my small experience but I can't find a solution :BangHead: (I tried also with chr() function but the result is the same).
Thank you
I am sending a bluetooth string to a device (Lego NXT) using ByteToString, for example:
Dim text As String
Dim Byt(10) As Byte
Dim conv As ByteConverter
Byt(0)=6
Byt(1)=0
Byt(2)=0
Byt(3)=3
Byt(4)=232
Byt(5)=3
Byt(6)=244
Byt(7)=1
Byt(8)=0
text = BytesToString(Byt,0,9,"ISO-8859-1")
Looking at the string with hexa reader (after sent to file) it seems that the Byt(4) and Byt(6) are written in the string with two Byte instead of one (for example 232 should be E8 but I find C3 and A8).
It is strange (for me) that if I check for the "text" string lenght the results is 9 but the string sent via bluetooth or to a file is 11 byte long.
I read some post with similar issue, but I did not find a solution that works for me. May be that this is for my small experience but I can't find a solution :BangHead: (I tried also with chr() function but the result is the same).
Thank you