Qt on TK1 -- QSerialPort result in error

  • I got a TK1 with L4T 14.04 ubuntu, and install qt5 by using

    sudo apt-get install build-essential qt5-default qtcreator -y

    Since I wanna read serial port data from Arduino Tx output, I have to install libqt5SerialPort !

    So~ I install it by using

    sudo apt-get install libqt5serialport5-dev

    Everything seemed to be good, until I start coding.

    I just open a new project with mainWindow (also tried dialog later) ,
    and add
    Qt += serialport Compile --> passed

    #include <QSerialPort> Compile --> ERROR!!!!

    and even I delete the include, it still failed!!

    here is my Error Msg :

    /usr/bin/ld: cannot find -ludev
    collect2: error: ld returned 1 exit status
    make: *** [Test1] Error 1
    15:34:47: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project Test1 (kit: Desktop)
    When executing step 'Make'
    15:34:47: Elapsed time: 00:05.

    Can anyone help ?? TK1 is so.....unfriendly, BTW.

  • Lifetime Qt Champion


    From the error message, you need to install the udev dev package

  • @SGaist Oh~!! Thanks~! I fixed the problem now, thanks a lot!!

    BTW, Do u know how can I use Qt to receive the data passed by Arduino Tx pin ??

    I can detect the arduino by USB Port (ttyACM0) use QSerialPort, but I don't know how to detect Pins on TK1 / Rasp Pi by Qt.
    Also use QSerialPort lib. ?

  • Lifetime Qt Champion

    Do you mean receive the data sent by the Arduino ?

    If so, use the readyReady signal to get notified when something arrived.

  • Hi..i am a new user here. By profession i am a hardware design engineer. As suggested i think you should use that udev dev package. Also you can do another thing and that is try to update your libraries.

    pcb assambly

  • @NeilKeiding
    yup, I download the package and the problem fixed.
    thanks a lot.

  • @SGaist
    Yes, I wnat to receive from Arduino, and I finally used the FTDI converter to transfer RS232 to USB.
    and yes, ReadyRead is useful.
    Thanks for helping.

  • Lifetime Qt Champion

    You're welcome !

    Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

Log in to reply