You are here

Connectable directed advertising type | Cypress Semiconductor

Connectable directed advertising type

Summary: 2 Replies, Latest post by charlotte.chen_1957756 on 11 Nov 2016 06:38 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
charlotte.chen_1957756's picture
User
2 posts

I've a CYBLE-022001-00 BLE PRoC module and it is configured as GAP peripheral device. My intention is to only allow it to be discovered by a single GAP central device. Therefore, I've tried to choose "Connectable directed advertising" type in the GAP Settings (also to populate the target Random device address in the advertising packet). However, this option is not available in the dropped down list. I would appreciate if someone has an idea/suggestion. Thanks!

Anjana Muralidharan's picture
Cypress Employee
61 posts

Hi,

You can make Direct advertising enable in the firmware. For changing the advertising type, change the adv parameters in the firmware.

Refer the below code:

                    /*Set the Advertising type*/
                    cyBle_discoveryModeInfo.advParam->advType=CYBLE_GAPP_CONNECTABLE_LOW_DC_DIRECTED_ADV;
                    /*Set the type of address to central*/
                    cyBle_discoveryModeInfo.advParam->directAddrType= provide the type;
                    /*Use central device address for direct advertising*/
                    cyBle_discoveryModeInfo.advParam->directAddr[5]=CentralbdAddr[5];
                    cyBle_discoveryModeInfo.advParam->directAddr[4]=CentralbdAddr->bdAddr[4];
                    cyBle_discoveryModeInfo.advParam->directAddr[3]=CentralbdAddr->bdAddr[3];
                    cyBle_discoveryModeInfo.advParam->directAddr[2]=CentralbdAddr->bdAddr[2];
                    cyBle_discoveryModeInfo.advParam->directAddr[1]=CentralbdAddr->bdAddr[1];

cyBle_discoveryModeInfo.advParam->directAddr[0]=CentralbdAddr->bdAddr[0];  

/*Enter discovery mode*/
                CyBle_GappEnterDiscoveryMode(&cyBle_discoveryModeInfo);

Please refer the BLE component datasheet for API descriptions.

Thanks,

Anjana
                                                                                                          

 

charlotte.chen_1957756's picture
User
2 posts

Thank you for your response. Will try!

Charlotte

Log in to post new comments.