Advertisement by command.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
D_Sd_3235936
Level 4
Level 4
25 sign-ins 50 questions asked 25 replies posted

Currently my advertisement has :

cyBle_discoveryModeInfo.advParam->advIntvMin = CYBLE_SLOW_ADV_INT_MIN;

cyBle_discoveryModeInfo.advParam->advIntvMax = CYBLE_SLOW_ADV_INT_MAX;

Can i advertise one packet by command wherever i want in code and close advertisement until i want to send the next one ?

Without having the thresholds active?

0 Likes
1 Solution
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

We can advertise with selected no. of packets using the API " CyBle_GappSetNumOfAdvPkts (CYBLE_GAPP_DISC_MODE_INFO_T *advInfo, uint16 NumOfAdvPkts) " this function sets number of advertisement packets to be sent over the air and starts Advertisement. Gap Peripheral receives CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP event after specified no. of adv packets are transmitted successfully.

To start and stop the advertisement wherever you want below APIs can be used in code:

CyBle_GappStartAdvertisement (uint8 advertisingIntervalType) - This function is used to start the advertisement.

Similarly, CyBle_GappStopAdvertisement (void ) - This function can be used to exit from discovery mode. After the execution of this function, there will no longer be any advertisements.

Please refer the component datasheet for more information on these APIs.

Thanks,

PSYU.

View solution in original post

0 Likes
1 Reply
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

We can advertise with selected no. of packets using the API " CyBle_GappSetNumOfAdvPkts (CYBLE_GAPP_DISC_MODE_INFO_T *advInfo, uint16 NumOfAdvPkts) " this function sets number of advertisement packets to be sent over the air and starts Advertisement. Gap Peripheral receives CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP event after specified no. of adv packets are transmitted successfully.

To start and stop the advertisement wherever you want below APIs can be used in code:

CyBle_GappStartAdvertisement (uint8 advertisingIntervalType) - This function is used to start the advertisement.

Similarly, CyBle_GappStopAdvertisement (void ) - This function can be used to exit from discovery mode. After the execution of this function, there will no longer be any advertisements.

Please refer the component datasheet for more information on these APIs.

Thanks,

PSYU.

0 Likes