Hello everyone
I'm trying to disable advertising but it doesn't work in some cases, I don't really know why. Here is my pretty simple piece of code:
/* Disconnect and then disable advertising */
if (m_conn_handle != BLE_CONN_HANDLE_INVALID)
{
sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
}
uint32_t err_code = sd_ble_gap_adv_stop();
APP_ERROR_CHECK(err_code);
The issue I'm having is that I got the BLE_ADV_EVT_SLOW
after a few seconds, when the fast advertising interval expires. I guess the timer is not stopped...
Also, I have seen sometimes that the timer is not stopped instantly when app_timer_stop
is called. The handler is called one last time before being stopped.
I use SDK v11 with S132 v2.0.0 (nRF52)