You are here

directed advertising | Cypress Semiconductor

directed advertising

Summary: 2 Replies, Latest post by Enz on 02 Mar 2016 05:03 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
Enz's picture
5 posts

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,


roit's picture
Cypress Employee
221 posts

I haven't tried your code, but you can give a look at the following project, which uses something similar:

Enz's picture
5 posts

Thanks for the info.

That helped a bit. But maybe I misunderstand something: Is the bonding required to use direct advertising?

Log in to post new comments.