Re: second scan timing out, bisected to 314b2381a79c6bfe3ddc4ba3806ecb6aec27a3db
From: Andre Guedes <hidden>
Date: 2011-08-30 14:53:04
Hi Oliver/Johan On Aug 30, 2011, at 10:52 AM, Oliver Neukum wrote:
Am Dienstag, 30. August 2011, 10:45:05 schrieb Johan Hedberg:quoted
Hi Oliver, On Tue, Aug 30, 2011, Oliver Neukum wrote:quoted
I think this is a real issue, but it only happens with the HCIINQUIRY ioctl which bluetoothd doesn't use (but hcitool does). I think the problems is with the following type of additions in the patch: + if (test_bit(HCI_MGMT, &hdev->flags) && + test_and_clear_bit(HCI_INQUIRY, &hdev->flags)) + mgmt_discovering(hdev->id, 0); Because of the ordering of the if-statement the HCI_INQUIRY flags doesn't get cleared if HCI_MGMT is not set and so the HCIINQUIRY ioctl doesn't trigger inquiry even though it should (see hci_inq_req in net/bluetooth/hci_core.c). Can you try to flip the ordering of the test_bit and test_and_clear_bit calls in all relevant if-statements in the patch and see if it resolves your issue?Hi, this patch makes it work again.
I'm working on a new version of discovery procedure support and I have the fix for this issue in that patch series (see [PATCH v2 01/16] Bluetooth: Periodic Inquiry and mgmt discovering event). Soon, I'll send the new version of discovery patches to ML. Andre