Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Can not configure qt with bluetooth

    General and Desktop
    3
    11
    943
    Loading More Posts
    • 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.
    • F
      Fang last edited by

      I want to build QT 5.12 with Bluetooth for arm by follow configure :

       ./configure \
      -v \
      -prefix /opt/Qte-5.12.0 \
      -opensource \
      -make libs \
      -xplatform linux-arm-gnueabi-g++ \
      -optimized-qmake \
      -pch \
      -linuxfb \
      -qt-libpng \
      -qt-libjpeg \
      -tslib \
      -qt-zlib \
      -no-opengl \
      -no-sse2 \
      -no-openssl \
      -no-cups \
      -no-glib \
      -no-iconv \
      -nomake examples \
      -nomake tools \
      -confirm-license \
      -I/opt/tslib/include \
      -L/opt/tslib/lib
      

      but I get configure summary as follows:

      Qt Bluetooth:
        BlueZ .................................. no
        BlueZ Low Energy ....................... no
        Linux Crypto API ....................... no
        WinRT Bluetooth API (desktop & UWP) .... no
      
      

      I had installed libBluetooth by apt-get, but can not find bluez also.
      And my cross compile Qt application run with logs:

      qt.bluetooth: Dummy backend running. Qt Bluetooth module is non-functional.
      

      I use arm-buildroot-linux-uclibcgnueabihf for cross compile. I new in QT, thank you very much for your reply.

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @Fang last edited by

        @Fang said in Can not configure qt with bluetooth:

        I had installed libBluetooth by apt-get, but can not find bluez also

        Did you install it into your sysroot? Installing these packages on the host will not help as you're cross compiling.
        Also, you need -dev packages (like libbluetooth-dev).

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

        F 1 Reply Last reply Reply Quote 1
        • F
          Fang @jsulm last edited by

          @jsulm Thanks.
          In my sysroot has

          libbluetooth.so
          libbluetooth.so.3
          libbluetooth.so.3.13.0
          

          Does it mean libBluetooth-dev packages were installed?

          jsulm 1 Reply Last reply Reply Quote 0
          • F
            Fang last edited by

            @Fang said in Can not configure qt with bluetooth:

            In configure, I add the sysroot directory:

            ./configure
            -v
            -prefix /opt/Qte-5.12.0
            -opensource
            -make libs
            -xplatform linux-arm-gnueabi-g++
            -optimized-qmake
            -pch
            -linuxfb
            -qt-libpng
            -qt-libjpeg
            -tslib
            -qt-zlib
            -no-opengl
            -no-sse2
            -no-openssl
            -no-cups
            -no-glib
            -no-iconv
            -nomake examples
            -nomake tools
            -confirm-license
            -sysroot /usr/local/bin/armv7-eabihf-uclibc-stable-2018.02-1/arm-buildroot-linux-uclibcgnueabihf/sysroot
            -I/opt/tslib/include
            -L/opt/tslib/lib

            But still can not find Bluetooth:

            Qt Bluetooth:
              BlueZ .................................. no
              BlueZ Low Energy ....................... no
              Linux Crypto API ....................... no
              WinRT Bluetooth API (desktop & UWP) .... no
            
            
            1 Reply Last reply Reply Quote 0
            • jsulm
              jsulm Lifetime Qt Champion @Fang last edited by

              @Fang said in Can not configure qt with bluetooth:

              Does it mean libBluetooth-dev packages were installed?

              No, dev packages contain header files needed to compile applications using these libraries.
              If you add -v parameter to configure you will get more information about what exactly is missing.

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

              1 Reply Last reply Reply Quote 2
              • F
                Fang last edited by

                Hi,jsulm.I have compiled libBluetooth-dev in Linux, but how can I contain it to QT? The ./configure need to change?

                jsulm 1 Reply Last reply Reply Quote 0
                • jsulm
                  jsulm Lifetime Qt Champion @Fang last edited by

                  @fang said in Can not configure qt with bluetooth:

                  compiled libBluetooth-dev

                  Do you mean you installed the dev package for Bluetooth?
                  If so then run configure from Qt again and check the output.

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

                  1 Reply Last reply Reply Quote 0
                  • J
                    JackRyan404 last edited by

                    Possible solutions could be:

                    1)implement a class that wrap all the set up and stuff to perform a discovery
                    2)make discoveryAgent a class member
                    A faster way to try it out is a Qt console application

                    1 Reply Last reply Reply Quote 0
                    • F
                      Fang last edited by

                      Thanks,jsulm.Thanks Jack.
                      I cross compiling libBluetooth packages to specified path,and it contain:
                      0_1565147418157_27c444a0-32a7-49d2-ba6c-7ee18a1c5fdb-image.png

                      but I don't know how to associated with QT,doest it configure with my old:

                      ./configure 
                      -v 
                      -prefix /opt/Qte-5.12.0 
                      -opensource 
                      -make libs 
                      -xplatform linux-arm-gnueabi-g++ 
                      -optimized-qmake 
                      -pch 
                      -linuxfb 
                      -qt-libpng 
                      -qt-libjpeg 
                      -tslib 
                      -qt-zlib 
                      -no-opengl 
                      -no-sse2 
                      -no-openssl 
                      -no-cups 
                      -no-glib 
                      -no-iconv 
                      -nomake examples 
                      -nomake tools 
                      -confirm-license 
                      -sysroot /usr/local/bin/armv7-eabihf-uclibc-stable-2018.02-1/arm-buildroot-linux-uclibcgnueabihf/sysroot 
                      -I/opt/tslib/include 
                      -L/opt/tslib/lib
                      

                      but it cannot contain Bluetooth also:

                      Qt Bluetooth:
                        BlueZ .................................. no
                        BlueZ Low Energy ....................... no
                        Linux Crypto API ....................... no
                        WinRT Bluetooth API (desktop & UWP) .... no
                      
                      

                      how can I do ?

                      jsulm 1 Reply Last reply Reply Quote 0
                      • jsulm
                        jsulm Lifetime Qt Champion @Fang last edited by

                        @fang You need to have the Bluetooth headers and libs in your sysroot if you cross compile. Or you compile it using you cross compalation tool chain and pass include and lib path to your configure call (like you do for tslib).
                        I see that you use this as sysroot: /usr/local/bin/armv7-eabihf-uclibc-stable-2018.02-1/arm-buildroot-linux-uclibcgnueabihf/sysroot
                        Do you have the Bluetooth stuff there?
                        "I cross compiling libBluetooth packages to specified path,and it contain:" - what path do you mean? Your sysroot?

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

                        F 1 Reply Last reply Reply Quote 1
                        • F
                          Fang @jsulm last edited by

                          @jsulm I can contain Bluetooth in QT, I copy the bluetooth stuff to my sysroot, and specified Bluetooth path in configure and the relevant section of output of ./configrue now:

                          Qt Bluetooth:
                            BlueZ .................................. yes
                            BlueZ Low Energy ....................... yes
                            Linux Crypto API ....................... yes
                          
                          

                          Thank you very much for your help!

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post