Hello
Is it possible with the CC2640 to initiate and discover at the same time?
My goal is to be always ready to connect very fast to a upcomming slave who wants to connect with direct advertise. (whitelisted)
But also I want to receive all broadcasts from other devices.
Up to now I did not manage to realize it and I work with the following workaround:
1: Discovering
GAP_RegisterForHCIMsgs(selfEntity); //receive Broadcast & DirectAdvertise
GAP_SetParamValue(TGAP_FILTER_ADV_REPORTS, FALSE); // do not filter advertise reports
GAPRole_StartDiscovery(DEVDISC_MODE_ALL, FALSE, FALSE); //start scan
I do only discovering all the time to receive broadcasts and direct advertise.
(To receive the direct advertise events I changed the properties.)
When I receive a direct advetise event I go to step 2:
2: Initiating
GAPRole_CancelDiscovery();
GAPRole_EstablishLink(FALSE, FALSE, addrType, peerAddr); //connect
When the discovering receives a event from a direct advertise slave I stop discovering and I start initiating.
This solution is quite complicated and slow. Isn't it possible to discover and initiate at the same time?
I mean the radio receiver does the same if I discover or initiate. He just listen.
Thanks