dfu_cmd_handler_set out of bound error

I'm trying to get DFU working with LPN on the 833.

The sequence I follow is:

(Erase board)

Flash Soft Device
Flash Bootloader (Using mesh, but don't want serial) 

Flash Device Page
Flash Application

However once I restart the application, DFU doesn't work because of the dfu_cmd_handler_set function.

handler: 160407 (0x27297), end_get: 524288 (0x80000), bootloader 491520 (0x78000)

It appears as though it's because the handler has a lower address than the bootloader.

How am I supposed to have DFU running to perform the upgrade?

Physical access to the device won't be possible later so OTA is imperative. 

Thanks!

  • I should clarify I am building this in eclipse with gcc 

  • Hi Alex, 

    Please clarify which bootloader did you flash ? 
    Please be aware that LPN node doesn't support DFU update via mesh. The only DFU update it supports is via BLE. This mean you need to flash the BLE DFU Bootloader from nRF5 SDK not the Mesh DFU Bootloader from Mesh SDK. 

    Please have a look at the documentation here.

  • Hi Hung,

    Had a break through this morning, if anyone is looking to achieve what I added:

    uint32_t ble_dfu_buttonless_bootloader_start_finalize(void)
    {
        uint32_t err_code;
    
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO,"In ble_dfu_buttonless_bootloader_start_finalize \n");
    
        err_code = sd_power_gpregret_clr(0, 0xffffffff);
    
        err_code = sd_power_gpregret_set(0, BOOTLOADER_DFU_START);
    
        // Indicate that the Secure DFU bootloader will be entered
       // m_dfu.evt_handler(BLE_DFU_EVT_BOOTLOADER_ENTER); This was not necessary
    
        // Signal that DFU mode is to be enter to the power management module
        nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_DFU);
    
        return NRF_SUCCESS;
    }
    


    I then have a custom command that says "request bootloader" received over mesh. We also have a charger detect so I use that as a double check to say "Only enter bootloader mode if I'm on a charger".

    The steps then are:

    ->Program SD
    ->Program secure bootloader (should be in the SDK bin (not Mesh SDK)

    ->Upload via DFU in nRFConnect (I used the app)

    Done

    I hope this helps someone else out! 


Related