# Bluetooth (BLE) Support with Qt on Raspberry Pi

There are many ways to access Bluetooth capabilities on Raspberry Pi. Qt has its own API to use Bluetooth and to implement a BLE central device. The last build I provided a few days ago didn’t support Bluetooth: this package should support it. I tested the low energy scanner example and it worked properly.
Have fun! Bye 😉

Download POT 5.1.0 with Qt 5.5.1 for Pi2 Raspbian Jessie here (extraction code: 96aa).

## 22 thoughts on “Bluetooth (BLE) Support with Qt on Raspberry Pi”

1. I quickly tested and the sample app included in Qt seemed to discover devices. No idea why it does not work for you, sorry.

2. Hi,
I try to run the example of scanner, but it doesnt function. In console the bluetooth I can see other devices, but in qt I cannot. Any idea?

3. modjo says:

Yes it would be very interesting, even if i would like to do it myself …
The build for pi2 with jessie is perfect !

4. modjo says:

HI lucas, yes it would be very interesting, even if i would like to do it myself … Otherwise the jessie version for pi2 is perfect !

5. If you need that I can include in the build. But I'll only provide builds for Jessie Pi2 at the moment.

6. modjo says:

Lucas, i have put a message on qt forum https://forum.qt.io/topic/61208/qt-ftp-on-raspberry. A guy ask me if the version of libm.so is cross compil, could you give an answer ?Otherwise i tested to mount directly my raspberry sd card on opt/rpi/sysroot but same problem !
If i put this on a shell ls -l | grep libm.so i can see the symbolic link
lrwxrwxrwx 1 root root 34 sept. 6 03:59 libm.so -> /lib/arm-linux-gnueabihf/libm.so.6

I don't understand what's happen ! In you side, if i understand, you build it with success ?

7. Seems to build here. Maybe something wrong with your sysroot.

8. modjo says:

Thanks but same error !

9. Try to:
/opt/rpi/sysroot/usr/local/Qt-rasp2-5.5.1/bin/qmake ./qtftp.pro
export PATH=/opt/rpi/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH make 10. modjo says: Hi lucas. I'm trying to use Qt ftp on my raspberry. For that i have dowloaded the source here https://github.com/qtproject/qtftp. Why i would use this ? because QnetworkaccessManager don't give the way to list (or create folder) the tree of a ftp server. After a build of this module on desktop pc (works very well) i would like to do it for the rasp. To do this, i put the source at /opt/rpi/sysroot/usr/local/Qt-rasp2-5.5.1/qtftp-master/ (on my host machine). make a /opt/rpi/sysroot/usr/local/Qt-rasp2-5.5.1/bin/syncqt.pl -version 5.5.1 make a /opt/rpi/sysroot/usr/local/Qt-rasp2-5.5.1/bin/qmake ./qtftp.pro and$ make ARCH=arm CROSS_COMPILE=/opt/rpi/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/
and after i have this error :

/opt/rpi/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot open /opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/libm.so

Do you have an idea what is wrong ?

11. Unfortunately for as much info I could provide it will always be somehow involved to build everything because it also depends on many many variables. Also it is difficult to find the time to always describe precisely everything and keep it up to date.

12. I just thought it would be good to teach the order (for those who are not familiar) in which to take the articles to complete the task in a good way. Anyway you're right, a lot of information and everyone should invest some time to understand it. It may not be all that easy in life.

13. Yes, there are a couple of articles explaining how to build Qt for Pi. Also there are a few articles written by Qt guys. I'm not sure what can be added to that amount of information.

14. cross-compiling to build QT5 in (example) Ubuntu, to prepare a version that meets the needs that everyone has.
I know there are a lot of information on your website on this issue but so that I failed to find the order to get it.

Thank you.

15. Good day Luca, let me thank all the work you've done.
This contribution is really good and very useful no doubt.

Today I pass by here to ask a question, there is a possibility that at some time
you can make a guide for those who want, they can create their own cross-compiling?

thank you very much.

16. Modjo says:

Just a little post to say you that i downloaded your image and it's working perfectly with bluetooth LE !
Thank's a lot !!!

17. My tools are limited. I won't drop Pi1, but at the moment I do not have the tools I need to publish builds for it. You can however build from sources. Compatibility remains.

18. Anonymous says:

Understandable, so it's time to move on to jessie 😉
Do you skip support for Pi1 as well? Please don't! My Pi is built into another case, and i cannot change it very easily.

19. modjo says:

Ok no problem ! It's time for me to use Jessie !
Thank you another time for your amazing work !

20. I'm sorry, I don't plan to support wheezy anymore. I don't have enough time/tools.

21. modjo says:

Thank's a lot Luca for your build !!! Is it possible to have this build for wheezy ?