Hi Richard,

we recently made certain BlueZ D-Bus methods restricted to the
privileged group. This was done because some operations, like
creating or removing pairings, should happen only via the OS bluetooth
UI. The method you noticed, org.bluez.Adapter.CreateDevice, is also in
this list.

Since you need a device object path to be able to call
org.bluez.Device.DiscoverServices a non-privileged app can retrieve
service records over D-Bus for a device that has already been created,
but not for one that hasn't.

Unfortunately checking the Qt code shows that it always calls
CreateDevice, even if the device already exists... and only proceeds
with FindDevice if the returned error for that is AlreadyExists. So
that will stop you even if the headset has been paired already.

We'll review what is the best way to correct this. The plan is of
course to check all issues like this before officially allowing Qt
Bluetooth API as a shared library in harbour...

In the meanwhile, you should be able to work around this by patching
your copy of Qt Bluetooth to call CreateDevice only after FindDevice,
and then service discovery should work for paired devices.

BR,
H.
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to