When sending 2 Bytes (a QByteArray) through a QTcpSocket, using the methods write(QByteArray) and readAll.
In the write side, the debugger shows the values:
Qt Code:
  1. -21 / 235
  2. -112 / 144
To copy to clipboard, switch view to plain text mode 
In the read side, the debugger shows the same values, as expected.
But When the same Bytes are sent through the QSerialPort, using the methods write(QByteArray) and readAll, a difference is noted.
In the write side, the debugger shows the values as above.
And in the read side, it shows:
Qt Code:
  1. 107 'k'
  2. 16
To copy to clipboard, switch view to plain text mode 

Why? How to convert from
Qt Code:
  1. 107 'k'
  2. 16
To copy to clipboard, switch view to plain text mode 
to
Qt Code:
  1. -21 / 235
  2. -112 / 144
To copy to clipboard, switch view to plain text mode 
?

Thanks for the attention