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.
Parents
  • Looks like I have ran into a problem after flashing bootloader "dfu_dual_bank_ble_s130_pca10028.hex"; Softdevice "s130_nrf51_2.0.0_softdevice.hex" and example Application "ble_app_hrs". After which I don't see the device responding or showing its name on nRFConnect app. When I tried opening the device in nRFgo studio, it shows "Segger 681857041" under "nRF51 development boards" but doesn't detect nRF51 chip onboard of nRF51DK. So the J-Link works fine but nRF51 doesn't responds for some reason, I tried erasing the flash using "nrfjprog" utility but got a reply "ERROR: Cannot connect to any nRF device. Please make sure a device is connected tot he debugger and supplied." Any help would be appreciated.

Reply
  • Looks like I have ran into a problem after flashing bootloader "dfu_dual_bank_ble_s130_pca10028.hex"; Softdevice "s130_nrf51_2.0.0_softdevice.hex" and example Application "ble_app_hrs". After which I don't see the device responding or showing its name on nRFConnect app. When I tried opening the device in nRFgo studio, it shows "Segger 681857041" under "nRF51 development boards" but doesn't detect nRF51 chip onboard of nRF51DK. So the J-Link works fine but nRF51 doesn't responds for some reason, I tried erasing the flash using "nrfjprog" utility but got a reply "ERROR: Cannot connect to any nRF device. Please make sure a device is connected tot he debugger and supplied." Any help would be appreciated.

Children
No Data
Related