Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-77075

There is no way to know actual completing write data by QSerialPort

    XMLWordPrintable

Details

    • Linux/Wayland, Linux/X11

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kuzulis Denis Shienkov
            akizawa Akihito Izawa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes