If inquiry is active when bluetoothd starts up, it will get an error from the HCI layer when it tries to execute the StartDiscovery dbus call. This error in turn will prevent the list of devices which have been discovered and reported over dbus from being cleared, which will make many devices undiscoverable. This patch handles the case where the adapter is in periodic inquiry mode at startup. It issues a command to cancel periodic inquiry at startup if the adapter is not known to be in standard inquiry mode. --- src/adapter.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/adapter.c b/src/adapter.c index 614a430..1ebc766 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2176,6 +2176,9 @@ setup: if (hci_test_bit(HCI_INQUIRY, &di.flags)) { debug("inquiry_cancel at adapter startup"); inquiry_cancel(dd, HCI_REQ_TIMEOUT); + } else { + debug("periodic_inquiry_exit at adapter startup"); + periodic_inquiry_exit(dd, HCI_REQ_TIMEOUT); } adapter->state &= ~STD_INQUIRY; -- 1.5.6.5 -- 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