This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Stop advertising inside function ble_evt_handler() by calling sd_ble_gap_adv_stop()

Dear Sir,

I am implementing a program in which I need to stop advertising inside the  function ble_evt_handler() .

I am starting the advertising by calling the function ble_advertising_start().

Can I call the function  sd_ble_gap_adv_stop() inside ble_evt_handler()  to stop the current instance of advertising(depending on a condition)?

If it is possible,  how can I get the "advertising handle" (to be used for function  sd_ble_gap_adv_stop() )?

And how can I stop the advertising?

Thanking you in advance.

with regards,

Geetha

Parents Reply Children
No Data
Related