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

nrfutil DFU upload extremely slow

as already written in other threads (two years old) the DFU upload with nrfutil is extremely slow.

Transferring the same data from a smartphone (with BLE5) takes about 20seconds, with nrfutil 2 minutes or more.

We use nrf52840 DKs for the PC side and our board.

We use the following command to run the update.

nrfutil dfu ble -ic NRF52 -pkg app_dfu_package.zip -snr $(NRF52840_SNR_BLE) -n "MY_NAME" -f -cd 0

nrfutil version 6.0.0a1

What could be the reason for the slow update. Is there anything we can do to speed this up?

Parents
  • Hello,

    So the device that is "connected" to nrfutil, the nRF52840 DK. Can you please test by using the same DK on nRF Connect for Desktop to perform the DFU? Is the speed the same there?

    What nRF chip does your target use? I assume that this is not the issue, since it is faster using the smartphone.

    The nRF52840 DK is erased at one point between two years ago and now? So that it is not running the nrfutil FW flashed 2 years ago? Try "nrfjprog -e" before the "nrfutil dfu ble ..."

    So. 

    1. Please test nRF Connect for Desktop.

    2. Please try to update nrfutil to the non-alpha version 6.0.0 found here

    Let me know about your results. 

    BR,
    Edvin

  • Hi Edvin,

    the connectivity firmware on the nrf52840 DK was recently flashed.When using nrfConnect (2.6.2) another fw is flashed.

    With nrfConnect the upload speed is similar as from a smartphone.

    The target uses also nrf52840.

    The non alpha version shows the same behaviour.

    We tested this from Linux and Windows.

    Florian

  • Hello Florian,

    I am struggling a bit with reproducing this. In my case it takes roughly the same time to transfer a DFU image using nRF Connect for Desktop and nrfutil. I didn't time it, but it was roughly 20 seconds, and nowhere near the 2 minutes. 

    Is your DFU image, i.e. the application particularly big, or similar to the size of the examples in the SDK?

    Did you change anything in the bootloader? What SDK is the bootloader from, and what softdevice do you use?

    Best regards,

    Edvin

  • Hi Edvin,

    the .zip package has 230 kByte.

    I just checked again with a stopwatch. It takes 2 minutes with nrfutil and 25 seconds with nrfConnect Desktop.

    We are using SDK 15.0.0 for the app and the bootloader and s140_nrf52_6.0.0_softdevice.hex

    The bootloader is minimally modified (jumps automatically after 5s into app), but no changes on the transmission code.

    Could it be, thath the 2MBit mode is not used from nrfutil?

    I tried changing the mtu but it doen't make a difference when setting it to 23 or 247. Perhaps it is always using 23?

    -> I just saw when running with -v -v -v -v that the MTU change seems to work

    2019-12-06 16:28:48,045 BLE: Enabling longer ATT MTUs
    2019-12-06 16:28:48,105 ATT MTU exchanged: conn_handle=0 att_mtu=247
    2019-12-06 16:28:48,105 New ATT MTU is 247
    2019-12-06 16:28:48,106 BLE: Enabling Notifications

    Best Regards,

    Florian

Reply
  • Hi Edvin,

    the .zip package has 230 kByte.

    I just checked again with a stopwatch. It takes 2 minutes with nrfutil and 25 seconds with nrfConnect Desktop.

    We are using SDK 15.0.0 for the app and the bootloader and s140_nrf52_6.0.0_softdevice.hex

    The bootloader is minimally modified (jumps automatically after 5s into app), but no changes on the transmission code.

    Could it be, thath the 2MBit mode is not used from nrfutil?

    I tried changing the mtu but it doen't make a difference when setting it to 23 or 247. Perhaps it is always using 23?

    -> I just saw when running with -v -v -v -v that the MTU change seems to work

    2019-12-06 16:28:48,045 BLE: Enabling longer ATT MTUs
    2019-12-06 16:28:48,105 ATT MTU exchanged: conn_handle=0 att_mtu=247
    2019-12-06 16:28:48,105 New ATT MTU is 247
    2019-12-06 16:28:48,106 BLE: Enabling Notifications

    Best Regards,

    Florian

Children
Related