I read data with Hercules_3-2-6 Application (rs232 terminal software) http://www.qtcentre.org/threads/6510...nother-program
I read data with Hercules_3-2-6 Application (rs232 terminal software) http://www.qtcentre.org/threads/6510...nother-program
My program worked today, and I have not any error.
But I do not any change to program.
When I run program,
program connects to port successfully, but I receive just one data (space).
But when I close this program and open Hercules_3-2-6 Application (rs232 terminal software), that application read data,
and after close Hercules_3-2-6 application and open terminal example again, this program works and reads data until restarting computer.
I repeat this process many times.
But my project does not receive data after restarting system until port opens one time by Hercules_3-2-6 Application.
Meanwhile I have virtual USB COM port and my hardware connected to computer with USB.
Last edited by neda; 7th February 2016 at 07:19.
I wrote a .net program.It worked very well likes to Hercules_3-2-6 Application and qt program worked after opening the program.
Is it bug of Qt 5.5.1 ?![]()
![]()
I added this line for handle error port.
voidMySerialPort::handleError(QSerialPort::SerialP ortErrorerror)
{
qDebug()<<"Error:"<<error;//I added this line
if(error==QSerialPort::ResourceError)
{
showStatusMessage(serial->errorString());
closeSerialPort();
}
}
Result of run program:
Error: 0
"Connectedd"
Error: 6
"\x00"
Just sometimes I have error 6.
How do I fix break condition error?
> How do I fix break condition error?
Nohow. It is HW/driver issue.
UPD: Future Qt 5.6.0 won't be process the Parity/Frame and BreakCondition errors anymore. So, you can try QtSeriaslPort from 5.6.0 branch.
neda (10th February 2016)
> Of course,My program is problem because other programs (C# .net , Hercules) work very well.
So what? Maybe they (those programs) do not trace the EV_ERR event flag. This flag coming from the device driver, and QtSerialPort < 5.6 handles this error when it is occurred.
> My problem is bug of QSerialPort?
You problem is bug of HW/driver of device.
neda (10th February 2016)
Thanks you very much.
Your answer was a big help for me.
serial->setDataTerminalReady(false);
Bookmarks