B4J Question Serial data send

besoft

Active Member
Licensed User
Longtime User
Through serial port i send data : "L1"&CHR(255).If I look at the terminal, get on the output of a different sign as if sent from Visual Basic.
I suppose that is different ASCII table.This happens from the sign CHR(127) forward.

How can I change this table?

THX
 

besoft

Active Member
Licensed User
Longtime User
Solved

Instead of :
B4X:
astream.Write(("L1" & Chr(Round2(L1_S.Value, 0)) & Chr(13) & Chr(10)).GetBytes("UTF-8"))

I used:
B4X:
astream.Write(("L1" & Chr(Round2(L1_S.Value, 0)) & Chr(13) & Chr(10)).GetBytes("Windows-1252"))

Everything works as intended

THX
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…