I am trying to read the data sent by a device plug via usb.First i read the data via this command
Active2 years, 7 months ago
Detailed Description Use the static functions to generate a list of QSerialPortInfo objects. Each QSerialPortInfo object in the list represents a single serial port and can be queried for the port name, system location, description, and manufacturer. Hi, I want to read data from serial port which is connected to incidcator. The indicator sends 8 bits. Letter like 'A' or 'B' 2-7 numbers Carriage return. I read the serial port without problem. Like below code; serial = new QSerialPort(this); seria. Qt Serial Port provides the basic functionality, which includes configuring, I/O operations, getting and setting the control signals of the RS-232 pinouts. The following items are not supported by this module: Terminal features, such as echo, control CR/LF, and so on. Configuring timeouts and delays while reading or writing.
Sudha Murthy Wise&Otherwise.pdf - Free download as PDF File (.pdf) or read online for free. Scribd is the world's largest social reading and publishing site. Search Search. Hello Friends, Looking For Download Free 'Grandma's Bag of Stories' by Sudha Murty Book PDF? As soon many exams is in schedule like and students are looking for notes for written exams so Jobsfundaz team would be giving you the free PDF eBooks for the various exams.
![]()
And the data are like this
Now i want to read the data via a Qt5.3 program
Qt Serial Port Read Data Example
and the answer is ->
So there is no data catch by my program ..My questions are :
Thanks to mike i can finaly read this usb device !!!here is my final code
Serial Port Cable
tlebreton
tlebretontlebreton
1 Answer
Most IO functions in Qt are asynchronous. This means that
readAll() does not wait for data to arrive. Instead, it returns currently available data (data that can be read from the device without waiting). Currently, You are just calling readAll in an endless loop (this makes the thread, spend all its time in this loop, unable to receive the new data that may have arrived. . .)
![]()
You need to call
readAll only when you know that new data has arrived. This can be accomplished in two ways:
Qt Serial Port Read Input
6,28511 gold badge1515 silver badges3333 bronze badges
Qt Serial Port Not ReadingNot the answer you're looking for? Browse other questions tagged c++qtserial-portqt5qtserialport or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |