Hi, I am using nrf52832 with SDK 15.2.0 and nrf 52 dev board. I want change advertising interval in run time so I call a function with the interval as the parameter change_adv_interval (interval ) every time that I will change.
Thanks in Advance.
Hi, I am using nrf52832 with SDK 15.2.0 and nrf 52 dev board. I want change advertising interval in run time so I call a function with the interval as the parameter change_adv_interval (interval ) every time that I will change.
Thanks in Advance.
Hi Prashant
You need to stop and start the advertising when you do your updates. It should be possible with something similar to this:
sd_ble_gap_adv_stop(); ble_gap_adv_params_t adv_params; memset(&adv_params, 0, sizeof(adv_params)); adv_params.interval = interval; adv_params.timeout = 0; err_code = sd_ble_gap_adv_start(&adv_params); APP_ERROR_CHECK(err_code);
Best regards,
Simon
Thanks It Works
Thanks It Works