Quote Originally Posted by wysota View Post
As far as I remember bytesAvailable() doesn't work with QExtSerialPort.
supposed that bytesAvailable() doesn't work ,i amend my code as:

Qt Code:
  1. RS232->writeData(Data,13); //write data
  2. usleep(120000); //wait
  3.  
  4. int i= RS232->QIODevice::bytesAvailable();//if there are bytes availble to read
  5.  
  6. QString str;
  7. str.setNum(i);
  8. Com->setText(str);//show the bytes availble to read on the 'Com' Button
  9.  
  10. char *pStr=NULL;
  11. RS232->read(pStr,13); //read data from serial port to pStr
  12. Com1->setText(pStr); //show the data on 'Com1' Button
  13. RS232->close();
To copy to clipboard, switch view to plain text mode 
i still can't get any data! why?

to zeratul: i don't use the serial monitor.