Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P2: Important
-
Resolution: Out of scope
-
Affects Version/s: 5.12.4
-
Fix Version/s: None
-
Component/s: Serial Port
-
Environment:Ubuntu 16.04 on x86, Raspberry Pi 3
-
Platform/s:
Description
When data is written by QSerialPort, there is still data in buffer or not complete to write data even QSerialPort::bytesToWrite is 0 after calling QSerialPort::write.
Reproducible steps:
- Using cross cable.
/dev/ttyUSB0 /dev/ttyUSB1 (FT232R 1) (FT232R 2) TXD ----------- RXD RXD ----------- TXD GND ----------- GND
- Create data
$ base64 qtserialport-everywhere-src-5.12.3.tar.xz > INPUT $ wc -c INPUT 408968 INPUT
- Using creadersync and cwritersync which are contained examples for Qt SerialPort.
$ PATH/TO/examples/serialport/creadersync/creadersync ttyUSB1 9600 | sed -e '1 d' > OUTPUT & [1] 00000 00000 $ cat INPUT | PATH/TO/examples/serialport/cwritersync/cwritersync ttyUSB0 9600 Data successfully sent to port ttyUSB0 $ [1] + 00000 done ./creadersync/creadersync ttyUSB1 | 00000 done sed -e '1 d' > ./OUTPUT $
Actual: cwritersync is terminated even though it has not completed writing, then read data by creadersync is dropped.$ wc -c OUTPUT 5381 OUTPUT
Expected: Get actual timing to complete writing data.