anda_skoa:I read the data using readall which returns 0 bytes as the return value

nBytesReceived1=m_serialportCoProcessor->readAll();
qDebug()<<"rec1"<<nBytesReceived1.count();

Quote Originally Posted by anda_skoa View Post
How did you determine that your code snippet doesn't show.

Again, using readAll() will give you both the check and the data in one go

Qt Code:
  1. const QByteArray data = m_serialportCoProcessor->readAll();
  2. // check if there was data available
  3. if (data.count() > 0){
  4. // do something with the data
  5. qDebug() << "received" << data.count() << "bytes";
  6. }
To copy to clipboard, switch view to plain text mode 

Cheers,
_