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 <johan.hedberg@xxxxxxxxx> wrote: > Hi Petri, > > On Sun, Jan 26, 2014, Petri Gynther wrote: >> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html