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

buttenlesss dfu interactive command and secure dfu uart

after accomplish merging buttonless dfu and interactive command -->the application

https://devzone.nordicsemi.com/f/nordic-q-a/72701/merging-interactive-command-and-buttonless-dfu-base-on-sdk-_17-0-2

doing lots of testing on my application show the application works correctly on buttonless dfu and upload the application with on air update(using  iphone application dfu upload)

after upload from my phone the apllication works fine

now im trying dfu uart upload but strange thing happened using same application to upload with dfu_uart

but the application caanot work does anyone know why(no error showing) 

knowing error because the interactive command does not wort

Parents
  • Hello,

     

    now im trying dfu uart upload but strange thing happened using same application to upload with dfu_uart

    but the application caanot work does anyone know why(no error showing) 

    knowing error because the interactive command does not wort

     Have you tried debugging? It is not clear to me whether your application is starting or not. Try logging something in the start of your application and see if it shows. Try using another log backend than the uart, if your application is using UART for CLI or something. Use the RTT log backend, and disable deferred logging (set it to 0 in sdk_config.h). 

    Please note that if you have programmed a bootloader, you can't program the application directly with a programmer without also programming the bootloader settings. And if you want to run a debug session, make sure that the IDE is not programming the application, as this will probably not match the bootloader settings. Test this with an application that you know is working before you try it on the application you are not sure of. If you are not sure how to do this, please let me know what IDE you are using.

    Best regards,

    Edvin

  • 6445.sdk_config.hsdk_config

    i found out the code stuck in 

    uint32_t ble_dfu_buttonless_async_svci_init(void)
    {
        uint32_t ret_val;
    
        ret_val = nrf_dfu_svci_vector_table_set();
        VERIFY_SUCCESS(ret_val);
    
        ret_val = nrf_dfu_set_adv_name_init();
        VERIFY_SUCCESS(ret_val);
    
        ret_val = nrf_dfu_svci_vector_table_unset();
    
        return ret_val;
    }

    which is in ble_dfu_unbonded.c

  • the entire application stops and also 

      

    nothing shows

  • Can I replicate this on a DK? If so, can you upload the project that I need to do so?

  • s140_nrf52_7.2.0_softdevice 

    sdk 17.0.2

    nrf52840 

    using segger embedded studio 

  • Ok, I think the CLI is interacting with the RTT log in some way. I am not sure why I can't see any log on the RTT, but the error log appears on the CLI window.

    Either way.

    Your application requires a bootloader, so I flashed a bootloader and some bootloader settings. 

    But if I understand you correctly, the issues appear when you try to add UART to the bootloader? If so, I think I would need your bootloader as well. 

    Is your application main reached at all? Please note that to debug while a bootloader is present, you need to generate and program bootloader settings, and in SES, you need to program the application using nrfjprog, and then in segger embedded studio, use the Target -> Attach debugger:

    Additionally, your application's main.c file has:

    ret_code_t err_code;

    APP_ERROR_CHECK(err_code) // two times, actually.

    So you check the err_code that is not set to a value. Ideally, it will be 0 by default, but if the RAM has been used for something else, then it may contain some random value. Either remove the APP_ERROR_CHECK() or set the err_code = NRF_SUCCESS in main.c

Reply Children
  • So no BLE in the bootloader at all, then? 

    In that case, you need to remove the ret_val = nrf_dfu_set_adv_name_init(); in ble_dfu_buttonless_async_svci_init() in ble_dfu_unbonded.c.

    But really, it doesn't make much sense to use a buttonless dfu service if you are only using a bootloader that only supports UART. If you intend to have a bootloader that supports both uart and BLE, then you can put the nrf_dfu_set_adv_name_init() when you have included the BLE transport in the bootloader.

    Best regards,

    Edvin

Related