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

DFU->error after executing "err_code = ble_dfu_init(&m_dfus, &dfus_init)

My problem: The run of my 1. DFU - Implementation delivers an error code after executing the line "err_code = ble_dfu_init(&m_dfus, &dfus_init);". For my opinion this is caused by reservice_uuid.type = 0.

The parameter of my application are the following:

nRF52832, S132, SDK11.

The function is called in the suggested order:

static void services_init(void)
{
	#ifdef BLE_DFU_APP_SUPPORT
	uint32_t err_code;
	#endif // BLE_DFU_APP_SUPPORT
    // STEP 2: Add code to initialize the services used by the application.
	our_service_init(&m_our_service);
	#ifdef BLE_DFU_APP_SUPPORT
    /** @snippet [DFU BLE Service initialization] */
    ble_dfu_init_t   dfus_init;

    // Initialize the Device Firmware Update Service.
    memset(&dfus_init, 0, sizeof(dfus_init));

    dfus_init.evt_handler   = dfu_app_on_dfu_evt;
    dfus_init.error_handler = NULL;
    dfus_init.evt_handler   = dfu_app_on_dfu_evt;
    dfus_init.revision      = DFU_REVISION;

    err_code = ble_dfu_init(&m_dfus, &dfus_init);
    APP_ERROR_CHECK(err_code);                                 --> RESET

The initialization and advertising of an second own service works fine. What did I do wrong?

Parents
  • My first comment described only an intermediate state. The final solution results of the reading of the answer of a former question and is based on the definition of two UUIDs:

    ble_enable_params.common_enable_params.vs_uuid_count = 2;	//NUMBER OF UUIDs;
    

    and the repetition of finding the new base number by help of the return values of

    err_code = sd_ble_enable(&ble_enable_params,&app_ram_base);
    

    Now the advertiser offeres the Own-Service-UUID and the DFU-UUID.

Reply
  • My first comment described only an intermediate state. The final solution results of the reading of the answer of a former question and is based on the definition of two UUIDs:

    ble_enable_params.common_enable_params.vs_uuid_count = 2;	//NUMBER OF UUIDs;
    

    and the repetition of finding the new base number by help of the return values of

    err_code = sd_ble_enable(&ble_enable_params,&app_ram_base);
    

    Now the advertiser offeres the Own-Service-UUID and the DFU-UUID.

Children
No Data
Related