Hi friends i am using qextserialport for RS232 communication between a targetboard and a PC. Now i have a serious issue which i am not able to solve. I am receiving data from the target board every thing is fine but when i receive the value " 0x00 " I get null, i am not able to receive it
as it is. When i receive it the byte coming after 0 is taken as a new frame, example - i receive a single frame which is --> 0x04,0x08,0x81,0x00,0x89,0x78 . I get it as 0x04,0x08,0x81 as one frame and 0x89,0x78 as another frame. I wanted this whole thing as a single frame.
When i receive 0x00 i get it as Null. But i wanted the 0x00 to be received as any other hex value.
This is the code i am using to receive.
Qt Code:
  1. char buff[2];
  2. int numBytes;
  3. numBytes = port->bytesAvailable();
  4. int i= port->read(buff, numBytes);
  5. if (i!= -1)
  6. buff[i] = '\0';
  7. else
  8. buff[0] = '\0';
  9. QByteArray msg = buff;
  10. textBrowser->append(msg.toHex());
To copy to clipboard, switch view to plain text mode 

Help me solve this problem. !!

Thank You