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

Restarting DFU, and building on previous progress

I've written a DFU client in python.  I'm trying to add the ability to restart a failed DFU without having to resend the whole file.  I can see that the init packet is saved, because when I send the "create init object" packet [06 01] after a failed DFU attempt, the response contains the init packet's size and CRC.  I've seen a link [1] which describes the general process, but I'm not sure I'm performing it correctly.  After getting back the correct length and CRC in the init object create response, I send the execute object packet, expecting to get back a response indicating that there have already been some application objects created and stored.  However, I always get back a packet indicating no bytes and no crc [60 06 01 00 10 00 00 00 00 00 00 00 00 00 00].

How do I continue a DFU from where it was before it failed?

[1] - https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.2.0%2Flib_dfu_transport_ble.html&cp=4_0_0_3_5_2_2_3_1&anchor=lib_dfu_transport_msc_data

Parents
  • Hi,

    For the init packet: [06 01] is not the "create init object" command, but it is the correct command to send (it is the select command). If the length and crc is correct, then you should jump straight to the execute command ([04]) and expect to get an execute success response ([60 04 01]).

    Then you start transferring the firmware image. First, the select command ([06 02]) for selecting firmware image. You should then get a response with offset and crc to that offset.

    Note that the DFU transfer progress is only stored when a full object has been transfered. (The entire data image usually consists of several objects.) That is, if you do not reach the execute for the first data object, then you must start from zero when restoring DFU. If you have executed one data object before restarting DFU, then you should get an offset corresponding to the start of the second data object and will start from there. And so on.

    You can have a look at the nrfutil BLE DFU implementation for reference. (Actually, you may be able to use most of the nrfutil implementation as is. It is written in python and has a permissive license.)

    Regards,
    Terje

  • Terje,

    I let the DFU run until I've completed at least one object (4096 bytes) of app data, then kill the client process.  When I run it again, I expect to see a nonzero offset and CRC, but they are always 0.

    Here is a log of my process:

    creating init object
    06 01
    received:
    60 06 01 00 01 00 00 87 00 00 00 26 96 01 DD
    init packet already sent and verified
    executing init object
    04
    received:
    60 04 01
    starting packet receipt notifications
    02 0A 00
    received:
    60 02 01
    creating app object
    06 02
    received:
    60 06 01 00 10 00 00 00 00 00 00 00 00 00 00
    initializing app object
    01 02 00 10 00 00
    received:
    60 01 01
    length = 3, packet = [96, 1, 1] , expected = [96, 1, 1] 
    sending app data
    00 F0 03 20 F1 EB 03 00 19 EC 03 00 1B EC 03 00 1D EC 03 00 1F EC 03 00 21 EC
    03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 23 EC 03 00 25 EC 03 00
    00 00 00 00 27 EC 03 00 29 EC 03 00 2B EC 03 00 2B EC 03 00 71 32 04 00 61 25
    04 00 2B EC 03 00 2B EC 03 00 A1 1B 04 00 2B EC 03 00 2B EC 03 00 11 F2 03 00
    2B EC 03 00 2B EC 03 00 2B EC 03 00 2B EC 03 00 2B EC 03 00 2B EC 03 00 C1 39
    04 00 C1 7F 04 00 2B EC 03 00 2B EC 03 00 95 80 04 00 2B EC 03 00 B9 8B 04 00
    2B EC 03 00 2B EC 03 00 2B EC 03 00 2B EC 03 00 2B EC 03 00 2B EC 03 00 2B EC
    03 00 00 00 00 00 00 00 00 00 2B EC 03 00 2B EC 03 00 2B EC 03 00 2B EC 03 00
    2B EC 03 00 2B EC 03 00 2B EC 03 00 2B EC 03 00 2B EC 03 00 2B EC 03 00 8D A5
    04 00 00 00 00 00
    packet count = 1
    sending app data
    00 00 00 00 2B EC 03 00 00 00 00 00 2B EC 03 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00
    packet count = 2
    sending app data
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 10 B5 05 4C 23 78 33 B9 04 4B 13 B1 04 48 AF F3 00 80 01 23
    23 70 10 BD C0 3F 00 20 00 00 00 00 88 25 07 00 0C 4B 43 B1 0C 48 0D 49 10 B5
    AF F3 00 80 0C 48 03 68 23 B9 10 BD 0A 48 03 68 33 B9 70 47 09 4B 00 2B F7 D0
    BD E8 10 40 18 47 06 4B 00 2B F5 D0 18 47 00 BF 00 00 00 00 88 25 07 00 C4 3F
    00 20 D8 3E 00 20 00 00 00 00 15 4B 00 2B 08 BF 13 4B 9D 46 A3 F5 80 3A 00 21
    8B 46 0F 46 13 48 14 4A 12 1A 00 F0 63 F8 0F 4B 00 2B 00 D0 98 47 0E 4B 00 2B
    00 D0 98 47 00 20 00 21 04 00 0D 00 0D 48 00 28 02 D0 0C 48 AF F3 00 80 00 F0
    2B F8 20 00 29 00 06 F0 C9 FD 00 F0 11 F8 00 BF 00 00 08 00 00 F0 03 20 00 00
    00 00 00 00 00 00
    packet count = 3
    sending app data
    C0 3F 00 20 34 73 02 20 00 00 00 00 00 00 00 00 08 B5 07 4B 04 46 13 B1 00 21
    AF F3 00 80 05 4B 18 68 83 6A 03 B1 98 47 20 46 00 F0 31 F8 00 BF 00 00 00 00
    1C 09 05 00 70 B5 0D 4E 0D 4C A4 1B A4 10 00 25 A5 42 09 D1 0B 4E 0C 4C 2A F0
    F2 FA A4 1B A4 10 00 25 A5 42 05 D1 70 BD 56 F8 25 30 98 47 01 35 EE E7 56 F8
    25 30 98 47 01 35 F2 E7 D0 3E 00 20 D0 3E 00 20 D0 3E 00 20 D4 3E 00 20 02 44
    03 46 93 42 00 D1 70 47 03 F8 01 1B F9 E7 FE E7 00 BF 70 47 00 BF 01 38 01 28
    8C BF 00 20 01 20 70 47 0B 4B 02 78 19 78 91 42 04 D0 D9 78 91 42 0D D0 00 20
    70 47 00 21 30 B4 4A 00 0A 44 05 88 84 78 9D 52 99 18 01 20 8C 70 30 BC 70 47
    01 21 F2 E7 6C 2A 00 20 0B 4B 01 78 02 46 18 78 88 42 04 D0 D8 78 88 42 0B D0
    00 20 70 47 00 21
    packet count = 4
    sending app data
    03 EB 41 03 0B 44 01 20 19 88 9B 78 11 80 93 70 70 47 01 21 F4 E7 00 BF 6C 2A
    00 20 03 78 03 B1 70 47 05 49 05 48 0B 78 DB B2 5A 1C D2 B2 18 44 0A 70 22 F0
    1F BA 00 BF F8 71 02 20 F8 70 02 20 2D E9 F0 4F 9C 4E DF F8 C4 92 9C 4C 9C 4F
    0F CE 91 B0 0A AD 0F C5 96 E8 03 00 85 E8 03 00 99 48 06 90 00 26 4F F4 80 75
    97 4A 89 F8 00 60 06 23 06 A9 0A A8 26 70 07 95 09 95 08 97 22 F0 7C F9 00 28
    40 F0 FC 84 91 4B 91 49 18 88 00 04 40 F0 01 00 1E F0 EF F8 8D 4B 8E 49 18 88
    00 04 40 F0 01 00 1E F0 E7 F8 1D F0 A9 FF 00 28 FB D1 8A 4F 01 46 05 46 17 20
    15 F0 31 FA 47 F0 01 07 4F F4 7A 40 B8 47 4F F4 7A 40 B8 47 01 21 17 20 15 F0
    25 FA 29 46 16 20 15 F0 21 FA 4F F4 48 60 B8 47 01 21 16 20 15 F0 1A FA 4F F4
    48 50 B8 47 77 4B
    packet count = 5
    sending app data
    7A 49 18 88 00 04 40 F0 01 00 1E F0 BB F8 1D F0 7D FF 00 28 FB D1 76 4D 76 4E
    4F F0 FF 33 4F F4 00 58 C5 F8 0C 35 4F F4 C8 40 C6 F8 0C 85 B8 47 2D 23 C6 F8
    08 85 4F F4 20 70 C5 F8 0C 35 B8 47 55 20 22 F0 C3 F9 03 25 4F F4 7A 40 B8 47
    01 3D FA D1 69 4D 73 20 22 F0 B9 F9 15 F8 01 0F 00 28 F9 D1 1D F0 53 FF 00 28
    FB D1 05 46 4F F4 7A 76 00 E0 5E B1 4F F4 7A 40 B8 47 22 78 99 F8 00 30 D2 1A
    D2 B2 01 3E BF 2A B6 B2 F2 D9 5B 4A 01 92 00 20 DF F8 80 E1 94 46 06 46 19 46
    00 E0 0B 46 22 78 9A 42 03 F1 01 02 0E D0 1E F8 03 30 D1 B2 01 20 00 2B F3 D0
    22 78 0C F8 01 3F 0B 46 9A 42 06 44 03 F1 01 02 F0 D1 00 28 40 F0 13 85 DF F8
    48 A1 4B 49 50 46 25 F0 D9 F8 40 4B C0 B3 18 88 48 49 00 04 40 F0 01 00 1E F0
    4C F8 22 F0 3A F9
    packet count = 6
    sending app data
    22 F0 8E F9 4F F4 48 50 B8 47 00 21 17 20 15 F0 95 F9 4F F4 48 50 B8 47 00 21
    16 20 15 F0 8E F9 4F F0 A0 43 37 49 03 22 4F F0 00 50 C3 F8 74 27 4F F4 00 56
    C3 F8 0C 05 4F F4 80 55 4F F0 00 44 01 20 C1 F8 34 27 C1 F8 0C 65 C1 F8 30 27
    C1 F8 0C 55 C3 F8 7C 27 C3 F8 0C 45 11 B0 BD E8 F0 8F 04 2E 40 F2 46 84 1B 88
    0A F8 06 00 18 04 40 F0 01 00 52 46 28 49 29 4E 1E F0 94 F8 1B 4B 28 49 18 88
    00 04 40 F0 01 00 1E F0 04 F8 73 20 22 F0 25 F9 16 F8 01 0F 00 28 F9 D1 1D F0
    BF FE 00 28 FB D1 06 46 4F F4 7A 78 02 E0 B8 F1 00 0F 0D D0 4F F4 7A 40 B8 47
    22 78 99 F8 00 30 D2 1A D2 B2 08 F1 FF 38 BF 2A 1F FA 88 F8 EE D9 DD F8 04 E0
    14 48 1A 46 2D E0 00 BF 20 09 05 00 F8 71 02 20 E8 41 00 20 E8 40 00 20 DD 63
    02 00 38 3F 00 20
    packet count = 7
    sending app data
    88 09 05 00 9C 09 05 00 60 0B 05 00 B8 09 05 00 00 20 00 40 00 03 00 50 38 09
    05 00 DB 3F 00 20 CC 09 05 00 E8 09 05 00 08 0A 05 00 48 09 05 00 28 0A 05 00
    F8 70 02 20 DC 3F 00 20 F4 70 02 20 13 46 21 78 99 42 03 F1 01 01 0C D0 C3 5C
    CA B2 01 26 00 2B F4 D0 21 78 0E F8 01 3F 13 46 99 42 03 F1 01 01 F2 D1 00 2E
    40 F0 58 84 00 21 17 20 15 F0 EC F8 4F F4 7A 40 B8 47 4F F4 7A 40 B8 47 01 21
    17 20 15 F0 E2 F8 00 21 16 20 15 F0 DE F8 4F F4 48 60 B8 47 01 21 16 20 15 F0
    D7 F8 CE 4B 05 93 4F F4 48 50 1E 46 B8 47 00 23 55 22 8A F8 00 20 8A F8 01 30
    8A F8 02 30 8A F8 03 30 8A F8 04 30 8A F8 05 30 8A F8 06 30 8A F8 07 30 8A F8
    08 30 8A F8 09 30 06 F1 0A 08 B2 46 16 F8 01 0B 22 F0 84 F8 46 45 F9 D1 4F F4
    FA 78 02 E0 B8 F1
    packet count = 8
    sending app data
    00 0F 0D D0 4F F4 7A 40 B8 47 22 78 99 F8 00 30 D2 1A D2 B2 08 F1 FF 38 19 2A
    1F FA 88 F8 EE D9 00 20 84 46 DD F8 04 80 DF F8 C0 E2 1A 46 00 E0 13 46 21 78
    8B 42 03 F1 01 01 0E D0 1E F8 03 30 CA B2 01 20 00 2B F3 D0 21 78 08 F8 01 3F
    13 46 8B 42 84 44 03 F1 01 01 F0 D1 00 28 40 F0 EA 83 BC F1 10 0F 00 F2 BD 83
    55 23 08 22 8A F8 00 30 8A F8 01 20 FE 23 FC 22 8A F8 02 30 8A F8 03 20 00 23
    03 22 8A F8 04 30 8A F8 05 30 8A F8 06 30 8A F8 08 30 8A F8 09 30 8A F8 07 20
    DF F8 48 A2 D0 46 18 F8 01 0B 22 F0 29 F8 B0 45 F9 D1 CD F8 10 80 4F F4 7A 76
    02 E0 00 2E 00 F0 25 83 4F F4 7A 40 B8 47 22 78 99 F8 00 30 D2 1A D2 B2 01 3E
    BF 2A B6 B2 F0 D9 DD F8 04 E0 00 20 1A 46 83 4E 00 E0 13 46 21 78 99 42 03 F1
    01 01 0C D0 F3 5C
    packet count = 9
    sending app data
    CA B2 01 20 00 2B F4 D0 21 78 0E F8 01 3F 13 46 99 42 03 F1 01 01 F2 D1 00 28
    40 F0 96 83 9A F8 0A 30 81 2B 04 D1 9A F8 0B 30 81 2B 00 F0 70 81 73 4B 74 49
    18 88 00 04 40 F0 01 00 1D F0 C2 FE 1D F0 84 FD 00 28 FB D1 55 22 03 23 8A F8
    00 20 8A F8 04 20 8A F8 01 30 8A F8 07 30 01 22 AA 23 8A F8 02 00 8A F8 06 00
    8A F8 08 00 8A F8 09 00 8A F8 03 20 8A F8 05 30 DF F8 7C A1 DD F8 10 B0 06 46
    D0 46 18 F8 01 0B 21 F0 C0 FF D8 45 F9 D1 4F F4 FA 68 03 E0 B8 F1 00 0F 00 F0
    25 83 4F F4 7A 40 B8 47 22 78 99 F8 00 30 D2 1A D2 B2 08 F1 FF 38 0A 2A 1F FA
    88 F8 ED D9 DD F8 04 C0 00 20 1A 46 DF F8 38 E1 00 E0 13 46 21 78 8B 42 03 F1
    01 01 0D D0 1E F8 03 30 CA B2 01 20 00 2B F3 D0 21 78 0C F8 01 3F 13 46 8B 42
    03 F1 01 01 F1 D1
    packet count = 10
    received:
    60 03 01 60 09 00 00 C3 80 EE 49
    sending app data
    00 28 40 F0 36 83 55 23 03 22 8A F8 00 30 8A F8 04 30 00 23 8A F8 01 20 8A F8
    02 30 8A F8 06 30 8A F8 08 30 8A F8 09 30 01 21 AA 22 43 23 8A F8 03 10 8A F8
    05 20 8A F8 07 30 DF F8 CC A0 DD F8 10 B0 D0 46 18 F8 01 0B 21 F0 68 FF D8 45
    F9 D1 4F F4 FA 68 03 E0 B8 F1 00 0F 00 F0 C8 82 4F F4 7A 40 B8 47 22 78 99 F8
    00 30 D2 1A D2 B2 08 F1 FF 38 0A 2A 1F FA 88 F8 ED D9 DD F8 04 C0 00 20 1A 46
    DF F8 88 E0 00 E0 13 46 21 78 8B 42 03 F1 01 01 0D D0 1E F8 03 30 CA B2 01 20
    00 2B F3 D0 21 78 0C F8 01 3F 13 46 8B 42 03 F1 01 01 F1 D1 00 28 40 F0 DB 82
    55 23 03 22 8A F8 00 30 8A F8 04 30 00 23 8A F8 01 20 8A F8 02 30 8A F8 06 30
    8A F8 08 30 8A F8 09 30 01 21 AA 22 83 23 8A F8 03 10 8A F8 05 20 8A F8 07 30
    DF F8 1C A0 DD F8
    packet count = 1
    sending app data
    10 B0 D0 46 18 F8 01 0B 21 F0 10 FF D8 45 F9 D1 4F F4 FA 68 0C E0 00 BF DC 3F
    00 20 F8 70 02 20 38 3F 00 20 98 0A 05 00 B8 F1 00 0F 00 F0 62 82 4F F4 7A 40
    B8 47 22 78 99 F8 00 30 D2 1A D2 B2 08 F1 FF 38 0A 2A 1F FA 88 F8 ED D9 DD F8
    04 C0 00 20 1A 46 DF F8 B0 E3 00 E0 13 46 21 78 99 42 03 F1 01 01 0D D0 1E F8
    03 30 CA B2 01 20 00 2B F3 D0 21 78 0C F8 01 3F 13 46 99 42 03 F1 01 01 F1 D1
    00 28 40 F0 77 82 55 23 8A F8 00 30 8A F8 04 30 F4 22 00 23 8A F8 02 20 8A F8
    03 30 8A F8 06 30 8A F8 08 30 8A F8 09 30 03 21 AA 22 C3 23 8A F8 01 10 8A F8
    05 20 8A F8 07 30 DF F8 70 A3 DD F8 10 B0 D0 46 18 F8 01 0B 21 F0 AF FE D8 45
    F9 D1 4F F4 FA 68 02 E0 B8 F1 00 0F 0D D0 4F F4 7A 40 B8 47 22 78 99 F8 00 30
    D2 1A D2 B2 08 F1
    packet count = 2
    sending app data
    FF 38 0A 2A 1F FA 88 F8 EE D9 DD F8 04 E0 C2 48 1A 46 00 E0 13 46 21 78 8B 42
    03 F1 01 01 0C D0 C3 5C CA B2 01 26 00 2B F4 D0 21 78 0E F8 01 3F 13 46 8B 42
    03 F1 01 01 F2 D1 00 2E 40 F0 20 82 55 23 08 22 8A F8 00 30 8A F8 01 20 FE 23
    FC 22 8A F8 02 30 8A F8 03 20 00 23 03 22 8A F8 04 30 8A F8 05 30 8A F8 06 30
    8A F8 08 30 8A F8 09 30 8A F8 07 20 DF F8 C8 A2 DD F8 10 80 56 46 16 F8 01 0B
    21 F0 5B FE 46 45 F9 D1 4F F4 7A 76 00 E0 5E B1 4F F4 7A 40 B8 47 22 78 99 F8
    00 30 D2 1A D2 B2 01 3E BF 2A B6 B2 F2 D9 01 9E 9A 48 1A 46 00 E0 13 46 21 78
    8B 42 03 F1 01 01 0C D0 C3 5C CA B2 01 25 00 2B F4 D0 21 78 06 F8 01 3F 13 46
    8B 42 03 F1 01 01 F2 D1 00 2D 40 F0 C0 81 9A F8 0A 30 81 2B 03 D1 9A F8 0B 30
    81 2B 0B D0 8B 4B
    packet count = 3
    sending app data
    8B 49 18 88 00 04 40 F0 01 00 1D F0 FB FC 1D F0 BD FB 00 28 FB D1 85 4B 86 49
    18 88 00 04 40 F0 01 00 1D F0 EF FC 1D F0 B1 FB 00 28 FB D1 82 4B DF F8 20 82
    02 93 7C 4E 4F F4 40 73 08 F1 FF 35 03 93 7A 4B DD F8 0C B0 18 88 7C 49 00 04
    40 F0 01 00 5A 46 1D F0 5E FD 55 23 02 22 8A F8 00 30 8A F8 04 30 5B 46 8A F8
    01 20 1A 0A 00 21 4F F0 80 0E AA 20 8A F8 07 20 71 4B 02 9A 8A F8 06 B0 8A F8
    02 E0 8A F8 03 10 8A F8 08 10 8A F8 09 10 8A F8 05 00 52 F8 04 1B 43 F8 04 1B
    43 45 F9 D1 DD F8 04 B0 1B F8 01 0F 21 F0 D0 FD AB 45 F9 D1 4F F4 FA 7B 03 E0
    BB F1 00 0F 00 F0 AF 80 4F F4 7A 40 B8 47 22 78 99 F8 00 30 D2 1A D2 B2 0B F1
    FF 3B 0A 2A 1F FA 8B FB ED D9 DD F8 04 E0 00 20 19 46 00 E0 0B 46 22 78 9A 42
    03 F1 01 02 0C D0
    packet count = 4
    sending app data
    F3 5C D1 B2 01 20 00 2B F4 D0 22 78 0E F8 01 3F 0B 46 9A 42 03 F1 01 02 F2 D1
    00 28 40 F0 29 81 02 9B 80 33 02 93 1D F0 39 FB 00 28 FB D1 03 9B 03 F1 80 0B
    1F FA 8B F3 03 93 00 2B 89 D1 3F 4B 02 90 18 88 43 49 00 04 40 F0 01 00 1D F0
    62 FC 55 21 08 23 02 9A 8A F8 00 10 8A F8 01 30 FE 20 FC 21 03 23 8A F8 04 20
    8A F8 05 20 8A F8 06 20 8A F8 08 20 8A F8 09 20 8A F8 02 00 8A F8 03 10 8A F8
    07 30 DF F8 D8 A0 04 9E 55 46 90 46 15 F8 01 0B 21 F0 63 FD B5 42 F9 D1 4F F4
    7A 75 46 46 00 E0 5D B1 4F F4 7A 40 B8 47 22 78 99 F8 00 30 D2 1A D2 B2 01 3D
    BF 2A AD B2 F2 D9 32 46 19 46 01 9E 1D 4D 00 E0 0B 46 20 78 83 42 03 F1 01 00
    0C D0 EB 5C C1 B2 01 22 00 2B F4 D0 20 78 06 F8 01 3F 0B 46 83 42 03 F1 01 00
    F2 D1 00 2A 40 F0
    packet count = 5
    sending app data
    C3 80 9A F8 0A 30 9E 2B 10 4B 18 88 03 D1 9A F8 0B 30 EF 2B 41 D0 00 04 13 49
    40 F0 01 00 1D F0 01 FC 1D F0 C3 FA 00 28 FB D1 FF F7 AF BB 0F 4A 40 F2 25 11
    21 F0 44 FD FF F7 FD BA 58 46 DD F8 04 E0 19 46 5F E7 00 BF F8 70 02 20 38 3F
    00 20 D8 0A 05 00 B8 0A 05 00 68 0B 05 00 F8 0A 05 00 E6 3F 00 20 9C 1C 06 00
    00 0B 05 00 58 09 05 00 DC 3F 00 20 66 40 00 20 30 46 DD F8 04 E0 1A 46 E5 E4
    18 88 50 49 00 04 40 F0 01 00 1D F0 CA FB 1D F0 8C FA 00 28 FB D1 28 E4 00 04
    4B 49 40 F0 01 00 1D F0 BF FB 1D F0 81 FA 00 28 FB D1 55 22 09 23 05 9E 8A F8
    02 00 05 46 8A F8 03 00 8A F8 04 00 8A F8 05 00 8A F8 06 00 8A F8 07 00 8A F8
    08 00 8A F8 09 00 8A F8 00 20 8A F8 01 30 16 F8 01 0B 21 F0 C3 FC 04 9B 9E 42
    F8 D1 4F F4 7A 76
    packet count = 6
    sending app data
    00 E0 5E B1 4F F4 7A 40 B8 47 22 78 99 F8 00 30 D2 1A D2 B2 01 3E BF 2A B6 B2
    F2 D9 1A 46 30 48 00 E0 13 46 21 78 8B 42 03 F1 01 01 2A D0 C3 5C CA B2 01 25
    00 2B F4 D0 01 99 01 F8 01 3F 13 46 01 91 EF E7 40 46 DD F8 04 C0 1A 46 AA E5
    40 46 DD F8 04 C0 1A 46 44 E5 40 46 DD F8 04 C0 1A 46 E7 E4 20 4B 9A F8 0A 20
    18 88 1F 49 9A F8 0B 30 00 04 40 F0 01 00 1D F0 6B FC 1D F0 1F FA 00 28 FB D1
    31 E4 00 2D 3F F4 09 AB 89 F8 00 20 FF F7 05 BB 89 F8 00 10 D3 E6 89 F8 00 10
    39 E7 89 F8 00 20 3C E6 89 F8 00 10 FF F7 E9 BA 89 F8 00 20 FF F7 A4 BB 89 F8
    00 20 12 E4 89 F8 00 20 66 E4 89 F8 00 20 DC E5 89 F8 00 20 85 E5 89 F8 00 20
    21 E5 89 F8 00 20 C6 E4 40 0A 05 00 2C 0B 05 00 F8 70 02 20 38 3F 00 20 74 0A
    05 00 A8 DF 70 47
    packet count = 7
    sending app data
    AA DF 70 47 AE DF 70 47 62 DF 70 47 39 B1 30 B1
    packet count = 8
    validating app object
    03
    received:
    60 03 01 00 10 00 00 57 C5 70 8A
    11, [96, 3, 1, 0, 16, 0, 0, 87, 197, 112, 138], [96, 3, 1]
    crc = 8A70C557, current_object_crc = 8A70C557
    executing app object
    04
    received:
    60 04 01
    creating app object
    06 02
    received:
    60 06 01 00 10 00 00 00 10 00 00 57 C5 70 8A
    initializing app object
    01 02 00 10 00 00
    received:
    60 01 01
    length = 3, packet [96, 1, 1], expected = [96, 1, 1] 
    sending app data
    03 88 11 2B 1D D0 50 2B 02 D0 10 2B 16 D0 70 47 C2 88 4B 89 9A 42 FA D1 10 B5
    0B 46 04 46 C9 89 58 8F 00 F0 A3 FF 80 B9 0B 4B 0C 49 18 88 00 04 40 F0 01 00
    BD E8 10 40 1D F0 FC BA 83 88 4B 87 70 47 4F F6 FF 73 4B 87 70 47 21 8A 04 F1
    12 00 BD E8 10 40 00 F0 76 BC F4 3E 00 20 80 08 06 00 2D E9 F0 43 89 B0 00 28
    00 F0 B0 80 05 46 0D F1 06 01 59 48 FF F7 C0 FF 04 46 18 B1 20 46 09 B0 BD E8
    F0 83 9D F8 06 30 85 F8 3C 30 01 A9 2A 46 01 20 AD F8 04 40 FF F7 A9 FF 27 46
    04 46 00 28 EC D1 08 AE 4F F0 01 09 95 F8 3C 30 26 F8 18 9D 4F F0 02 08 49 48
    DF F8 38 E1 8D F8 0A 30 04 90 03 AA 47 49 28 88 AD F8 16 40 05 EB 08 03 03 96
    AD F8 14 80 AD F8 18 80 CD F8 1C E0 FF F7 88 FF 04 46 00 28 CA D1 95 F8 3C 20
    3E 48 8D F8 0A 20
    packet count = 1
    sending app data
    4F F0 14 0E 04 90 3C 49 28 88 AD F8 14 40 05 F1 0A 03 03 AA 07 94 AD F8 08 80
    03 96 AD F8 16 70 AD F8 18 E0 FF F7 6C FF 04 46 00 28 AE D1 95 F8 3C 30 AD F8
    14 40 03 22 07 94 0C 24 8D F8 0A 30 AD F8 08 20 DF F8 BC 80 2C 49 28 88 AD F8
    18 40 0D EB 04 02 05 F1 12 03 03 96 AD F8 16 70 CD F8 10 80 FF F7 4D FF 04 46
    00 28 8F D1 95 F8 3C 20 8D F8 0A 20 4F F0 04 0E 20 49 28 88 AD F8 14 40 05 F1
    1A 03 03 AA 07 94 03 96 CD F8 10 80 AD F8 16 70 AD F8 18 90 AD F8 08 E0 FF F7
    31 FF 04 46 00 28 7F F4 73 AF 95 F8 3C E0 28 88 03 96 05 F1 2A 03 03 AA 06 26
    0B 25 10 49 AD F8 14 40 07 94 CD F8 10 80 AD F8 16 70 8D F8 0A E0 AD F8 08 60
    AD F8 18 50 FF F7 14 FF 04 46 57 E7 0E 24 20 46 09 B0 BD E8 F0 83 00 BF E0 08
    06 00 10 09 06 00
    packet count = 2
    sending app data
    14 09 06 00 C0 08 06 00 C4 08 06 00 F4 08 06 00 30 09 06 00 F0 08 06 00 30 B5
    87 B0 45 89 05 91 AD F8 06 20 0D F1 06 03 00 22 01 24 02 A9 40 8F AD F8 08 50
    8D F8 0A 40 AD F8 0C 20 04 93 FF F7 E9 FE 07 B0 30 BD 00 BF 30 B5 87 B0 45 8A
    05 91 AD F8 06 20 0D F1 06 03 00 22 01 24 02 A9 40 8F AD F8 08 50 8D F8 0A 40
    AD F8 0C 20 04 93 FF F7 D1 FE 07 B0 30 BD 00 BF 30 B5 87 B0 43 8B 8D F8 04 10
    AD F8 08 30 01 AA 01 23 00 25 0D F1 06 04 02 A9 40 8F AD F8 06 30 8D F8 0A 30
    AD F8 0C 50 04 94 05 92 FF F7 B6 FE 07 B0 30 BD F0 B5 91 E8 0C 00 89 B0 14 0A
    8D F8 04 20 8D F8 05 40 14 0C 12 0E 91 F8 08 C0 91 F8 09 E0 8D F8 06 40 89 7A
    8D F8 07 20 1C 0A 1A 0C 8D F8 08 30 1B 0E 47 8D 8D F8 09 40 8D F8 0A 20 8D F8
    0B 30 0D F1 02 02

    ~~~~~~STOPPED AND RESTARTED DFU CLIENT ~~~~~~

    creating init object
    06 01
    received:
    60 06 01 00 01 00 00 87 00 00 00 26 96 01 DD
    init packet already sent and verified
    executing init object
    04
    received:
    60 04 01
    starting packet receipt notifications
    02 0A 00
    received:
    60 02 01
    creating app object
    06 02
    received:
    60 06 01 00 10 00 00 00 00 00 00 00 00 00 00

  • Hi,

    I am very sorry for the delay.

    When you write "STOPPED AND RESTARTED DFU CLIENT", do you mean the "DFU controller" (the device with the program controlling the DFU process / from which the upgrade is sent), or do you mean the "DFU target" (the device getting upgraded / receiving new firmware)?

    If the DFU target has gotten enough time for updating the flash, then based on the log that you sent I would expect it to respond with:

    60 06 01 00 10 00 00 00 10 00 00 57 C5 70 8A

    E.g. the same response as right after the first object had been successfully transferred. And not, as it does now, with:

    60 06 01 00 10 00 00 00 00 00 00 00 00 00 00

    * Does it show the same behavior if updating using nrfutil?

    * Does it show the same behavior if you stop it after more than one data object (application firmware object) has been completed? (E.g. if sending three objects before stopping, does it still restart from zero or does it start from a later point but not the exact point it should have started from?)

    * Does it show the same behavior if adding a one second delay in the DFU controller between an object gets executed and the next object gets started? (Delay of one second is very long, but if the delay improves things then you can experiment with shortening it later.)

    * The DFU target, does it use the standard DFU bootloader from the SDK, and if so which one?

    * Are you using BLE or serial for transport?

    Regards,
    Terje

Reply
  • Hi,

    I am very sorry for the delay.

    When you write "STOPPED AND RESTARTED DFU CLIENT", do you mean the "DFU controller" (the device with the program controlling the DFU process / from which the upgrade is sent), or do you mean the "DFU target" (the device getting upgraded / receiving new firmware)?

    If the DFU target has gotten enough time for updating the flash, then based on the log that you sent I would expect it to respond with:

    60 06 01 00 10 00 00 00 10 00 00 57 C5 70 8A

    E.g. the same response as right after the first object had been successfully transferred. And not, as it does now, with:

    60 06 01 00 10 00 00 00 00 00 00 00 00 00 00

    * Does it show the same behavior if updating using nrfutil?

    * Does it show the same behavior if you stop it after more than one data object (application firmware object) has been completed? (E.g. if sending three objects before stopping, does it still restart from zero or does it start from a later point but not the exact point it should have started from?)

    * Does it show the same behavior if adding a one second delay in the DFU controller between an object gets executed and the next object gets started? (Delay of one second is very long, but if the delay improves things then you can experiment with shortening it later.)

    * The DFU target, does it use the standard DFU bootloader from the SDK, and if so which one?

    * Are you using BLE or serial for transport?

    Regards,
    Terje

Children
No Data
Related