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

Extremely slow DFU over UART

We try to implement DFU over UART. The Mesh DFU example has been taken as a reference.
DFU is successful, but it takes about 1 hour (sic!) to transfer DFU ZIP package of size 123 KB.
Why is it so slow? How to make it normal speed?

[Mesh SDK 2.1.1, Nrf SDK 15.0, S140 6.1; 115200 bps, HWFC]

Parents Reply Children
  • Results of tests with lower interval:

    -i

    time [minutes]

    500

    68

    200

    27

    100

    14

     50

     8.0

     25

     4.8

     10

     2.9

      5

     2.2

      2

     1.8

      1

     1.7

    I am wondering, what is the smallest safe interval value? Documentation states that it is 200, however I did not notice problems with lower values.

     I can provide time-labeled hex capture of serial port flow or 2-channel scope image.

  • Hi Igor, 

    The device connected to the pc will start forwarding the image to rest of the mesh network from the first packet received over the serial interface. It does not receive the entire image and then starts to forward the image piece by piece.

    So as I understand, the serial interface will work with very low values, but the mesh network will get saturated and many devices on the network will miss DFU packets if the --i value is set to low.

    The recommendation of 200 ms is from the point of view of the network and not the single device. DFU is slow because it uses a trickle algorithm to ensure that everyone gets the packet. 

    Best regards

    Bjørn

  • So, that means that a firmware update puts whole system down for half an hour? Or the mesh network still works during firmware distribution?

    I know that DFU works in side-by-side mode, but is there enough free bandwidth during DFU, so that is mesh network still able to transmit "useful" messages?

  • No, the mesh network is still operational during the side-by-side DFU since the trickle algorithm is used, i.e. the mesh can still send useful information during DFU in addition to the DFU packages. This is ofcourse given that the recommended --i value is used. 

Related