I have this error but dont know why. Because I have a function which is called advertising_stop(). I would like to implement the DFU part in my function but this error doesnt want to disappear.
Im using a nRF51422 and Keil v5
ifdef BLE_DFU_APP_SUPPORT
static void advertising_stop(void) {
uint32_t err_code;
err_code = sd_ble_gap_adv_stop();
APP_ERROR_CHECK(err_code);
nrf_gpio_pin_clear(ADVERTISING_LED_PIN_NO);
} ...
...
static void reset_prepare(void) { uint32_t err_code;
if (m_conn_handle != BLE_CONN_HANDLE_INVALID)
{
// Disconnect from peer.
err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
APP_ERROR_CHECK(err_code);
}
else
{
// If not connected, then the device will be advertising. Hence stop the advertising.
advertising_stop();
}
nrf_gpio_pin_clear(ADVERTISING_LED_PIN_NO);
nrf_gpio_pin_clear(CONNECTED_LED_PIN_NO);
err_code = ble_conn_params_stop();
APP_ERROR_CHECK(err_code);
}