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

QSerialPort: Syscall param ioctl(request) contains uninitialised byte, can't read from serial port

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.3.0
    • Fix Version/s: 5.3.1
    • Component/s: Serial Port
    • Labels:
      None
    • Environment:
      Linux calado 3.14.6-1-ARCH #1 SMP PREEMPT Sun Jun 8 10:08:38 CEST 2014 x86_64 GNU/Linux

      gcc (GCC) 4.9.0 20140604
      valgrind-3.9.0

      Description

      Hello everyone and thanks in advance,

      I am able to find the port I want with QSerialPortInfo::availablePorts(),
      let's call it "myport" then I pass it on to:

      m_uart = new QSerialPort();
      m_uart->setPort(myport);

      I configure some stuff

      m_uart->setDataBits(QSerialPort::Data8);
      m_uart->setBaudRate(921600);
      m_uart->setStopBits(QSerialPort::OneStop);

      (I have tried setting the baud rate both before and after opening the device)

      Then I open it while testing
      if (m_uart->open(QIODevice::ReadWrite))

      I get no error whatsoever.
      However, I am unable to read any data from the serial port with this 5.3.0 version, while the 5.2.1-4 works perfectly, as well as other previous versions have been working for several months now.
      The device blinks LEDs when I try to communicate which tells me it is receiving the data, but I am unable to read its output.

      I have tested the device separately and am sure it is working properly. As I mentioned before, simply downgrading makes the issue go away.

      The device is an FTDI chip, I have the following udev rule
      SUBSYSTEM=="usb", ATTR

      {idVendor}

      =="0403", ATTR

      {idProduct}

      =="6001", GROUP="adm", MODE="0666"

      Moreover, when I run the program, valgrind gives me the following output:
      ==6727== Syscall param ioctl(request) contains uninitialised byte(s)
      ==6727== at 0x6FA7E47: ioctl (in /usr/lib/libc-2.19.so)
      ==6727== by 0x568DB71: ??? (in /usr/lib/libQt5SerialPort.so.5.3.0)
      ==6727== by 0x568C3D1: QSerialPort::open(QFlags<QIODevice::OpenModeFlag>) (in /usr/lib/libQt5SerialPort.so.5.3.0)

      which does not show with 5.2.1

      Please let me know if there is any info missing, if so my apologies.

        Attachments

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

          Activity

            People

            Assignee:
            lpapp Laszlo Papp
            Reporter:
            pdcalado Pedro Calado
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes