There is a String Packet in which data is written a la FA0023CC and byte[] P = new byte[Packet.length()/2] array byte[] P = new byte[Packet.length()/2] into which you need to drive data by type 0xFA 0x00 0x23 0xCC I write bytes in this way:
P[i]= (byte) ((Character.digit(Packet.charAt(i*2), 16) << 4) + Character.digit(Packet.charAt(i*2+1), 16)); where i is the byte number, everything reads correctly until I encounter bytes larger than 7F, starting from 80 they for some reason become negative and go in the opposite direction (if you convert 0x80, 0x81, 0x82 to int, it will not be 128, 129, 130, a -128, -127, -126, etc.)
unsigned bytetype, but there is no such thing in Java. What's the question? - Enikeyschikif (P[i]==0xFF)comparison worked correctly, if the FF string was considered, and now the comparison only works correctly with 7F numbers - nikolay-rudavin