Ask / Submit

Proper Bluetooth LE support

asked 2014-01-02 12:45:18 +0300

onion gravatar image

updated 2017-09-13 00:26:58 +0300

The device have Bluetooth 4.0 support and that include LE, but the current APIs provided are old and does not properly support LE. Bluez needs to be updated to 5.x and proper BTLE Qt APIs should be added.

Edit by 20150413: I just noticed in Harbour the app Parrot ZIK 2.0 Manager that includes a backport of QtBluetooth 5.4. Can't this be included in jolla update?

EDIT 2015-12-15 by this topic will be discussed on Dec, 17th Jolla Community meeting. If you plan to attend please edit the post and add your name in the list of substitutes in case I can't show up (50% chance atm)

EDIT 2017-09-12 by martonmiklos: After the release of the Jämsänjoki the Bluez5 supported devices has all the things needed for creating applications with BLE connectivity (Qt libraries). However the harbour RPM validator still reject these apps due the usage. I would say the BLE support could be said to proper once the official apps could utilize that.

edit retag flag offensive close delete



The problems I see is that not even Bluez 5.x currently has a BLE API.

There seems to be more interest in getting it to work under Android than on GNU. In fact, at this rate, Bluez's Android BT API facsimile will be complete even before the real Bluez D-Bus API :/

javispedro ( 2014-01-05 22:48:43 +0300 )edit

Another problem with Bluez 5.x, is that it doesn't currently support handsfree profiles. Which I noticed the hard way in Fedora 20.

dazo ( 2014-03-04 22:57:28 +0300 )edit

Any idea what it would take to add Bluetooth LE support for the apps running in Dalvik?

Nicolas ( 2014-06-13 14:32:20 +0300 )edit

So are we any closer to BluetoothLE support? I'm eyeing up doing something with beacons and motion sensors like the PebbleBee ( or other similar tags for objects.

In my case I want to do something that alerts my phone if an object is moved eg. someone nicking my bike or laptop while I'm not watching it.

aegis ( 2014-08-07 22:59:49 +0300 )edit

I got a pair of PowerUp 3.0 BTLE modules for remote controlled paper planes. Would love to get them working on a Jolla

Henque19 ( 2014-08-07 23:26:35 +0300 )edit

7 Answers

Sort by » oldest newest most voted

answered 2014-01-05 23:20:16 +0300

javispedro gravatar image

updated 2014-07-31 18:26:06 +0300

One option is to "roll your own BLE API". This is what most Bluez BLE users do these days (e.g. NoBle, ble-sensor-pi). I was about doing that in Gato for my smartwatch experiments.

A benefit of this solution is that it works with Bluez 4 and 5 on both PC, the N9 and the Jolla device. You can probably statically link the library and thus even pass Harbour requirements. However, there are several disadvantages:

  • Scanning for BLE devices requires root (CAP_NET_RAW). There might be some way to workaround this using bluez's StartDiscovery but from my tests it does not seem realiable. If multiple programs start scanning collisions will occur (and for certain use cases such as iBeacons it is interesting to keep passively scanning for looong times). Also, .
  • Acting as a peripheral is impossible unless you "take over" Bluetooth. Since there's no arbitration collisions here are also a given. The first program that "wins" is responsible for handling all services.
  • For similar reasons advertising is not possible.
  • Pairing is possible, but hard, and not user-friendly. However not many BLE devices require pairing (e.g. certainly most smartwatches or fitness monitors do not).

While the above cons are probably dealkillers, one has to consider that the current Qt5.3 Bluetooth API seems to be walking the same path, except that they call a separate program (gatttool) for GATT instead of reimplementing the protocol in the library. Qt5.4 Bluetooth actually uses its own implementation derived from Gato. But there is no arbitration at all, so it's subject to the same problems as above.

edit flag offensive delete publish link more


Lets go with this for now until bluez sorts itself out.

onion ( 2014-03-13 11:48:51 +0300 )edit

According to this: "Support for Bluetooth LE adapters was not introduced until kernel 3.5; BlueZ 5.0 supports Bluetooth LE functionality only for this and subsequent kernels." As Jolla seeminly runs kernel 3.4.0 (timestamped this year, however) this could mean no BLE support for Jolla until kernel upgrade...which could prove over complicated for this only. Perhaps with some backport magick..? Oh, and I'm looking forward to use my FitBit Felx, so... ;-)

Direc ( 2014-03-21 19:22:27 +0300 )edit

we are creaping closer ... kernel 3.4.87

egnat69 ( 2014-06-10 17:18:46 +0300 )edit

@javispedro - just out of curiosity: i saw a youtube video of your jolla communicating with a BLE stylus, done with gato ... how experimental is that and can it be used with other devices? i have a mio alpha that tracks heart rate and sends it over BLE so i'd love to toy around with it a bit...

egnat69 ( 2014-06-12 12:32:28 +0300 )edit

@egnat69 feel free to "try", you can find some packages in , but I've not written documentation yet. You can refer to some of the small test-* programs I've written in . Also Apple's CoreBluetooth documentation, since Gato's API is similar to it.

javispedro ( 2014-06-12 13:27:26 +0300 )edit

answered 2016-08-05 12:15:34 +0300

r0kk3rz gravatar image

Work is being done on moving to Bluez5 with an aim of having BLE enabled.

@veskuh Responded to a question about this in a #mer-meeting.

Bluez5 is not ready yet for next update, but 2.0.5 or 2.0.6 are likely candidates

edit flag offensive delete publish link more



Sweet, that's great news!

nick75 ( 2016-08-05 12:16:49 +0300 )edit

Yeah finally, can't wait for it!

jdrescher2006 ( 2016-09-30 09:45:21 +0300 )edit

For the sake of completeness:

This is the link to the above mentioned mer-meeting:

And the following mer-meeting contains some new information regarding Bluetooth LE support and implementation:

Alex ( 2016-12-27 23:26:59 +0300 )edit

answered 2016-10-23 09:05:50 +0300

Sage gravatar image

We are currently working on Bluez 5 and we are currently merging the changes to our development branch. We are aiming to do release that contains Bluez 5 stack in next couple of months, however with this first release the Bluez 5 stack will not be enabled on any devices yet, but the target is to get first devices with Bluez5 enabled one release after the release with bluez 5 stack. This also should make it easier for community to help on testing some of the changes on their device ports and also contribute on the Bluez 5 based stack.

edit flag offensive delete publish link more



Will that also include an updated version of QtBluetooth for apps? Anyway, looking forward to it.

ArmsOfSorrow ( 2016-10-23 18:44:19 +0300 )edit

Will Android apps work too with this Bluez 5 stack?

thisisme ( 2016-11-28 10:10:09 +0300 )edit

@Sage: how is the status of this? When can we expect Bluez5 to be enabled?

jdrescher2006 ( 2017-02-01 08:25:45 +0300 )edit

answered 2014-07-31 18:20:36 +0300

javispedro gravatar image

updated 2014-07-31 18:20:54 +0300

Another approach is to move to Bluez 5. Upstream Bluez 5 still has no _client_ GATT API (so you can't query peripherals from the phone), but it does have a server API (seemingly).

Because Google is in the same problem as Jolla is (they want a BLE API for ChromeOS but upstream Bluez is currently lagging), they have published a set of patches implementing a Client GATT API on top of Bluez 5.19 .

I think those patches are an alternative option to gain "cleaner" BLE support. However they would require migrating all of Sailfish to Bluez5.

edit flag offensive delete publish link more


GATT client API is comming upstream at the moment. See

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

And it comes from Google, so it should be similar to the above API.

javispedro ( 2014-08-26 20:55:42 +0300 )edit

Bluez 5.30 now contains a experimental release of the GATT client API.

javispedro ( 2015-05-18 15:18:00 +0300 )edit

answered 2014-11-23 11:35:37 +0300

harry gravatar image

Hi, I created a Bluetooth LE request for the upcomming Jolla tablet. Please vote for it. If it happens for the tablet, it is more likely to come to the phone, too.

edit flag offensive delete publish link more

answered 2017-07-12 22:19:24 +0300

@Jaymzz Are there any plans to add the QtBluetooth module to the SDK in the upcoming release? Thank you for your response in advance!

edit flag offensive delete publish link more


Yes, I am also very interested in that. I have two apps waiting for that so they can be realeased in Jolla harbour.

jdrescher2006 ( 2017-07-13 14:14:33 +0300 )edit

@jdrescher2006 Did you built the missing Qt modules, or you have used libgato? Are the source of these apps available publicly?

martonmiklos ( 2017-07-13 15:07:16 +0300 )edit

answered 2016-10-23 21:41:57 +0300

mvdm gravatar image

hello i have jolla 1 and jolla c and a xiami band 2 i'm volunteer if someone will make test just ask

;~) mvdm

edit flag offensive delete publish link more


Have a Pebble 2 now which doesn't connect to Jolla 1 because of missing LE support. So would test, too if a beta would be available.

asys3 ( 2016-11-19 06:29:17 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2014-01-02 12:45:18 +0300

Seen: 6,910 times

Last updated: Sep 13