Prob.
bytearray.toHex().data() stores each nibble as one byte. Like for 0x1d it stores 1 and d in differetn bytes. i want them to be one hex val. please help.
udpRecv.readDatagram(datagram.data(), datagram.size(), &sender, &senderPort);
qDebug()<<"size of rx byte array: "<<datagram.size();
temporary = datagram.toHex();
qDebug()<<temporary.size();
udpRecv.readDatagram(datagram.data(), datagram.size(), &sender, &senderPort);
qDebug()<<"size of rx byte array: "<<datagram.size();
QByteArray temporary;
temporary = datagram.toHex();
qDebug()<<temporary.size();
To copy to clipboard, switch view to plain text mode
This gives :
size of rx byte array: 29
58
toHex() gives a double sized byte array 
Hey some of the posts went away form between. I solved the above prob. Wysota was right no text file has hex. so I did a c prog and used strtoul() func to get hex data. Next Now m reading from UDP sock in a bytestream now I want to process the byte stream byte by byte and want to compare these bytes to some fixed value. But the above prob.
Bookmarks