Mesh OTA couldn't resume after target node reset

Hi,

I use NCS 3.2.4 and 54L15 DK. In the DFU target, I added configuration

CONFIG_DFU_TARGET=Y
CONFIG_DFU_TARGET_MCUBOOT=y
CONFIG_DFU_TARGET_STREAM_SAVE_PROGRESS=y

and also added the following content in dfu_recover function.

static int dfu_recover(struct bt_mesh_dfu_srv *srv,
                       const struct bt_mesh_dfu_img *img,
                       const struct bt_mesh_blob_io **io)
{
    size_t offset = 0;

    int err = dfu_target_mcuboot_offset_get(&offset);
    if (err) {
        printk("Failed to get MCUboot offset (err %d)\n", err);
        offset = 0; 
    }

    printk("Recovering BLOB transfer, already written: %zu bytes\n", offset);

    err = bt_mesh_blob_io_flash_init(&blob_flash_stream,
                                     FIXED_PARTITION_ID(slot1_partition),
                                     offset);
    if (err) {
        return err;
    }    

    *io = &blob_flash_stream.io;
    return 0;
}

After the distributor finished transmitting 3 chunks more, I manually reset the target device. In the RTT window, I entered the shell command: mesh models dfu cli resume, but the command returned error -22.

How can I implement the resume/breakpoint resumption feature for Mesh OTA?

Parents Reply
  • Can you please zip and upload the applications that you are using, together with the build command you are using (even if it is just "west build -b nrf54l15dk/nrf54l15").

    If you are building using VS Code, right click the build configuration, and select "Copy build command" to copy the build command.

    Best regards,

    Edvin

Children
  • This is a modified target example used for testing; The distributor has not been modified. After configuring CONFIG_DFU_TARGET=y, a compilation error occurs due to multiple definitions of dfu_target_init. Since I don't want to modify the original SDK files, I copied dfu_target.c into the project and renamed it to dfu_target_init_.

    Build command: west build --build-dir e:/Nordic/Code/target_330/build e:/Nordic/Code/target_330 --pristine --board nrf54l15dk/nrf54l15/cpuapp -- -DDEBUG_THREAD_INFO=On -DCONFIG_DEBUG_THREAD_INFO=y -Dtarget_330_DEBUG_THREAD_INFO=Off -Dmcuboot_DEBUG_THREAD_INFO=Off

    target_330.rar

    Best regards,

    John

Related