Problems with QSerialPort
-
Hello :)
I have several problems for QSerialPort in Windows 10 and version qt 6.6.0
First, I have a question about using QSerialPort.
In Windows I understand that for the communication between the program and the device to work I have to set "serialport" as open and then:
_serial_port->setDataTerminalReady(true);
But it is always false and never changes anywhere in the program.
I don't know if you have modified this over time or if it is a bug or if it is the cause of:
When I request data from the device, at "random" times, the device crashes and returns nothing.
And I have checked with other "realterm" type programs and it works perfect so the device is fine.
But in QT, it fails.
Example using QT + Telnet:
As you can see, for example, it fails and it doesnt return "64" when i say "gf" in random moments.
So i want to know if it its a bug from QT in windows or whatever...Code of the config:
I hope we can solve it in case it is a bug.
All the best. -
@AlbertoMonreal first of all remove setDataTerminalReady because you do not need it to read data in serial port.
Now when ready read signal is emitted, read your data. -
Hi and welcome to devnet,
setDataTerminalReady
is not mandatory for all serial ports.Did you try without it as well ?
Another thing you can check is with a previous version of Qt to see if something has changed in between.
-
@Ronel_qtmaster It doesnt matter. I tried everything(tru,false,deleting....everything) and it doesnt work correctly.
I think that it is a bug. But i need that someone in "QT group" check it. -
@SGaist yeah, but it doesnt matter. True,false or deleting. The console shows the same problem. The response is always the same, the device does not respond well to some of the requests randomly (as I show in the photo).
By telling you about randomly, it only makes me think that it is a bug.
But i need to be sure 100% about that because i am trying to do this for my company.And about testing versions, I once saw that in 5.3 there are usually no errors but it didn't work for me either. I guess I could try several versions... I don't lose anything, right? Haha
But I would like that "QT group" could confirm 100% that it is a bug and see if it can be solved or not.
Best regards :) -
This lead to QTBUG-123768