3 Replies Latest reply on May 24, 2017 6:59 AM by epr_1639216

    directed advertising


      Does somebody has experience, or even better an example, how to use directed advertising with the PRoC modules?


      I have a project where i use one PRoC module as Central, and another one as peripheral.


      Everything is working fine, as long as i do not use directed advertising.


      Please have a look a the following code  snippet:


          apiResult = CyBle_Start(BLE_StackEventHandler);
          memcpy(&discParam, &cyBle_discoveryParam, sizeof(discParam));
          memcpy(discParam.directAddr, PairingAddress.bdAddr, sizeof(discParam.directAddr));
          discParam.directAddrType = PairingAddress.type;
          discParam.advFilterPolicy = CYBLE_GAPP_SCAN_CONN_WHITELIST_ONLY;
          discParam.ownAddrType = ownAddr.type;
          discModeInfo.discMode = CYBLE_GAPP_GEN_DISC_MODE;
          discModeInfo.advParam = &discParam;
          discModeInfo.advData = &cyBle_discoveryData;
          discModeInfo.scanRspData = &cyBle_scanRspData;
          discModeInfo.advTo = 0;


          CYBLE_API_RESULT_T apiResult = CyBle_GappEnterDiscoveryMode(&discModeInfo);


      This code snippet works as expected. But as soon as I uncomment one of the lines which sets "discParam.advType" to  one of the *DIRECTED_ADV modes, no further connections are possible.


      BTW: PairingAddress holds the address of the associated peer.


      I am using the BLE component V2.30.


      What am I missing?




      Best regards,