Can not configure qt with bluetooth
-
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.
-
@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). -
@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/libBut still can not find Bluetooth:
Qt Bluetooth: BlueZ .................................. no BlueZ Low Energy ....................... no Linux Crypto API ....................... no WinRT Bluetooth API (desktop & UWP) .... no
-
@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. -
@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. -
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 -
Thanks,jsulm.Thanks Jack.
I cross compiling libBluetooth packages to specified path,and it contain:
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 ?
-
@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? -
@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!