Thread (6 messages) 6 messages, 2 authors, 2014-01-27

Re: [PATCH] Rename adapter_remove_device to btd_adapter_remove_device

flat view

From: Petri Gynther <hidden>
Date: 2014-01-27 19:31:52

Hi Johan,

Once BlueZ host and the remote have been paired successfully the first
time, the remote has a key combination available that allows it to be
unpaired and reset to initial state. But, BlueZ won't know about that.
It still considers the remote paired. Thus, when the BD address
arrives to the IR-assist plugin again, the plugin needs to clear all
old state from BlueZ side and start over as if the device had never
been discovered before.

The old device removal and new device creation are handled in the
plugin, since the device creation part is not possible over D-Bus.
However, once the device is created, the pairing is handled in a
separate Python script.

-- Petri

On Mon, Jan 27, 2014 at 10:13 AM, Johan Hedberg [off-list ref] wrote:
Hi Petri,

On Sun, Jan 26, 2014, Petri Gynther wrote:
quoted
I would need this for the IR-assist device discovery plugin that I'm
writing. Basically, I have a HID remote control which is not
discoverable (but it is connectable). When this HID remote is in
unpaired state, it sends its BD address to the host via IR. The plugin
will get the BD address and do the following:

device = btd_adapter_find_device(adapter, &device_bdaddr);
if (device) {
    /* remove old pairing and device info */
    btd_device_set_temporary(device, TRUE);
    btd_adapter_remove_device(adapter, device);
}
If the device is only discoverable through IR why would there be an
existing device object for it? And if there does exist a device object
doesn't it mean it's already paired and you don't need to repair?

Johan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help