Duration of DFU for multiple nodes simultaneously

Hi,

I made DFU procedure with a distributor (nRF52840 DK) and one target (nRF52840 dongle): procedure completed successfully in approximately 45min

Then I made:DFU procedure with:

a distributor and two target: procedure completed successfully in approximately 90min (that is 2*45min)

a distributor and four target: procedure completed successfully in approximately 180min (that is 4*45min)

a distributor and six target: procedure completed successfully in approximately 270min (that is 6*45min)

a distributor and eight target: procedure completed successfully in approximately 360min (that is 8*45min)

So it seems that if I have N targets,to update,  the DFU procedure will take about N*45min! A lot of time, in particular if N>>1!

Is it possible to know how the procedure is realized? The Distributor sends packets to only a target at a time or it sends packets to all targets simultaneously and then waits for acks?

Thanks in advance for your response

  • Yes of course, I see I was a bit too quick yesterday. Here's the command:

    > mesh models dfd start  <AppKeyIdx> <SlotIdx> [<Group> [<PolicyApply> [<TTL> [<TimeoutBase> [<XferMode>]]]]]

    For instance

    > mesh models dfd start 0 0 0xc000 0 2 2

    You find the explanation of the dfd commands here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/mesh/shell.html#mesh-models-dfd-get

    Kind regards,
    Andreas

  • Hi,

    I increased as you said the timeout value ( I set it to 1) and this resolved the previous issue, but at the same time created another one!

    Now, when I simply try to update one target, these are the last messages sent by Distributor through serial communication at the end of the process:

    Distribution phase changed to Applying Update
    [17:22:01.676,086] <dbg> bt_mesh_dfu_cli: apply:
    [17:22:01.676,086] <dbg> bt_mesh_blob_cli: blob_cli_broadcast: 1 targets
    [17:22:01.982,879] <dbg> bt_mesh_dfu_cli: handle_status: 0 phase: 6, cur state: 4
    [17:22:01.982,910] <dbg> bt_mesh_dfu_cli: handle_status: Target 0x001d receiving transfer
    [17:22:10.910,430] <dbg> bt_mesh_blob_cli: retry_timeout: 5
    [17:22:20.075,195] <dbg> bt_mesh_blob_cli: retry_timeout: 4
    [17:22:29.234,588] <dbg> bt_mesh_blob_cli: retry_timeout: 3
    [17:22:38.400,756] <dbg> bt_mesh_blob_cli: retry_timeout: 2
    [17:22:47.553,466] <dbg> bt_mesh_blob_cli: retry_timeout: 1
    [17:22:47.553,497] <dbg> bt_mesh_blob_cli: retry_timeout: Transfer timed out.
    [17:22:47.553,497] <dbg> bt_mesh_blob_cli: drop_remaining_targets:
    [17:22:47.553,527] <wrn> bt_mesh_blob_cli: Dropping 0x001d: 9
    [17:22:47.553,527] <err> bt_mesh_dfu_cli: Target 0x001d failed: 3
    [17:22:47.553,558] <dbg> bt_mesh_blob_cli: broadcast_complete: continuing
    [17:22:47.553,588] <dbg> bt_mesh_dfu_cli: dfu_failed: 3
    [17:22:47.553,588] <dbg> bt_mesh_dfd_srv: dfu_ended: reason: 3, phase: 3, apply: 1
    Distribution phase changed to Failed

    So, Distribution seems to fail but, surprise, after these messages (two or three seconds) I can see my target resetting (at reset I switch on a led for a couple of seconds) and, when I verifiy if new firmware was properly updated on Target (I read a variable of mine which contains new firmware version), the result is OK, that is: actually, Distribution doesn't fail but ends successfully!

    Why this happen?

    It seems that as log as there are retries, the target doesn't begin to apply new firmware...

    Let me know, thanks

  • Hi,

    Apologies for the long response time. I had to verify something from the developers:

    Regarding the linear relation between DFU duration and number of devices. It is true that time required is almost linear if unicast transfer is done. If group transfer is used transfer time will increase only little bit due to additional number of nodes in a group.

    Regarding the maximum amount of supported targets, the configuration for maximum supported targets should be what we're looking for, i.e the bt_mesh_dfd configuration referring to https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX

    Kind regards,
    Andreas

Related