Unable to read hex bytes from serial interface in Qt Creator
Unsolved
India
-
I am trying to read the data from modem in Qt through serial interface. While doing so, I am able to read the data till no hex byte is encountered. After that I fail to read the data!
Sample Code attached here :
QString a=0,Received_response=0 if(serialDataAvail(fd)) { a=serialGetchar(fd); Received_response.append(a); }
Is there any limitation for QString (datatype) that it can't read the hex data?
Or is there any other method to grab the hex bytes through serial interface in Qt ?
-
@SHUBHAM-SINGH-RAO
you need to be more specific. But I can say with a high certainty that you're doing stuff wrong, or at the very least not what you want to do.What is transferred via serial port?
Is it ascii characters representing hex values or can it be any arbitrary byte ?