The reason for your problem is that you were trying to convert a byte array to a string.
This may well go fine for all the byte values that map to a char.
However the result is not determined for those byte values that do not map to a char...
As such the only reliable way to represent a byte array as String is as shown above in the code snippet i.e. a hex representation of all its bytes...
I have used the Integer.decode(String mystring) method to parse back to byte...
Integer.decode("0xff");
And the reason that's it's been every 16th message is because the message IDs were being produced sequentially - and every 16th message had a section that had a binary 0 in it (because of math) - and binary zeros tend to cause strings to be terminated. _________________ I am *not* the model of the modern major general.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum