Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt on TK1 -- QSerialPort result in error
Forum Updated to NodeBB v4.3 + New Features

Qt on TK1 -- QSerialPort result in error

Scheduled Pinned Locked Moved Solved Mobile and Embedded
8 Posts 3 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Phong
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      P 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

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

        P Offline
        P Offline
        Phong
        wrote on last edited by
        #3

        @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. ?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Do you mean receive the data sent by the Arduino ?

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

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          P 1 Reply Last reply
          0
          • NeilKeidingN Offline
            NeilKeidingN Offline
            NeilKeiding
            wrote on last edited by NeilKeiding
            #5

            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

            P 1 Reply Last reply
            0
            • NeilKeidingN NeilKeiding

              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

              P Offline
              P Offline
              Phong
              wrote on last edited by
              #6

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

              1 Reply Last reply
              0
              • SGaistS SGaist

                Do you mean receive the data sent by the Arduino ?

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

                P Offline
                P Offline
                Phong
                wrote on last edited by
                #7

                @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.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  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 :)

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved