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

problem adding dfu service to existing project

Hi,

I have have one ble project which is using softdevice s110. so that i want to extend this project by adding DFU service to it like shown here devzone.nordicsemi.com/.../a00076.html

Because my project dont have bootloader_dfu file so i copied sdk11 and included in my project. problem is i included files (ble_dfu, dfu_app_handler.c, bootloader_util) from the programfiles->keil_>pack_>noedicsemiconductor->libraries. and also included .h files in my main.c like

#ifdef BLE_DFU_APP_SUPPORT
#include "ble_dfu.h"
#include "dfu_app_handler.h"
#endif // BLE_DFU_APP_SUPPORT
and added reset_prepare()
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);
        err_code = bsp_indication_set(BSP_INDICATE_IDLE);
        APP_ERROR_CHECK(err_code);
    }
    else
    {
        // If not connected, the device will be advertising. Hence stop the advertising.
        advertising_stop();
    }

    err_code = ble_conn_params_stop();
    APP_ERROR_CHECK(err_code);

    nrf_delay_ms(500);
}

and copied and added all dfu initialisations from ble_app_hrs_main.c file the problem is while compiling in keil in some files like ble_gatts.h, ble_gap.h files, showing errors that

  1. structure unnamed no fields 2)and also some functions are not recognising.
Related