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. Can not configure qt with bluetooth
QtWS25 Last Chance

Can not configure qt with bluetooth

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 3 Posters 1.7k 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.
  • F Fang

    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.

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

    @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
    1
    • jsulmJ jsulm

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

      F Offline
      F Offline
      Fang
      wrote on last edited by
      #3

      @jsulm Thanks.
      In my sysroot has

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

      Does it mean libBluetooth-dev packages were installed?

      jsulmJ 1 Reply Last reply
      0
      • F Offline
        F Offline
        Fang
        wrote on last edited by
        #4

        @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
        0
        • F Fang

          @jsulm Thanks.
          In my sysroot has

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

          Does it mean libBluetooth-dev packages were installed?

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

          @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
          2
          • F Offline
            F Offline
            Fang
            wrote on last edited by
            #6

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

            jsulmJ 1 Reply Last reply
            0
            • F Fang

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

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

              @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
              0
              • J Offline
                J Offline
                JackRyan404
                wrote on last edited by
                #8

                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
                0
                • F Offline
                  F Offline
                  Fang
                  wrote on last edited by
                  #9

                  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 ?

                  jsulmJ 1 Reply Last reply
                  0
                  • F Fang

                    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 ?

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

                    @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
                    1
                    • jsulmJ jsulm

                      @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?

                      F Offline
                      F Offline
                      Fang
                      wrote on last edited by
                      #11

                      @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
                      0

                      • Login

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