Closed GoogleCodeExporter closed 9 years ago
Hi brunoeagle,
Related source code located in qextserialport_win.cpp
http://code.google.com/p/qextserialport/source/browse/src/qextserialport_win.cpp
Open operation can be found in
{{{
QextSerialPortPrivate::open_sys()
}}}
First, we call the system api CreateFileW() to open the serialport. If the
handle it returned is not INVALID_HANDLE_VALUE. The port is considered opend,
and we will return a "true" value.
After the port is opened. we call the system api GetCommState() to get current
DCB contents, and then do some settings for the DCB struct.
Finally, we use system api SetCommConfig(), push the DCB to system again.(code
can be found in QextSerialPortPrivate::updatePortSettings() )
From your description, I think that, the default DCB values that we get using
GetCommState() maybe has something wrong.
Perhaps, your can try to watch the DCB struct in the open_sys() function under
debug mode.
If you can find the reason, we can fix it soon. :-)
Debao.
Original comment by dbzhang...@gmail.com
on 21 Mar 2012 at 8:44
I had exactly the same issue today.
I got it workin on Win XP SP3 32-bit by adding
Win_CommConfig.dcb.fDtrControl=1; after /*set up parameters*/ in open_sys().
Original comment by jarm...@gmail.com
on 22 Mar 2012 at 12:25
Hi jarmovh,
Thanks for your information. I wonder calling following memeber
void setDtr(bool set=true);
after we opened the port will work or not, can you try it too?
Regards,
Debao
Original comment by dbzhang...@gmail.com
on 22 Mar 2012 at 5:57
I had the same problem with a version that I download from somewhere that I
don't remember now: qextserialport-1.2win-alpha... but I don't experiment this
issue after compile the qextserialport-1.2beta1.tar.gz following the step "How
to use(3)".
Original comment by fpbo...@gmail.com
on 27 Mar 2012 at 11:40
Callin the setDtr(true) after opening the port seems to work too.
I was originally using qextserialport-1.2win-alpha and had no problems in my
development environment, but when the software that uses it was deployed to
another machine the problem occured. After switching to latest release the
problem occured in my development environment too.
Original comment by jarm...@gmail.com
on 2 Apr 2012 at 8:44
Original comment by dbzhang...@gmail.com
on 10 Apr 2012 at 8:27
Original issue reported on code.google.com by
brunoea...@gmail.com
on 21 Mar 2012 at 3:50