ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #20415
Re: [Development] Bluetooth support for app development
On Wed, May 4, 2016 at 7:37 AM, Michael Zanetti <
michael.zanetti@xxxxxxxxxxxxx> wrote:
>
>
> On 04.05.2016 12:16, Konrad Zapalowicz wrote:
> > On 05/04, Matthijs wrote:
> >> Hi all,
> >>
> >> My apologies if this has been asked before, but I couldn't find amy
> info on
> >> it, so here it goes:
> >
> > No worries :)
> >
> >> I'm making an app for heartrate measurement with a bluetooth le sensor.
> I've
> >> been using the Qt bt framework and the app works perfectly on amd64
> >> platform, but qt bluetooth is not part of the armhf click chroot. As I
> >> understand I should be using bluez rather than Qt for bluetooth, but I
> just
> >> can not get the app to compile (headers of libbluetooth installed, but
> >> cannot link against lbluetooth).
> >
> > Are you sure that this library is installed? I ask because you mention
> > only the headers.
>
> Using QtBluetooth is fine, however, it is indeed not seeded in the
> image. For now you can ship those libs yourself in your click package,
> but we really should start shipping them in the image.
>
> Pat, Konrad, what's your opinions on that?
>
qml-module-qtbluetooth is installed since OTA 9 with libqt5bluetooth5
>
> Also note that right now you will only be able to publish any Bluetooth
> enabled app in the OpenStore. There are apparmor policies missing for
> Bluetooth.
>
> Again, Pat, Konrad, what's the ETA on that? I reported some bugs already
> for this with information on what would be required. Think we could put
> that on the roadmap for the near future now?
>
I will follow up on https://bugs.launchpad.net/bugs/1569582
Pat
> >
> >> Is there any information available on the steps to take to access a bt
> >> device on ubuntu phone, using C++?
> >
> > As for the BlueZ you must know that the communication is realized using
> > the DBus interfaces. The BlueZ is exposing an API that allows the
> > clients to pair, connect, etc... You may try to read the Ubuntu System
> > Settings sources Bluetooth plugin [1] to get the understanding how this
> > is done.
>
> I would not recommend to use the D-Bus interface directly in client
> apps, instead, go through QtBluetooth as far as it's possible.
>
> Here you can find some apps that make use of Bluetooth:
>
> * Using QBluetoothSocket for an RFCOMM connection to a smartwatch
> https://launchpad.net/rockwork
>
> * Using QBluetoothDeviceDiscoveryModel and QBluetoothFileTransfer to
> find nearby devices and send files to them.
> http://bazaar.launchpad.net/~mzanetti/+junk/ubtd/files/head:/shareplugin/
>
> Please let us know about your use cases to collect some experience on
> what apps would want to do with Bluetooth.
>
> Cheers,
> Michael
>
>
>
Follow ups
References