This is what i am doing to retrieve data from rs 232 terminal. The data is continues i keep getting the data from the embbeded system.
if(port->bytesAvailable())
{
numBytes = port->bytesAvailable();
if(numBytes > sizeof(buff))
numBytes = sizeof(buff);
i = port->read(buff,numBytes);
if(port->bytesAvailable())
{
numBytes = port->bytesAvailable();
if(numBytes > sizeof(buff))
numBytes = sizeof(buff);
i = port->read(buff,numBytes);
QByteArray data = (QByteArray::fromRawData(buff,numBytes)).toHex();
To copy to clipboard, switch view to plain text mode
Bookmarks