Correct procedure to reset BLE fast advertising interval timeout?

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

cross mob
Anonymous
Not applicable

Hi everyone!

   

The BLE fast advertising interval timeout can be configured in the GUI (for example 180 seconds). Let's say 100 seconds have elapsed and 80 seconds are left. What API call should I make to reset the fast interval timeout (back to 180 seconds).

   

CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST) does not appear to reset it.

   

Should I call CyBle_GappExitDiscoveryMode() before calling CyBle_GappStartAdvertisement()? It feels clunky to stop and restart advertising if I only want to reset the timeout.

   

Thanks in advance,

   

Pieter

0 Likes
1 Solution
Anonymous
Not applicable

Cypress may have better advice (since it is their chip after all :), but from what I've seen so far, stopping then restarting the advertisement might be the simplest method to achieve what you want. Or, you could handle the timeout event itself, and restart to an advertisement of the difference in time that "should still be left" from the application viewpoint.

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

Cypress may have better advice (since it is their chip after all :), but from what I've seen so far, stopping then restarting the advertisement might be the simplest method to achieve what you want. Or, you could handle the timeout event itself, and restart to an advertisement of the difference in time that "should still be left" from the application viewpoint.

0 Likes
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Pieter,

   

E.Pratt is correct. If advertising is in progress and you want to change any adv parameters , you have to stop adverting and start again.

   

Thanks,
Anjana

Anonymous
Not applicable

Hi e.pratt and Anjana,

   

Thanks for the advice! I have implemented your recommendation and it works.

   

I make a call to CyBle_GappExitDiscoveryMode() and wait for the CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP event to indicate that advertising has stopped and then I make a call to CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST) to restart advertising.

   

Kind regards,

   

Pieter

0 Likes