I've got problem with LSB and MSB during sending request to the device. I need to send sessionId(int). It needs to be send on four bytes. Right now I'm sending byte array like this :
So , for example if sessionID is 14 I'm sending :
public static final byte[] intToByteArray(int value) {
return new byte[] {
(byte)(value >>> 24),
(byte)(value >>> 16),
(byte)(value >>> 8),
(byte)value};
}
byteData[36] - 0
byteData[37] - 0
byteData[38] - 0
byteData[39] - 14
The problem is - I need to set byteData[36] as LSB and byteData[39] as MSB. Could you help me with this ? Thanks in advance :)