This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI-RTOS
SDK: simplelink_cc2640r2_sdk_1_40_00_45
Device:CC2640R2_LAUNCHXL
IDE: IAR8.11.2
Hi,
I want to enable non connectable advertisement if my "xyz" condition true.
And here is how I did it
But as per my understanding "GAP_MakeDiscoverable(selfEntity, ¶ms);" will post "GAP_MAKE_DISCOVERABLE_DONE_EVENT" on both connectable and non connectable advertisement enable.
Issue is here (in multi.c):
In function "static uint8_t gapRole_processGAPMsg(gapEventHdr_t *pMsg)" and case "GAP_MAKE_DISCOVERABLE_DONE_EVENT"
-Each time "gapRole_AdvEnabled" is set to true. refer below snippet.
-So both variables "gapRole_AdvEnabled" and "gapRole_AdvNonConnEnabled" will become "true" :(
-As a result we can't even disable the advertisements. !!!!
-----------------------------------------------------------------------------------------------------------------------------------------
case GAP_END_DISCOVERABLE_DONE_EVENT:
{
gapMakeDiscoverableRspEvent_t *pPkt = (gapMakeDiscoverableRspEvent_t *)pMsg;
if (pPkt->hdr.status == SUCCESS)
{
// If advertising started
if (pMsg->opcode == GAP_MAKE_DISCOVERABLE_DONE_EVENT)
{
gapRole_AdvEnabled = TRUE;
}
..
}break;
-----------------------------------------------------------------------------------------------------------------------------------------
What can I Do?: