Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. install "serialbus" module
Qt 6.12 LTS is out! See what's new in the release blog

install "serialbus" module

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
16 Posts 8 Posters 15.3k Views 3 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.
  • D dfvgergver

    Hello !

    I'm trying to install "serialbus" module. Because, I would like to code a communication between two devices with modbus protocol.

    But it doesn't work.

    I'm working with :

    • Linux Mint 18 OS
    • Qt creator 4.5.2 based on Qt 5.9.5

    Here, my Build & run's configuration :
    0_1550073505609_Screenshot_2019-02-13_16-58-17.png
    I don't know what linux package to install.

    Thank you for your help.
    PP

    Pablo J. RoginaP Offline
    Pablo J. RoginaP Offline
    Pablo J. Rogina
    wrote on last edited by Pablo J. Rogina
    #2

    @dfvgergver not that I've used it myself, but it looks like Qt Modbus support is "built-in" with 5.9 see documentation.

    I don't know what linux package to install
    From Qt standpoint, I guess you should have everything laid out. You might need some driver(s) for any specific card although, I'm not sure.

    Have you tried any of the examples provided? i.e. Modbus slave example 5.9

    I've just tried with Qt 5.12.0 and I was able to at least build the Modbus slave example 5.12 out of the box...

    Upvote the answer(s) that helped you solve the issue
    Use "Topic Tools" button to mark your post as Solved
    Add screenshots via postimage.org
    Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

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

      Hi and welcome to devnet,

      Since you are using your distribution provided Qt, use its package manager to install additional Qt packages.

      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
      1
      • D Offline
        D Offline
        dfvgergver
        wrote on last edited by dfvgergver
        #4

        @Pablo-J-Rogina Yes, i'm agree with you. But I had some doubts :-| . Because it didn't work anyway.

        I tried to launch some modbus examples. But I didn't find them...
        0_1550131770764_Screenshot_2019-02-14_09-08-42.png

        I don't understand why. Because i installed all possible qt examples packages with this command : apt-get install qt.*example.

        @SGaist I installed Qt creator and all other qt packages with apt-get command.
        Then I tried to install serial bus module with linux qt installer (qt-unified-linux-x64-3.0.6-online.run). But it didn't work. Because the downloading is VERY slow.


        And, to be more specific, i have this error when I run make :

        /usr/lib/qt5/bin/qmake -o Makefile modbus_com.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
        Project ERROR: Unknown module(s) in QT: serialbus
        

        Thank you

        jsulmJ 1 Reply Last reply
        0
        • D dfvgergver

          @Pablo-J-Rogina Yes, i'm agree with you. But I had some doubts :-| . Because it didn't work anyway.

          I tried to launch some modbus examples. But I didn't find them...
          0_1550131770764_Screenshot_2019-02-14_09-08-42.png

          I don't understand why. Because i installed all possible qt examples packages with this command : apt-get install qt.*example.

          @SGaist I installed Qt creator and all other qt packages with apt-get command.
          Then I tried to install serial bus module with linux qt installer (qt-unified-linux-x64-3.0.6-online.run). But it didn't work. Because the downloading is VERY slow.


          And, to be more specific, i have this error when I run make :

          /usr/lib/qt5/bin/qmake -o Makefile modbus_com.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
          Project ERROR: Unknown module(s) in QT: serialbus
          

          Thank you

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #5

          @dfvgergver said in install "serialbus" module:

          Then I tried to install serial bus module with linux qt installer (qt-unified-linux-x64-3.0.6-online.run)

          This will not help as you can't mix your Linux distributions Qt packages and those installed via Qt installer.
          On my Ubuntu system I see libqt5serialport5 package - did you install it (and its -dev packet)?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • D Offline
            D Offline
            dfvgergver
            wrote on last edited by
            #6

            @jsulm yes, i installed libqt5serialport5 and libqt5serialport5-dev packages.

            jsulmJ 1 Reply Last reply
            0
            • D dfvgergver

              @jsulm yes, i installed libqt5serialport5 and libqt5serialport5-dev packages.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #7

              @dfvgergver What happens if you remove "-spec linux-g++"?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dfvgergver
                wrote on last edited by dfvgergver
                #8

                nothing good :-(
                I have this message : "make: *** No rule to make target 'common/xxx_params.cpp', needed by 'xxx_params.o'. Stop."

                But it's normal.

                Because, I have a project A which to work must include a project B (a kind of template I suppose).
                However, it is this project B that requires the "serialbus" module. That's why I tried to compile this project B to "get closer to the problem". But it makes no sense to compile project B since it is intended to be included in another project.
                Sorry if my explanations are a little esoteric. I am a new Qt user (I only know him for 2 days...).

                aha_1980A 1 Reply Last reply
                0
                • D dfvgergver

                  nothing good :-(
                  I have this message : "make: *** No rule to make target 'common/xxx_params.cpp', needed by 'xxx_params.o'. Stop."

                  But it's normal.

                  Because, I have a project A which to work must include a project B (a kind of template I suppose).
                  However, it is this project B that requires the "serialbus" module. That's why I tried to compile this project B to "get closer to the problem". But it makes no sense to compile project B since it is intended to be included in another project.
                  Sorry if my explanations are a little esoteric. I am a new Qt user (I only know him for 2 days...).

                  aha_1980A Offline
                  aha_1980A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  @dfvgergver

                  The package you need is qtserialbus, not qtserialport.

                  If your distribution does not provide it, you have two options:

                  1. Install the complete Qt with the online installer
                  2. Use the distribution Qt packages and compile qtserialbus from source. The source code can be cloned with Git from git://code.qt.io/qt/qtserialbus.git

                  Regards

                  Qt has to stay free or it will die.

                  1 Reply Last reply
                  2
                  • D Offline
                    D Offline
                    dfvgergver
                    wrote on last edited by dfvgergver
                    #10

                    I'm trying the option two.

                    But, when i execute make (after run qmake), i have this error :

                    qcanbusdevice_p.h:43:10: fatal error: private/qobject_p.h: No such file or directory
                     #include <private/qobject_p.h>
                              ^~~~~~~~~~~~~~~~~~~~~
                    

                    And from qtcreator when i open the .pro file and try to compile :
                    0_1550141717448_Screenshot_2019-02-14_11-54-14.png

                    So, i'm trying to find the package which contain the "private/qobject_p" library. But, i don't find him...

                    Pablo J. RoginaP 1 Reply Last reply
                    0
                    • D dfvgergver

                      I'm trying the option two.

                      But, when i execute make (after run qmake), i have this error :

                      qcanbusdevice_p.h:43:10: fatal error: private/qobject_p.h: No such file or directory
                       #include <private/qobject_p.h>
                                ^~~~~~~~~~~~~~~~~~~~~
                      

                      And from qtcreator when i open the .pro file and try to compile :
                      0_1550141717448_Screenshot_2019-02-14_11-54-14.png

                      So, i'm trying to find the package which contain the "private/qobject_p" library. But, i don't find him...

                      Pablo J. RoginaP Offline
                      Pablo J. RoginaP Offline
                      Pablo J. Rogina
                      wrote on last edited by
                      #11

                      @dfvgergver is it a good reason you're using "Qt creator 4.5.2 based on Qt 5.9.5"?

                      I'd suggest that instead of go looking for a needle in the haystack (i.e. building yourself the Qt Serialbus module, you install Qt 5.12.0 (or 5.12.1) that will provide you with the module you're looking for in a smooth way...

                      Upvote the answer(s) that helped you solve the issue
                      Use "Topic Tools" button to mark your post as Solved
                      Add screenshots via postimage.org
                      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        dfvgergver
                        wrote on last edited by
                        #12

                        I would like to be able to install the 5.12 on my linux mint. But I can't go through the Qt installer to install Qt 5.12 (see above): the connection is too slow.

                        mrjjM Pablo J. RoginaP 2 Replies Last reply
                        0
                        • D dfvgergver

                          I would like to be able to install the 5.12 on my linux mint. But I can't go through the Qt installer to install Qt 5.12 (see above): the connection is too slow.

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by mrjj
                          #13

                          @dfvgergver
                          Hi
                          I wonder if using another server would help ?
                          https://github.com/JKSH/QtSdkRepoChooser

                          However, if its the actual connection that's too slow it won't help.

                          1 Reply Last reply
                          1
                          • D dfvgergver

                            I would like to be able to install the 5.12 on my linux mint. But I can't go through the Qt installer to install Qt 5.12 (see above): the connection is too slow.

                            Pablo J. RoginaP Offline
                            Pablo J. RoginaP Offline
                            Pablo J. Rogina
                            wrote on last edited by
                            #14

                            @dfvgergver said in install "serialbus" module:

                            But I can't go through the Qt installer to install Qt 5.12 (see above): the connection is too slow

                            Could it be possible you use any of the offline installers?

                            Upvote the answer(s) that helped you solve the issue
                            Use "Topic Tools" button to mark your post as Solved
                            Add screenshots via postimage.org
                            Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                            1 Reply Last reply
                            2
                            • PangolinP Offline
                              PangolinP Offline
                              Pangolin
                              wrote on last edited by
                              #15

                              I use qmake & make to compile the source then something happen with these below:
                              qcanbusdevice_p.h:43:10: fatal error: private/qobject_p.h: No such file or directory
                              Anyone who can tell what's wrong with it . I guess the module sources of qt on github more or less give some tips for users how to build them but nothing clue happened so far. By the way i'm using ubuntu 18.05 and no serialbus module for this platform, please help!

                              Speak less and do more . You are your own worst enemy.

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

                                I build serialbus with the following instructions (also mirrored in this gist: https://gist.github.com/awesomebytes/ed90785324757b03c8f01e3ffa36d436):

                                # Overkill: get all qt-stuff
                                sudo apt install qml-module-qt-labs-folderlistmodel qml-module-qtquick-extras qml-module-qtquick-controls2 qt5-default libqt5quickcontrols2-5 qtquickcontrols2-5-dev qtcreator qtcreator-doc libqt5serialport5-dev build-essential qml-module-qt3d qt3d5-dev qtdeclarative5-dev qtconnectivity5-dev qtmultimedia5-dev
                                # To get rid of the private/qobject_p.h error
                                sudo apt-get install qtbase5-private-dev
                                # Build and install qtserialbus
                                git clone git://code.qt.io/qt/qtserialbus.git
                                cd qtserialbus
                                git checkout 5.9.8
                                qmake
                                make -j6
                                sudo make install
                                

                                I hope it may be useful for someone else.

                                I found that qt in Ubuntu 18.04 from official apt repositories (Qt 5.9.6) didn't have serialbus so it needs to be built and installed like that.

                                1 Reply Last reply
                                4

                                • Login

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