Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Mqtt
Forum Updated to NodeBB v4.3 + New Features

Mqtt

Scheduled Pinned Locked Moved Unsolved General and Desktop
25 Posts 3 Posters 2.4k 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
    Sergey_85
    wrote on 9 Dec 2024, 10:08 last edited by
    #1

    Hello, can I use the mqtt library in the free version, if so, why can't I connect it?

    J 1 Reply Last reply 9 Dec 2024, 10:15
    0
    • S Sergey_85
      9 Dec 2024, 10:08

      Hello, can I use the mqtt library in the free version, if so, why can't I connect it?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 9 Dec 2024, 10:15 last edited by jsulm 12 Sept 2024, 10:16
      #2

      @Sergey_85 Do you mean https://doc.qt.io/qt-6/qtmqtt-index.html ? It is available under GPLv3, so yes you can use it freely as long as you do not violate GPLv3.

      "if so, why can't I connect it?" - who knows, you did not provide any details...
      And what does "connect" mean here? You can't link? You can't establish a connection?

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

      S 1 Reply Last reply 9 Dec 2024, 12:57
      1
      • S Offline
        S Offline
        Sergey_85
        wrote on 9 Dec 2024, 12:38 last edited by
        #3

        Sorry for explaining it wrong. When I add to Cmakefile.txt
        find_package(Qt6 REQUIRED COMPONENTS Mqtt)
        target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
        I get the error:
        C:\Projects_Qt\MqttTest\CMakeLists.txt:14: error: Found package configuration file:

        C:/Qt/6.8.0/mingw_64/lib/cmake/Qt6/Qt6Config.cmake

        but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
        FOUND. Reason given by package:

        Failed to find required Qt component "Mqtt".

        Expected Config file at
        "C:/Qt/6.8.0/mingw_64/lib/cmake/Qt6Mqtt/Qt6MqttConfig.cmake" does NOT exist

        1 Reply Last reply
        0
        • J jsulm
          9 Dec 2024, 10:15

          @Sergey_85 Do you mean https://doc.qt.io/qt-6/qtmqtt-index.html ? It is available under GPLv3, so yes you can use it freely as long as you do not violate GPLv3.

          "if so, why can't I connect it?" - who knows, you did not provide any details...
          And what does "connect" mean here? You can't link? You can't establish a connection?

          S Offline
          S Offline
          Sergey_85
          wrote on 9 Dec 2024, 12:57 last edited by
          #4

          @jsulm Through Qt Maintenance Tool I can't find Mqtt module to install.

          P 1 Reply Last reply 9 Dec 2024, 13:14
          0
          • S Sergey_85
            9 Dec 2024, 12:57

            @jsulm Through Qt Maintenance Tool I can't find Mqtt module to install.

            P Offline
            P Offline
            Pl45m4
            wrote on 9 Dec 2024, 13:14 last edited by
            #5

            @Sergey_85 said in Mqtt:

            Through Qt Maintenance Tool I can't find Mqtt module to install.

            Unless something has changed, which apparently isn't the case here, you have to build QMQTT yourself from source, as it's not available in Online Installer for open source users.

            See:

            • https://forum.qt.io/topic/90033/qt-mqtt-not-available

            If debugging is the process of removing software bugs, then programming must be the process of putting them in.

            ~E. W. Dijkstra

            S 1 Reply Last reply 9 Dec 2024, 13:21
            0
            • P Pl45m4
              9 Dec 2024, 13:14

              @Sergey_85 said in Mqtt:

              Through Qt Maintenance Tool I can't find Mqtt module to install.

              Unless something has changed, which apparently isn't the case here, you have to build QMQTT yourself from source, as it's not available in Online Installer for open source users.

              See:

              • https://forum.qt.io/topic/90033/qt-mqtt-not-available
              S Offline
              S Offline
              Sergey_85
              wrote on 9 Dec 2024, 13:21 last edited by
              #6

              @Pl45m4 Thank you for your quick response, I will try to figure it out using the link you provided.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Sergey_85
                wrote on 10 Dec 2024, 11:37 last edited by
                #7

                Thanks, with MinGW, I managed to connect Mqtt from manually assembled libraries. Can you please tell me how to solve the issue with the compilation Android app?

                J 1 Reply Last reply 10 Dec 2024, 12:09
                0
                • S Sergey_85
                  10 Dec 2024, 11:37

                  Thanks, with MinGW, I managed to connect Mqtt from manually assembled libraries. Can you please tell me how to solve the issue with the compilation Android app?

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 10 Dec 2024, 12:09 last edited by
                  #8

                  @Sergey_85 said in Mqtt:

                  Can you please tell me how to solve the issue with the compilation Android app?

                  Please tell us first what issue it is...
                  Did you build mqtt for Android?

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

                  S 1 Reply Last reply 11 Dec 2024, 06:28
                  0
                  • J jsulm
                    10 Dec 2024, 12:09

                    @Sergey_85 said in Mqtt:

                    Can you please tell me how to solve the issue with the compilation Android app?

                    Please tell us first what issue it is...
                    Did you build mqtt for Android?

                    S Offline
                    S Offline
                    Sergey_85
                    wrote on 11 Dec 2024, 06:28 last edited by
                    #9

                    @jsulm First I needed to do it for a window application, I did it, now I need to connect mqtt to a mobile application but there is aarch64-v8 architecture so compilation does not work.

                    J 1 Reply Last reply 11 Dec 2024, 07:18
                    0
                    • S Sergey_85
                      11 Dec 2024, 06:28

                      @jsulm First I needed to do it for a window application, I did it, now I need to connect mqtt to a mobile application but there is aarch64-v8 architecture so compilation does not work.

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 11 Dec 2024, 07:18 last edited by jsulm 12 Nov 2024, 07:19
                      #10

                      @Sergey_85 said in Mqtt:

                      but there is aarch64-v8 architecture so compilation does not work.

                      Just build it using Android NDK or your Android Kit in QtCreator.

                      And please, "does not work" does not tell anything. You should say what you tried and what happened.

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

                      S 1 Reply Last reply 11 Dec 2024, 10:39
                      0
                      • J jsulm
                        11 Dec 2024, 07:18

                        @Sergey_85 said in Mqtt:

                        but there is aarch64-v8 architecture so compilation does not work.

                        Just build it using Android NDK or your Android Kit in QtCreator.

                        And please, "does not work" does not tell anything. You should say what you tried and what happened.

                        S Offline
                        S Offline
                        Sergey_85
                        wrote on 11 Dec 2024, 10:39 last edited by Sergey_85 12 Nov 2024, 11:10
                        #11

                        @jsulm I can't build sources for Arm64-v8a

                        cmake .. \
                          -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.0/gcc_64 \
                          -DCMAKE_TOOLCHAIN_FILE=/home/ph/Android/Sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake \
                          -DANDROID_ABI=arm64-v8a \
                          -DANDROID_NATIVE_API_LEVEL=21
                        -- The CXX compiler identification is Clang 17.0.2
                        -- The C compiler identification is Clang 17.0.2
                        -- Detecting CXX compiler ABI info
                        -- Detecting CXX compiler ABI info - done
                        -- Check for working CXX compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped
                        -- Detecting CXX compile features
                        -- Detecting CXX compile features - done
                        -- Detecting C compiler ABI info
                        -- Detecting C compiler ABI info - done
                        -- Check for working C compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped
                        -- Detecting C compile features
                        -- Detecting C compile features - done
                        CMake Error at CMakeLists.txt:14 (find_package):
                          Could not find a package configuration file provided by "Qt6" (requested
                          version 6.8.0) with any of the following names:
                        
                            Qt6Config.cmake
                            qt6-config.cmake
                        
                          Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
                          to a directory containing one of the above files.  If "Qt6" provides a
                          separate development package or SDK, be sure it has been installed.
                        
                        
                        -- Configuring incomplete, errors occurred!
                        
                        

                        Maybe I'm doing something wrong?
                        Qt6Config.cmake is located at the specified path

                        J 2 Replies Last reply 12 Dec 2024, 06:30
                        0
                        • S Sergey_85
                          11 Dec 2024, 10:39

                          @jsulm I can't build sources for Arm64-v8a

                          cmake .. \
                            -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.0/gcc_64 \
                            -DCMAKE_TOOLCHAIN_FILE=/home/ph/Android/Sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake \
                            -DANDROID_ABI=arm64-v8a \
                            -DANDROID_NATIVE_API_LEVEL=21
                          -- The CXX compiler identification is Clang 17.0.2
                          -- The C compiler identification is Clang 17.0.2
                          -- Detecting CXX compiler ABI info
                          -- Detecting CXX compiler ABI info - done
                          -- Check for working CXX compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped
                          -- Detecting CXX compile features
                          -- Detecting CXX compile features - done
                          -- Detecting C compiler ABI info
                          -- Detecting C compiler ABI info - done
                          -- Check for working C compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped
                          -- Detecting C compile features
                          -- Detecting C compile features - done
                          CMake Error at CMakeLists.txt:14 (find_package):
                            Could not find a package configuration file provided by "Qt6" (requested
                            version 6.8.0) with any of the following names:
                          
                              Qt6Config.cmake
                              qt6-config.cmake
                          
                            Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
                            to a directory containing one of the above files.  If "Qt6" provides a
                            separate development package or SDK, be sure it has been installed.
                          
                          
                          -- Configuring incomplete, errors occurred!
                          
                          

                          Maybe I'm doing something wrong?
                          Qt6Config.cmake is located at the specified path

                          J Offline
                          J Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on 12 Dec 2024, 06:30 last edited by
                          #12

                          @Sergey_85 Did you install Qt for Android?

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

                          S 1 Reply Last reply 12 Dec 2024, 07:08
                          0
                          • J jsulm
                            12 Dec 2024, 06:30

                            @Sergey_85 Did you install Qt for Android?

                            S Offline
                            S Offline
                            Sergey_85
                            wrote on 12 Dec 2024, 07:08 last edited by
                            #13

                            @jsulm Yes

                            1 Reply Last reply
                            0
                            • S Sergey_85
                              11 Dec 2024, 10:39

                              @jsulm I can't build sources for Arm64-v8a

                              cmake .. \
                                -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.0/gcc_64 \
                                -DCMAKE_TOOLCHAIN_FILE=/home/ph/Android/Sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake \
                                -DANDROID_ABI=arm64-v8a \
                                -DANDROID_NATIVE_API_LEVEL=21
                              -- The CXX compiler identification is Clang 17.0.2
                              -- The C compiler identification is Clang 17.0.2
                              -- Detecting CXX compiler ABI info
                              -- Detecting CXX compiler ABI info - done
                              -- Check for working CXX compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped
                              -- Detecting CXX compile features
                              -- Detecting CXX compile features - done
                              -- Detecting C compiler ABI info
                              -- Detecting C compiler ABI info - done
                              -- Check for working C compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped
                              -- Detecting C compile features
                              -- Detecting C compile features - done
                              CMake Error at CMakeLists.txt:14 (find_package):
                                Could not find a package configuration file provided by "Qt6" (requested
                                version 6.8.0) with any of the following names:
                              
                                  Qt6Config.cmake
                                  qt6-config.cmake
                              
                                Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
                                to a directory containing one of the above files.  If "Qt6" provides a
                                separate development package or SDK, be sure it has been installed.
                              
                              
                              -- Configuring incomplete, errors occurred!
                              
                              

                              Maybe I'm doing something wrong?
                              Qt6Config.cmake is located at the specified path

                              J Offline
                              J Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 12 Dec 2024, 07:17 last edited by
                              #14

                              @Sergey_85 said in Mqtt:

                              -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.0/gcc_64

                              This doesn't look like a path to Qt for Android

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

                              S 1 Reply Last reply 12 Dec 2024, 07:19
                              0
                              • J jsulm
                                12 Dec 2024, 07:17

                                @Sergey_85 said in Mqtt:

                                -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.0/gcc_64

                                This doesn't look like a path to Qt for Android

                                S Offline
                                S Offline
                                Sergey_85
                                wrote on 12 Dec 2024, 07:19 last edited by
                                #15

                                @jsulm I tried -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.1/android_arm64_v8a

                                J 1 Reply Last reply 12 Dec 2024, 07:29
                                0
                                • S Sergey_85
                                  12 Dec 2024, 07:19

                                  @jsulm I tried -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.1/android_arm64_v8a

                                  J Offline
                                  J Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on 12 Dec 2024, 07:29 last edited by
                                  #16

                                  @Sergey_85 And what happened? Does /home/ph/opt/Qt/6.8.0/gcc_64 contain Qt6Config.cmake or qt6-config.cmake like CMake requested in the error message?

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

                                  S 1 Reply Last reply 12 Dec 2024, 07:40
                                  0
                                  • J jsulm
                                    12 Dec 2024, 07:29

                                    @Sergey_85 And what happened? Does /home/ph/opt/Qt/6.8.0/gcc_64 contain Qt6Config.cmake or qt6-config.cmake like CMake requested in the error message?

                                    S Offline
                                    S Offline
                                    Sergey_85
                                    wrote on 12 Dec 2024, 07:40 last edited by
                                    #17

                                    @jsulm yes, the Qt6Config.cmake file is also in the folder
                                    /home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6/Qt6Config.cmake

                                    I haven't compiled from sources before, what's in the kit was enough for me, so I apologize if I'm asking something wrong or providing incomplete information, I'm confused(

                                    J 1 Reply Last reply 12 Dec 2024, 07:48
                                    0
                                    • S Sergey_85
                                      12 Dec 2024, 07:40

                                      @jsulm yes, the Qt6Config.cmake file is also in the folder
                                      /home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6/Qt6Config.cmake

                                      I haven't compiled from sources before, what's in the kit was enough for me, so I apologize if I'm asking something wrong or providing incomplete information, I'm confused(

                                      J Offline
                                      J Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on 12 Dec 2024, 07:48 last edited by
                                      #18

                                      @Sergey_85 The I think it should be

                                      -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6
                                      

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

                                      S 1 Reply Last reply 12 Dec 2024, 07:52
                                      0
                                      • J jsulm
                                        12 Dec 2024, 07:48

                                        @Sergey_85 The I think it should be

                                        -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6
                                        
                                        S Offline
                                        S Offline
                                        Sergey_85
                                        wrote on 12 Dec 2024, 07:52 last edited by
                                        #19

                                        @jsulm ```
                                        cmake ..
                                        -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6
                                        -DCMAKE_TOOLCHAIN_FILE=/home/ph/Android/Sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake
                                        -DANDROID_ABI=arm64-v8a
                                        -DANDROID_NATIVE_API_LEVEL=21
                                        -- The CXX compiler identification is Clang 17.0.2
                                        -- The C compiler identification is Clang 17.0.2
                                        -- Detecting CXX compiler ABI info
                                        -- Detecting CXX compiler ABI info - done
                                        -- Check for working CXX compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped
                                        -- Detecting CXX compile features
                                        -- Detecting CXX compile features - done
                                        -- Detecting C compiler ABI info
                                        -- Detecting C compiler ABI info - done
                                        -- Check for working C compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped
                                        -- Detecting C compile features
                                        -- Detecting C compile features - done
                                        CMake Error at CMakeLists.txt:14 (find_package):
                                        Could not find a package configuration file provided by "Qt6" (requested
                                        version 6.8.1) with any of the following names:

                                        Qt6Config.cmake
                                        qt6-config.cmake
                                        

                                        Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
                                        to a directory containing one of the above files. If "Qt6" provides a
                                        separate development package or SDK, be sure it has been installed.

                                        -- Configuring incomplete, errors occurred!

                                        J 1 Reply Last reply 12 Dec 2024, 07:56
                                        0
                                        • S Sergey_85
                                          12 Dec 2024, 07:52

                                          @jsulm ```
                                          cmake ..
                                          -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6
                                          -DCMAKE_TOOLCHAIN_FILE=/home/ph/Android/Sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake
                                          -DANDROID_ABI=arm64-v8a
                                          -DANDROID_NATIVE_API_LEVEL=21
                                          -- The CXX compiler identification is Clang 17.0.2
                                          -- The C compiler identification is Clang 17.0.2
                                          -- Detecting CXX compiler ABI info
                                          -- Detecting CXX compiler ABI info - done
                                          -- Check for working CXX compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped
                                          -- Detecting CXX compile features
                                          -- Detecting CXX compile features - done
                                          -- Detecting C compiler ABI info
                                          -- Detecting C compiler ABI info - done
                                          -- Check for working C compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped
                                          -- Detecting C compile features
                                          -- Detecting C compile features - done
                                          CMake Error at CMakeLists.txt:14 (find_package):
                                          Could not find a package configuration file provided by "Qt6" (requested
                                          version 6.8.1) with any of the following names:

                                          Qt6Config.cmake
                                          qt6-config.cmake
                                          

                                          Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
                                          to a directory containing one of the above files. If "Qt6" provides a
                                          separate development package or SDK, be sure it has been installed.

                                          -- Configuring incomplete, errors occurred!

                                          J Offline
                                          J Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on 12 Dec 2024, 07:56 last edited by
                                          #20

                                          @Sergey_85 Try with a clean build folder (best to create a fresh one)

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

                                          S 1 Reply Last reply 12 Dec 2024, 08:20
                                          0

                                          1/25

                                          9 Dec 2024, 10:08

                                          • Login

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