Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. install "serialbus" module

install "serialbus" module

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
16 Posts 8 Posters 9.3k Views
  • 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 Offline
    D Offline
    dfvgergver
    wrote on 13 Feb 2019, 15:59 last edited by
    #1

    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

    P 1 Reply Last reply 13 Feb 2019, 18:36
    0
    • D dfvgergver
      13 Feb 2019, 15:59

      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

      P Offline
      P Offline
      Pablo J. Rogina
      wrote on 13 Feb 2019, 18:36 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
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 13 Feb 2019, 19:24 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 14 Feb 2019, 08:31 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

          J 1 Reply Last reply 14 Feb 2019, 09:06
          0
          • D dfvgergver
            14 Feb 2019, 08:31

            @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

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 14 Feb 2019, 09:06 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 14 Feb 2019, 09:19 last edited by
              #6

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

              J 1 Reply Last reply 14 Feb 2019, 09:36
              0
              • D dfvgergver
                14 Feb 2019, 09:19

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

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 14 Feb 2019, 09:36 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 14 Feb 2019, 10:00 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 14 Feb 2019, 10:29
                  0
                  • D dfvgergver
                    14 Feb 2019, 10:00

                    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 14 Feb 2019, 10:29 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 14 Feb 2019, 10:48 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...

                      P 1 Reply Last reply 14 Feb 2019, 15:39
                      0
                      • D dfvgergver
                        14 Feb 2019, 10:48

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

                        P Offline
                        P Offline
                        Pablo J. Rogina
                        wrote on 14 Feb 2019, 15:39 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 14 Feb 2019, 16:38 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 P 2 Replies Last reply 14 Feb 2019, 16:40
                          0
                          • D dfvgergver
                            14 Feb 2019, 16:38

                            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 14 Feb 2019, 16:40 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
                              14 Feb 2019, 16:38

                              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.

                              P Offline
                              P Offline
                              Pablo J. Rogina
                              wrote on 14 Feb 2019, 18:45 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 15 Oct 2020, 02:15 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 21 Oct 2020, 01:58 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 Extensions
                                  • Unsolved