We have moved to a new Sailfish OS Forum. Please start new discussions there.

Harbour API Request: qt5-qtconnectivity-qtbluetooth, Bluetooth

asked 2014-01-02 12:19:47 +0300

rcg gravatar image

updated 2014-01-19 00:29:53 +0300

Robin Burchell _ w00t gravatar image

qt5-qtconnectivity-qtbluetooth allows the interaction with bluetooth devices. The package qt5-qtconnectivity-qtbluetooth is already available for SailfishOS. However, right now, the respective libraries, e.g., /usr/lib/libQt5Bluetooth.so.5, and QML imports are not listed as allowed to link against in the Harbour FAQ. It would be great if these libs could be added to the libraries which are allowed to link against.

edit retag flag offensive close delete


As reported by a user of pebbled, this package seems to be no longer present in 1.1.9. Has it been removed?

Reported here: https://github.com/smokku/pebble/issues/86

Andy Branson ( 2015-09-18 12:56:30 +0300 )edit

5 Answers

Sort by » oldest newest most voted

answered 2014-01-19 00:29:34 +0300

Robin Burchell _ w00t gravatar image

The implication is that QtBluetooth is supported as of 5.2, based on the release announcement. However, there is a slight complication: we plan to move to bluez5 in the future, which will imply further work before this can be offered as a supported API, as Qt currently only has a bluez4 backend. See also: https://bugreports.qt-project.org/browse/QTBUG-32085

It is certainly on the "TODO". :)

edit flag offensive delete publish link more


As written in the QTBUG it is planned for QT5.4. Roughly 3 month till the QT 5.4 Alpha release if they continue with the same speed. Get prepared ;-)

harry ( 2014-03-25 16:49:03 +0300 )edit

So, https://bugreports.qt-project.org/browse/QTBUG-32085 is resolved as of today! But Robin is no Jolla employee anymore

harry ( 2014-08-22 18:17:47 +0300 )edit

QT5.4 Alpha is released with bluez5 support! http://blog.qt.digia.com/blog/2014/09/08/qt-5-4-alpha-available/

harry ( 2014-09-08 14:14:14 +0300 )edit

now that update10 brought a new QT, can we expect to have this request fulfilled soon? :)

c.la ( 2015-01-26 11:40:21 +0300 )edit


Now that Sailfish has moved to Bluez 5 and Qt 5.6, is it possible to put QtBluetooth as an allowed dependency? It doesn't seems like the validator in the SDK is allowing it. AFAIK those two packages are mandatory:

  • qt5-qtconnectivity-qtbluetooth
  • qt5-qtconnectivity-qtsdpscanner

I used to provides my own version of QtBluetooth until now (Zik Manager app on store) but due to recent bluetooth changes my app doesn't work anymore. Since I have to update it I was wondering if I could skip the step of copying QtBluetooth lib to my rpm bundle to lighten a bit the package...

Please let me know so that I post the update to harbour!


lainwir3d ( 2017-11-23 12:22:15 +0300 )edit

answered 2016-08-29 11:55:46 +0300

jdrescher2006 gravatar image

I just realized that I can't bring my app to Jolla store because libQt5Bluetooth.so is not in the list of shared libraries.

@Jolla: is this supposed to be a joke? It is now august of 2016 and the bluetooth library is still not there!!! How is a developer supposed to bring any app with bluetooth funcionality to the store (bluetooth 4.0 not working at all is only making it worse...)?

I mean this is really bad! There are other important libraries missing as well. Jolla has to do it's homework or Sailfish will never have apps.

Thanks to Jolla, the best Sailfish app is not coming to Jolla store because of this :-(

edit flag offensive delete publish link more



Maybe it helps if you make a PR in the github repo to gain some attention from the devs.

bomo ( 2016-08-29 13:03:53 +0300 )edit

Dammit, I love that app! Use it a couple times a week. Maybe one of the best apps on Sailfish.

Maybe you can bring this to the table in the mer meeting?

BonoNL ( 2016-08-29 13:04:52 +0300 )edit

answered 2016-08-29 14:33:53 +0300

tortoisedoc gravatar image

At least there appears to be a "ported" package already (thanks to MartinK)


edit flag offensive delete publish link more


That is interesting. Can I include this RPM into my project? Question is if there are other dependencies...

jdrescher2006 ( 2016-08-29 15:09:34 +0300 )edit

whats wrong with placing the lib in the path for private libraries (rpath is set for that path already)? That should avoid the necessity for a rpm install.

tortoisedoc ( 2016-08-29 20:44:19 +0300 )edit

@tortoisedoc: I don't know how to do this. I cannot even find a file to download there. What files exactly are needed, where can they be found and where do I put them?

jdrescher2006 ( 2016-09-13 15:15:14 +0300 )edit

@jdrescher2006 : i'd say ping the author of that RPM and ask?

tortoisedoc ( 2016-09-13 15:22:15 +0300 )edit

Ok, I will try...

jdrescher2006 ( 2016-09-13 15:28:34 +0300 )edit

answered 2017-05-22 15:19:50 +0300

jdrescher2006 gravatar image

After a long time I am still trying to get this fixed. As @harry has mentioned before, I tried libgato. If I include this in my app the validator gives the following problem:
INFO [/usr/share/harbour-libtester/lib/libgato.so.1] Private shared library shipped ERROR [/usr/share/harbour-libtester/lib/libgato.so.1] Cannot link to shared library: libbluetooth.so.3 The problem seems to be that libgato itself uses libbluetooth which the validator does not like. So basically libgato is out of the game :-(

Now the other library. When I compile this, I get a lot of errors. I don't think it's made for Sailfish SDK. No idea how to get it compiled.
@harry could you give a hint how to do that?

edit flag offensive delete publish link more

answered 2017-01-18 10:05:23 +0300

jdrescher2006 gravatar image

Hello guys,

I am still trying to get BT to work with Jolla store.
Now I found someone who modified QtBluetooth 5.4 for SFOS. It's on github.
This is really cool as it should also provide BLE. I need this because I would really like to do my own sports tracker application.

Problem is, I have no idea how to incorporate this into my project. Do I have to compile it first? Maybe someone can give me a hint..

edit flag offensive delete publish link more


see from the sailfish developer docs how to bundle private libs & set rpath accordingly.

tortoisedoc ( 2017-01-18 10:13:01 +0300 )edit

I tried to develop an app for my MiBand (version 1). I tried the QTBluetooth lib you mentioned and did something like this in my pro file

lib.files = lib
lib.path = /usr/share/$${TARGET}
unix:!macx: LIBS += -L$$PWD/../build-qtconnectivity-MerSDK_SailfishOS_armv7hl-Release/lib/ -lQt5Bluetooth
INCLUDEPATH += $$PWD/../build-qtconnectivity-MerSDK_SailfishOS_armv7hl-Release/include
DEPENDPATH += $$PWD/../build-qtconnectivity-MerSDK_SailfishOS_armv7hl-Release/include

Then I tried libgato and it worked out better, because it does not gather as much information at BLE service discovery, but it is GPL3 and therefore I gave up.

harry ( 2017-01-18 11:05:00 +0300 )edit

@harry: ahhh, that sounds interesting.
A few questions:
- why is it better if you have less informations at BLE service discovery?
- why won't you use a GPLv3 library?
- do you have an example of how to include and use libgato?

jdrescher2006 ( 2017-01-18 11:51:10 +0300 )edit
harry ( 2017-01-18 13:12:40 +0300 )edit

Ok, I see your point with GPLv3. Thanks for the example, I will check it out.

jdrescher2006 ( 2017-01-18 14:36:30 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2014-01-02 12:19:47 +0300

Seen: 2,492 times

Last updated: May 22 '17