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

Where is nrf_dfu_set_adv_name_init defined?

Seems i can not find where nrf_dfu_set_adv_name_init is defined? It seems not in SDK source files, neither can find any sign on SDK documents.

Thank you.

Parents
  • Hi Rolandash,

    nrf_dfu_set_adv_name_init is defined by the Asynchronous supervisor function interface NRF_SVCI_ASYNC.

    You can find this macro in ble_dfu_unbonded.c

    NRF_SVCI_ASYNC_FUNC_DECLARE(NRF_DFU_SVCI_SET_ADV_NAME, nrf_dfu_set_adv_name, nrf_dfu_adv_name_t, nrf_dfu_set_adv_name_state_t);
    

    "The async interface provides a method to call into a external application through the SVCI interface without relying on allocated or reserved memory inside the external application."

    Basically it's the call from the buttonless application to the bootloader to write the advertising name that the application want the bootloader to advertise. You can find the call nrf_dfu_set_adv_name() in set_adv_name() inside ble_dfu_unbonded.c. This call will trigger nrf_dfu_set_adv_name_on_call() inside nrf_dfu_svci_handler.c in the bootloader.

  • my understanding is unless nRF connection client sends out the reboot command then DFU service will reset and get into bootloader? Before that 52 will stay in current app. But the log is just missing after SVC thus i could not locate where the app actually reached. Take the following code fragment as an example:

    {

    ....

    services_init();
    NRF_LOG_INFO("services initialized.");
    NRF_LOG_FLUSH();
    
    advertising_init();
    
    conn_params_init();
       
    advertising_start();
    
    NRF_LOG_INFO("start advertising...");
    NRF_LOG_FLUSH();
    

    .....

    }

    DFU service is initialized inside 'services_init()', during execution the log message "services initialized." and "start advertising..." is never shown. However it does starting advertising as i can find the services from Iphone client app.

Reply
  • my understanding is unless nRF connection client sends out the reboot command then DFU service will reset and get into bootloader? Before that 52 will stay in current app. But the log is just missing after SVC thus i could not locate where the app actually reached. Take the following code fragment as an example:

    {

    ....

    services_init();
    NRF_LOG_INFO("services initialized.");
    NRF_LOG_FLUSH();
    
    advertising_init();
    
    conn_params_init();
       
    advertising_start();
    
    NRF_LOG_INFO("start advertising...");
    NRF_LOG_FLUSH();
    

    .....

    }

    DFU service is initialized inside 'services_init()', during execution the log message "services initialized." and "start advertising..." is never shown. However it does starting advertising as i can find the services from Iphone client app.

Children
No Data
Related