Hi Arman, On Thu, Nov 20, 2014, Johan Hedberg wrote: > On Wed, Nov 19, 2014, Arman Uguray wrote: > > I now have a few of questions before I start implementing anything: > > > > 1. I'm confused about how the current code handles the case where > > hci_connect_le returns -EBUSY while handling an advertisement report. > > The code simply ignores the error and hci_conn object gets created, so > > the next time an advertisement report gets received and we call > > hci_connect_le, won't that just return early since > > hci_conn_hash_lookup_ba will return something? How will this actually > > ever get to adding the LE Create Connection request? > > Regarding advertising reports while there's a connect attempt in > progress, hci_connect_le() disables advertising before issuing > HCI_LE_Create_Conn so advertising should never be active while we're > trying to connect. Only once the connection times out or we're > successfully connected does advertising get re-enabled and we're ready > again to connect any other device that might be around. Sorry, you must have gotten quite confused by my bs here. I was obviously mixing advertising and scanning. My point still stands though: hci_connect_le also disables scanning for the connection attempt so no advertising reports should be coming while trying to connect. 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