Hello,
I'm asking just for a hint, how to do stuff, as I'm probably missing someth=
ing obvoius.
My application controls all bluetooth events and options via DBus interface=
. I already use Connect/Disconnect methods of devices, their Trusted proper=
ty etc., as described here:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/device-api.txt
However, when I call CancelPairing method, I always receive DoesNotExist er=
ror.
My intention is to remove a paired device from the devices list, or at leas=
t mark is as "not paired", so that the device must pair again before anythi=
ng else.
Please note that setting the Paired property to "off" does not work as this=
property is read-only.
Also the solution of deleting the device's directory is not a good option f=
or me as the bluetooth daemon would probably need to be restarted.
How to invoke device removal or un-pair via DBus ?
Thanks for any answers!
Libor Peltan
VGhhbmsgeW91IGJvdGgsIFJhdmkgYW5kIEJhcnJ5LCB0aGlzIGhlbHBlZC4NCg0KLS0tLS1VcnNw
csO8bmdsaWNoZSBOYWNocmljaHQtLS0tLQ0KVm9uOiBSYXZpIE1pbm5pa2FudGkgW21haWx0bzpy
YXZpY2hhbmRyYW1pbm5pa2FudGlAZ21haWwuY29tXSANCkdlc2VuZGV0OiBEb25uZXJzdGFnLCA1
LiBBcHJpbCAyMDE4IDA3OjA3DQpBbjogTGlib3IgUGVsdGFuIDxscGVsdGFuQGluc3lzLXRlYy5k
ZT47IGxpbnV4LWJsdWV0b290aEB2Z2VyLmtlcm5lbC5vcmcNCkJldHJlZmY6IFJlOiBIb3cgdG8g
dW4tcGFpciBhIGRldmljZSB2aWEgREJ1cw0KDQpZb3UgY2FuIHVzZSBSZW1vdmVEZXZpY2UgbWV0
aG9kIGZyb20gb3JnLmJsdWV6LkFkYXB0ZXIxIGludGVyZmFjZS4NCg0KU2VlDQpodHRwczovL2dp
dC5rZXJuZWwub3JnL3B1Yi9zY20vYmx1ZXRvb3RoL2JsdWV6LmdpdC90cmVlL2RvYy9hZGFwdGVy
LWFwaS50eHQNCg0KLVJhdmkNCg0KT24gMDQtMDQtMjAxOCAyMToxMCwgTGlib3IgUGVsdGFuIHdy
b3RlOg0KPiBIZWxsbywNCj4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IGEgZ29vZCBvcHRpb24gZm9yIG1lIGFzIHRoZSBibHVldG9vdGggZGFlbW9uIHdvdWxkIHByb2Jh
Ymx5IG5lZWQgdG8gYmUgcmVzdGFydGVkLg0KPiANCj4gSG93IHRvIGludm9rZSBkZXZpY2UgcmVt
b3ZhbCBvciB1bi1wYWlyIHZpYSBEQnVzID8NCj4gDQo+IFRoYW5rcyBmb3IgYW55IGFuc3dlcnMh
DQo+IExpYm9yIFBlbHRhbg0KPiANCj4gLS0NCj4gVG8gdW5zdWJzY3JpYmUgZnJvbSB0aGlzIGxp
c3Q6IHNlbmQgdGhlIGxpbmUgInVuc3Vic2NyaWJlIA0KPiBsaW51eC1ibHVldG9vdGgiIGluIHRo
ZSBib2R5IG9mIGEgbWVzc2FnZSB0byBtYWpvcmRvbW9Admdlci5rZXJuZWwub3JnIA0KPiBNb3Jl
IG1ham9yZG9tbyBpbmZvIGF0ICBodHRwOi8vdmdlci5rZXJuZWwub3JnL21ham9yZG9tby1pbmZv
Lmh0bWwNCj4gDQo=
You can use RemoveDevice method from org.bluez.Adapter1 interface.
See
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt
-Ravi
On 04-04-2018 21:10, Libor Peltan wrote:
> Hello,
> I'm asking just for a hint, how to do stuff, as I'm probably missing something obvoius.
>
> My application controls all bluetooth events and options via DBus interface. I already use Connect/Disconnect methods of devices, their Trusted property etc., as described here:
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/device-api.txt
>
> However, when I call CancelPairing method, I always receive DoesNotExist error.
>
> My intention is to remove a paired device from the devices list, or at least mark is as "not paired", so that the device must pair again before anything else.
>
> Please note that setting the Paired property to "off" does not work as this property is read-only.
>
> Also the solution of deleting the device's directory is not a good option for me as the bluetooth daemon would probably need to be restarted.
>
> How to invoke device removal or un-pair via DBus ?
>
> Thanks for any answers!
> Libor Peltan
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>