Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. [SOLVED] QT Serial Communication with Beaglebone
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QT Serial Communication with Beaglebone

Scheduled Pinned Locked Moved 3rd Party Software
22 Posts 3 Posters 12.5k 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.
  • S Offline
    S Offline
    seiko
    wrote on last edited by
    #13

    first of all check qt doc link "check qt doc link...":http://qt-project.org/wiki/QtSerialPort and re-extract to get a clean dir of QtSerialPort
    because what I see here from your log
    looks like duplicated qmake or you moc version isn't the same as qmake
    @
    /home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:14:2: error: #error “This file was generated using the moc from 4.6.3. It”
    /home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:15:2: error: #error “cannot be used with the include files from this version of Qt.”
    /home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:16:2:
    @
    check your moc version
    @
    /opt/qt/bin/moc -v
    @
    Also your qtopia using old qt flags
    @
    WARNING: /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/share/qtopia/mkspecs/common/g++.conf:44: Variable QMAKE_RPATH is deprecated; use QMAKE_LFLAGS_RPATH instead.
    WARNING: /usr/local/angstrom/arm/arm-angstrom-linux-
    @

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Tilapia21
      wrote on last edited by
      #14

      Qt Meta Object Compiler version 63 (Qt 4.8.2)

      Would it help if I uninstall qt4-emebedded ?

      I think it has worked this time.
      So I downloaded qt-qtserialport once more and extracted it.
      Then :
      @cd ~/Downloads/qt-qtserialport
      /opt/qt/bin/qmake ~/Downloads/qt-qtserialport/qtserialport.pro
      make
      sudo make install
      @
      and it finished without errors. I'm gonna check how it's going in QTCreator.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tilapia21
        wrote on last edited by
        #15

        Ok, last step would be having it in QtCreator obviously.

        When I add :
        #include <QtSerialPort/QSerialPort>
        #include <QtSerialPort/QSerialInfo>
        and try to build, it says :
        No such file or directory.
        Another parameter to configure ?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          seiko
          wrote on last edited by
          #16

          Because you forget to add
          @
          CONFIG += serialport
          @
          in your .pro file

          Note: CONFIG += serialport must be the first or second line in your .pro file.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            seiko
            wrote on last edited by
            #17

            Would it help if I uninstall qt4-emebedded ?
            I don't think so , If you upgraded your qt version to 4.8 so your qt4-emebedded gonna upgraded too

            [quote author="Tilapia21" date="1391776804"]
            I think it has worked this time.
            So I downloaded qt-qtserialport once more and extracted it.
            Then :
            @cd ~/Downloads/qt-qtserialport
            /opt/qt/bin/qmake ~/Downloads/qt-qtserialport/qtserialport.pro
            make
            sudo make install
            @
            and it finished without errors. I'm gonna check how it's going in QTCreator.[/quote]

            Here was my guess you used qmake version 4.6.3 then after you upgrade
            you used qmake version 4.8.2 without clean the old moc files and MakeFile

            so I think everything gonna work fine with you this time

            1 Reply Last reply
            0
            • T Offline
              T Offline
              Tilapia21
              wrote on last edited by
              #18

              Sorry, I forgot to mention I had done it too.

              @QT += core gui
              CONFIG += serialport
              greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

              TARGET = QTTest2
              target.files = QTTest2
              target.path = /home/root

              INSTALLS += target
              TEMPLATE = app

              SOURCES += main.cpp
              mainwindow.cpp

              HEADERS += mainwindow.h

              FORMS += mainwindow.ui@

              1 Reply Last reply
              0
              • S Offline
                S Offline
                seiko
                wrote on last edited by
                #19

                Well in that case qt creator has different qmake
                since you had been upgraded your qt you have to add a new qt kit
                for /opt/qt/bin/qmake and make it a default qt for your project

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  Tilapia21
                  wrote on last edited by
                  #20

                  You're right it had gone back to qt 4.6.3 qmake.
                  All errors have disappeared.
                  I'm gonne make a small test program and mark this subject as solved if everything goes fine.

                  Thank you for your help ! Great community !
                  Special thanks to you seiko !

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    Tilapia21
                    wrote on last edited by
                    #21

                    Ok, just a last problem then I think I'll be ready to fly on my own.

                    I compiled the "terminal" example and it was displayed on the beaglebone screen. But I wanted to change the mainWindow resolution cause the example was really small and I should have made sth wrong cause now I get this error :

                    16:06:32: Running steps for project terminal...
                    16:06:32: Configuration unchanged, skipping qmake step.
                    16:06:32: Starting: "/usr/bin/make"
                    arm-angstrom-linux-gnueabi-g++ -Wl,-rpath-link,/opt/qt/lib -o terminal main.o mainwindow.o settingsdialog.o console.o moc_mainwindow.o moc_settingsdialog.o moc_console.o qrc_terminal.o -L/home/julian/Downloads/qt-qtserialport/src/serialport -L/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/lib -lglib-2.0 -lQtSerialPort -lQtGui -lQtCore -lpthread
                    /usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lQtGui
                    collect2: ld returned 1 exit status
                    make: *** [terminal] Error 1
                    16:06:32: The process "/usr/bin/make" exited with code 2.
                    Error while building/deploying project terminal (kit: BeagleboneKit)
                    When executing step 'Make'
                    16:06:32: Elapsed time: 00:00.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      seiko
                      wrote on last edited by
                      #22

                      @
                      /usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lQtGui
                      collect2: ld returned 1 exit status
                      @
                      the linker can't find QtGui because in follow directory you should have
                      QT library and I don't why qt qmake didn't even provide the path of lib maybe you should recall qmake
                      @
                      /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib
                      @

                      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