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

BLE DFU Issue

Hi,

I am trying to develop the DFU capability for my device.

I added the necessary code from the example ble_app_buttonless_dfu to my application.

then started as explained in this step by step guide:

https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader#h23sjziacp7vrw0scs2t3tua1ax0426

I flash the softdevice then the bootloader, then DFU the application successfully, but the application doesn't start up at all,

then I tried to debug the application and it is also doesn't start up, it behaves like when flashing the application without the softdevice.

I noticed in the.

when I flash only the softdevice and the application everything works fine when I comment the DFU service and the ble_dfu_buttonless_async_svci_init function.

seems like the bootloader not jumping to the application even after a successful DFU.

Please help

BR

JK

  • Hi Einar,

    I am very stressed to solve this issue and I am running out of time  Disappointed.

    the function ble_dfu_buttonless_async_svci_init returns an error only when there s no bootloader flashed to the device.

    after I am DFUs the device I finally can debug the application FW, and I don't have any errors, so I don't know where the problem this !

    How can we found what is the problem to solve it ?

    finally some question I don't know if it is relevant:

    do I have to add the following code

                err_code = nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle);
                APP_ERROR_CHECK(err_code);

    under the BLE_GAP_EVT_CONNECTED case in the ble_evt_handler function ?

    BR

    JK

  • Hi JK,

    jawadk said:
    How can we found what is the problem to solve it ?

    You need to understand what error occurs in the application. I suggest we start by summing up what we know after the tests you have done so far:

    • The application works and runs correctly when you don't have a bootloader and don't initialize the buttonless DFU service by calling ble_dfu_buttonless_async_svci_init() (this function will return an error if a bootloader is not present).
    • DFU works, and the bootloader starts the application.
    • When the application is started by the bootloader and you don't call ble_dfu_buttonless_async_svci_init() everything works correctly.

    Is the above a correct understanding?

    If yes, then you need to debug the application when the bootloader is present after adding the call to ble_dfu_buttonless_async_svci_init(). The simplest way to get started is to enable debug logging in the application. Is an error printed? If so, and you are using a debug build, you should see the file name, line number, and error code, which corresponds to a function call. Do you see that? Please past the log here. (Just to be clear, now we are talking about the log form the application, we are no longer interested in the bootloader since we know that is working.)

    To be clear: the key question now is what exactly is it that fails in the application and how? You need to find that through logging or debugging.

    Regarding the question about nrf_ble_qwr_conn_handle_assign(), then yes, you should do that if you are using the Queued write module (which most SDK examples do). If not, then you should not add it.

    Einar

  • Hi Einar,

    when I was testing the third point you noted above the nrf connect app wasn't able to connect anymore to the nRF52840 device anymore.

    I did a communication reset for the phone and suddenly everything works fine !!!

    I spent the whole day on this and the solution is a communication reset for the phone Disappointed.

    so basically my problem was to increase the NRF_SDH_BLE_VS_UUID_COUNT and to set the RAM start address correctly.

    Thank you very much for your help

    BR

    JK

  • Hi JK,

    I am glad to hear you got it working. Thanks for letting us know.

    Einar

Related