Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.2.1
-
None
-
MacOSX, Linux, Unix
-
63d3fc0c0679a801da54cf390728120338fbd187
Description
When an opened device does not implement all the features of a "true" serial port, some settings may not work. Thus, the following:
if (!d->setBaudRate() || !d->setDataBits(d->dataBits) || !d->setParity(d->parity) || !d->setStopBits(d->stopBits) || !d->setFlowControl(d->flowControl)) { // || !d->setDataTerminalReady(d->dataTerminalReady) // THIS FAILS // || !d->setRequestToSend(d->requestToSend)) { // THIS FAILS AS WELL close(); return false; }
will end up closing a working serial port. For example, a PTY serial port opened by socat will not necessarily have DTR and RTS working. Thus, I suggest that in case those fail, we leave the serial port opening, and emit an error to the user so he can decide to deal or not with the problem.
Attachments
For Gerrit Dashboard: QTBUG-38640 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
84232,9 | Prevent serial port settings to close the port if it's a PTY | dev | qt/qtserialport | Status: ABANDONED | -2 | 0 |
85807,7 | Initialize dataTerminalReady and requestToSend. | stable | qt/qtserialport | Status: MERGED | +2 | 0 |