Changing advertisement intervals

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

cross mob
Anonymous
Not applicable

Hello Everyone,

   

I am using my Cypress BLE as a broadcaster. Is there any API to change the advertisement intervals in my code? 

   

Thank you

0 Likes
1 Solution
Anonymous
Not applicable

Hi Dharav,

   

You need to update the advertisement intervals only when the device is not broadcasting/advertising. So let's assume you have stopped broadcasting either by using CyBle_ExitDiscoveryMode() or CyBle_GappStopAdvertisement(). Include the below lines for restarting the broadcast with different adv intervals:

   

                cyBle_discoveryModeInfo.advTo = (Adv Timeout);
                cyBle_discoveryModeInfo.advParam->advIntvMin = (Min Adv Interval/0.625);
                cyBle_discoveryModeInfo.advParam->advIntvMax = (Max Adv Interval/0.625);
                CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_CUSTOM); //you can also use EnterDiscoveryMode() instead

View solution in original post

0 Likes
1 Reply
Anonymous
Not applicable

Hi Dharav,

   

You need to update the advertisement intervals only when the device is not broadcasting/advertising. So let's assume you have stopped broadcasting either by using CyBle_ExitDiscoveryMode() or CyBle_GappStopAdvertisement(). Include the below lines for restarting the broadcast with different adv intervals:

   

                cyBle_discoveryModeInfo.advTo = (Adv Timeout);
                cyBle_discoveryModeInfo.advParam->advIntvMin = (Min Adv Interval/0.625);
                cyBle_discoveryModeInfo.advParam->advIntvMax = (Max Adv Interval/0.625);
                CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_CUSTOM); //you can also use EnterDiscoveryMode() instead

0 Likes