Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

DFU Error INVALID_PARAMETER after uploading of all packets via DFU.

I am trying to upload an image via BLE DFU, tested on mobile phone and Desktop (Windows) But I receive the following error after all packages have been sent to the device. Without signature required from the bootloader side everything works. With #define NRF_DFU_REQUIRE_SIGNED_APP_UPDATE 1, the following error occurs.

One might assume the package was generated with the wrong private key, but if I do that, the DFU aborts before the first packet is sent. The same is true if the wrong application version is set in the firmware package. So what else can be done wrong?

.local/bin/nrfutil pkg generate --hw-version 52 --sd-req 0x0100 --application-version 9999 --application /mnt/c/git/nrf52833/Output/Debug/Exe/firmware_256ms.hex --key-file private.pem app_dfu_package.zip

  • nRF Connect, 2021-05-06
    MST (C7:7A:40:D9:F2:64)
    V	22:00:11.601	Connecting to C7:7A:40:D9:F2:64...
    D	22:00:11.601	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D	22:00:11.692	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I	22:00:11.692	Connected to C7:7A:40:D9:F2:64
    D	22:00:11.730	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    V	22:00:11.731	Discovering services...
    D	22:00:11.731	gatt.discoverServices()
    I	22:00:12.348	Connection parameters updated (interval: 15.0ms, latency: 0, timeout: 6000ms)
    D	22:00:12.522	[Callback] Services discovered with status: 0
    I	22:00:12.522	Services discovered
    V	22:00:12.542	Generic Access (0x1800)
    - Device Name [R W] (0x2A00)
    - Appearance [R] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    - Central Address Resolution [R] (0x2AA6)
    Generic Attribute (0x1801)
    Secure DFU Service (0xFE59)
    - DFU Packet [WNR] (8ec90002-f315-4f60-9fb8-838830daea50)
    - DFU Control Point [N W] (8ec90001-f315-4f60-9fb8-838830daea50)
       Client Characteristic Configuration (0x2902)
    I	22:00:12.550	Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    I	22:00:12.617	Connection parameters updated (interval: 15.0ms, latency: 0, timeout: 6000ms)
    V	22:00:18.979	[DFU] DFU service started
    V	22:00:18.979	[DFU] Opening file...
    I	22:00:19.014	[DFU] Firmware file opened successfully
    V	22:00:19.014	[DFU] Connecting to DFU target...
    D	22:00:19.016	[DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
    I	22:00:19.034	[DFU] Connected to C7:7A:40:D9:F2:64
    V	22:00:19.036	[DFU] Discovering services...
    D	22:00:19.036	[DFU] gatt.discoverServices()
    I	22:00:19.041	[DFU] Services discovered
    D	22:00:19.074	[DFU] wait(1000)
    V	22:00:20.053	[DFU] Requesting new MTU...
    D	22:00:20.053	[DFU] gatt.requestMtu(517)
    I	22:00:20.089	[DFU] MTU changed to: 247
    V	22:00:20.089	[DFU] Enabling notifications for 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:20.090	[DFU] gatt.setCharacteristicNotification(8ec90001-f315-4f60-9fb8-838830daea50, true)
    D	22:00:20.093	[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
    I	22:00:20.150	[DFU] Data written to descr.8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-00
    V	22:00:20.150	[DFU] Notifications enabled for 8ec90001-f315-4f60-9fb8-838830daea50
    A	22:00:20.157	[DFU] Notifications enabled
    D	22:00:20.157	[DFU] wait(1000)
    V	22:00:21.152	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:21.153	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:21.200	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-06-01-00-02-00-00-00-00-00-00-00-00-00-00
    I	22:00:21.201	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-06-01-00-02-00-00-00-00-00-00-00-00-00-00
    A	22:00:21.202	[DFU] Command object info received (Max size = 512, Offset = 0, CRC = 00000000)
    V	22:00:21.202	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:21.202	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:21.229	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-02-01
    I	22:00:21.229	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-02-01
    A	22:00:21.229	[DFU] Packet Receipt Notif disabled (Op Code = 2, Value = 0)
    V	22:00:21.230	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:21.230	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:21.259	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-01-8D-00-00-00
    I	22:00:21.260	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:21.260	[DFU] Command object created
    V	22:00:21.261	[DFU] Writing to characteristic 8ec90002-f315-4f60-9fb8-838830daea50
    D	22:00:21.261	[DFU] gatt.writeCharacteristic(8ec90002-f315-4f60-9fb8-838830daea50)
    I	22:00:21.265	[DFU] Data written to 8ec90002-f315-4f60-9fb8-838830daea50, value (0x): 12-8A-01-0A-44-08-01-12-40-08-63-10-34-1A-02-80-02-20-00-28-00-30-00-38-8C-BD-03-42-24-08-03-12-20-A1-5E-30-47-BC-CA-EB-E6-78-B6-42-BD-8A-EE-50-76-FC-85-E0-5B-18-B0-C7-83-59-F5-04-C3-A3-AF-AD-42-48-00-52-04-08-01-12-00-10-00-1A-40-AC-8C-1B-21-43-3E-BA-1D-88-77-D5-DE-CD-A7-C6-DB-F6-DA-DB-09-63-A4-D6-58-FD-CF-40-7F-B5-BE-A2-0E-2B-04-26-DF-4D-80-C1-4E-D4-1B-D7-19-08-93-E7-B9-6E-87-5E-DC-C2-80-75-63-E4-4D-2D-90-47-EF-9D-77
    A	22:00:21.266	[DFU] Command object sent (CRC = 2288F04B)
    V	22:00:21.266	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:21.266	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:21.307	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-8D-00-00-00-4B-F0-88-22
    I	22:00:21.308	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-8D-00-00-00-4B-F0-88-22
    A	22:00:21.309	[DFU] Checksum received (Offset = 141, CRC = 2288F04B)
    V	22:00:21.309	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:21.309	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:21.356	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
    I	22:00:21.485	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:21.486	[DFU] Command object executed
    V	22:00:21.486	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:21.486	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:21.516	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-06-01-00-10-00-00-00-00-00-00-00-00-00-00
    I	22:00:21.517	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-06-01-00-10-00-00-00-00-00-00-00-00-00-00
    A	22:00:21.518	[DFU] Data object info received (Max size = 4096, Offset = 0, CRC = 00000000)
    V	22:00:21.572	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:21.572	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:21.652	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
    I	22:00:21.653	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:21.653	[DFU] Data object (1/14) created
    D	22:00:21.653	[DFU] wait(400)
    A	22:00:22.055	[DFU] Uploading firmware...
    V	22:00:22.055	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:22.149	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:22.149	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:22.325	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-10-00-00-D1-64-DF-F9
    I	22:00:22.326	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-10-00-00-D1-64-DF-F9
    A	22:00:22.327	[DFU] Checksum received (Offset = 4096, CRC = F9DF64D1)
    V	22:00:22.327	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:22.327	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:22.356	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    I	22:00:22.356	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:22.356	[DFU] Data object executed
    V	22:00:22.357	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:22.357	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:22.385	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    I	22:00:22.386	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:22.386	[DFU] Data object (2/14) created
    D	22:00:22.386	[DFU] wait(400)
    A	22:00:22.787	[DFU] Uploading firmware...
    V	22:00:22.787	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:22.846	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:22.846	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:23.059	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-20-00-00-77-3E-94-09
    I	22:00:23.059	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-20-00-00-77-3E-94-09
    A	22:00:23.059	[DFU] Checksum received (Offset = 8192, CRC = 09943E77)
    V	22:00:23.059	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:23.060	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:23.088	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    I	22:00:23.089	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:23.089	[DFU] Data object executed
    V	22:00:23.089	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:23.089	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:23.117	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    I	22:00:23.118	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:23.118	[DFU] Data object (3/14) created
    D	22:00:23.118	[DFU] wait(400)
    A	22:00:23.520	[DFU] Uploading firmware...
    V	22:00:23.520	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:23.623	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:23.623	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:23.797	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-30-00-00-7C-5D-CC-B7
    I	22:00:23.798	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-30-00-00-7C-5D-CC-B7
    A	22:00:23.799	[DFU] Checksum received (Offset = 12288, CRC = B7CC5D7C)
    V	22:00:23.799	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:23.799	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:23.826	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    I	22:00:23.827	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:23.828	[DFU] Data object executed
    V	22:00:23.828	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:23.828	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:23.857	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    I	22:00:23.858	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:23.859	[DFU] Data object (4/14) created
    D	22:00:23.859	[DFU] wait(400)
    A	22:00:24.260	[DFU] Uploading firmware...
    V	22:00:24.261	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:24.384	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:24.384	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:24.543	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
    I	22:00:24.543	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-40-00-00-41-E4-1D-D8
    A	22:00:24.543	[DFU] Checksum received (Offset = 16384, CRC = D81DE441)
    V	22:00:24.543	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:24.543	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:24.607	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    I	22:00:24.607	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:24.607	[DFU] Data object executed
    V	22:00:24.607	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:24.607	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:24.607	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
    I	22:00:24.607	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:24.607	[DFU] Data object (5/14) created
    D	22:00:24.607	[DFU] wait(400)
    A	22:00:25.005	[DFU] Uploading firmware...
    V	22:00:25.005	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:25.069	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:25.069	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:25.311	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-50-00-00-04-2F-97-C1
    I	22:00:25.313	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-50-00-00-04-2F-97-C1
    A	22:00:25.315	[DFU] Checksum received (Offset = 20480, CRC = C1972F04)
    V	22:00:25.315	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:25.315	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:25.339	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
    I	22:00:25.340	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:25.340	[DFU] Data object executed
    V	22:00:25.341	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:25.341	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:25.367	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
    I	22:00:25.369	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:25.369	[DFU] Data object (6/14) created
    D	22:00:25.369	[DFU] wait(400)
    A	22:00:25.770	[DFU] Uploading firmware...
    V	22:00:25.770	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:25.867	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:25.867	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:26.147	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-60-00-00-25-4E-B0-61
    I	22:00:26.147	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-60-00-00-25-4E-B0-61
    A	22:00:26.147	[DFU] Checksum received (Offset = 24576, CRC = 61B04E25)
    V	22:00:26.147	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:26.147	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:26.147	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
    I	22:00:26.147	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:26.147	[DFU] Data object executed
    V	22:00:26.147	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:26.147	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:26.147	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    I	22:00:26.147	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:26.147	[DFU] Data object (7/14) created
    D	22:00:26.147	[DFU] wait(400)
    A	22:00:26.507	[DFU] Uploading firmware...
    V	22:00:26.507	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:26.613	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:26.613	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:26.790	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-70-00-00-21-E7-39-6A
    I	22:00:26.790	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-70-00-00-21-E7-39-6A
    A	22:00:26.791	[DFU] Checksum received (Offset = 28672, CRC = 6A39E721)
    V	22:00:26.791	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:26.791	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:26.847	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    I	22:00:26.847	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:26.847	[DFU] Data object executed
    V	22:00:26.847	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:26.847	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:26.860	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    I	22:00:26.861	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:26.861	[DFU] Data object (8/14) created
    D	22:00:26.861	[DFU] wait(400)
    A	22:00:27.256	[DFU] Uploading firmware...
    V	22:00:27.256	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:27.359	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:27.359	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:27.532	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-80-00-00-8C-74-AE-89
    I	22:00:27.532	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-80-00-00-8C-74-AE-89
    A	22:00:27.533	[DFU] Checksum received (Offset = 32768, CRC = 89AE748C)
    V	22:00:27.533	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:27.533	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:27.560	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    I	22:00:27.564	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:27.565	[DFU] Data object executed
    V	22:00:27.565	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:27.565	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:27.606	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    I	22:00:27.606	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:27.606	[DFU] Data object (9/14) created
    D	22:00:27.606	[DFU] wait(400)
    A	22:00:28.007	[DFU] Uploading firmware...
    V	22:00:28.007	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:28.124	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:28.124	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:28.280	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-90-00-00-C3-2C-A6-36
    I	22:00:28.282	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-90-00-00-C3-2C-A6-36
    A	22:00:28.283	[DFU] Checksum received (Offset = 36864, CRC = 36A62CC3)
    V	22:00:28.283	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:28.283	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:28.308	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    I	22:00:28.309	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:28.309	[DFU] Data object executed
    V	22:00:28.309	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:28.309	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:28.342	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    I	22:00:28.342	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:28.343	[DFU] Data object (10/14) created
    D	22:00:28.343	[DFU] wait(400)
    A	22:00:28.745	[DFU] Uploading firmware...
    V	22:00:28.745	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:28.848	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:28.848	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:29.019	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-A0-00-00-17-F6-FA-CD
    I	22:00:29.019	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-A0-00-00-17-F6-FA-CD
    A	22:00:29.019	[DFU] Checksum received (Offset = 40960, CRC = CDFAF617)
    V	22:00:29.019	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:29.019	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:29.070	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    I	22:00:29.070	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:29.070	[DFU] Data object executed
    V	22:00:29.070	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:29.070	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:29.079	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    I	22:00:29.079	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:29.079	[DFU] Data object (11/14) created
    D	22:00:29.079	[DFU] wait(400)
    A	22:00:29.476	[DFU] Uploading firmware...
    V	22:00:29.480	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:29.580	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:29.580	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:29.766	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
    I	22:00:29.766	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-B0-00-00-BF-31-7C-99
    A	22:00:29.767	[DFU] Checksum received (Offset = 45056, CRC = 997C31BF)
    V	22:00:29.768	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:29.768	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:29.795	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    I	22:00:29.795	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:29.797	[DFU] Data object executed
    V	22:00:29.799	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:29.800	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:29.841	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    I	22:00:29.842	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:29.842	[DFU] Data object (12/14) created
    D	22:00:29.842	[DFU] wait(400)
    A	22:00:30.296	[DFU] Uploading firmware...
    V	22:00:30.297	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:30.298	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:30.298	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:30.528	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
    I	22:00:30.528	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-C0-00-00-2C-09-FF-4D
    A	22:00:30.528	[DFU] Checksum received (Offset = 49152, CRC = 4DFF092C)
    V	22:00:30.528	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:30.528	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:30.559	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
    I	22:00:30.559	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:30.559	[DFU] Data object executed
    V	22:00:30.559	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:30.559	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:30.580	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    I	22:00:30.580	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:30.580	[DFU] Data object (13/14) created
    D	22:00:30.580	[DFU] wait(400)
    A	22:00:30.975	[DFU] Uploading firmware...
    V	22:00:30.975	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:31.056	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:31.056	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:31.251	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-D0-00-00-4C-6A-ED-F3
    I	22:00:31.251	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-D0-00-00-4C-6A-ED-F3
    A	22:00:31.253	[DFU] Checksum received (Offset = 53248, CRC = F3ED6A4C)
    V	22:00:31.254	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:31.254	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:31.282	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    I	22:00:31.282	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
    A	22:00:31.282	[DFU] Data object executed
    V	22:00:31.282	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:31.282	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:31.310	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    I	22:00:31.313	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	22:00:31.313	[DFU] Data object (14/14) created
    D	22:00:31.313	[DFU] wait(400)
    A	22:00:31.715	[DFU] Uploading firmware...
    V	22:00:31.715	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
    V	22:00:31.836	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:31.836	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:31.971	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-8C-DE-00-00-C3-34-52-AD
    I	22:00:31.971	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-8C-DE-00-00-C3-34-52-AD
    A	22:00:31.972	[DFU] Checksum received (Offset = 56972, CRC = AD5234C3)
    V	22:00:31.972	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:31.972	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:31.998	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
    I	22:00:32.198	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-05
    W	22:00:32.200	[DFU] Remote DFU error: INVALID OBJECT. SD busy? Retrying...
    V	22:00:32.200	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:32.200	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	22:00:32.238	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
    D	22:00:32.600	[Callback] Connection state changed with status: 19 and new state: DISCONNECTED (0)
    W	22:00:32.600	Connection terminated by peer (status 19)
    I	22:00:32.600	Disconnected
    E	22:00:32.632	[DFU] Device has disconnected
    D	22:00:32.632	[DFU] gatt.disconnect()
    D	22:00:32.632	[DFU] gatt.close()
    D	22:00:32.633	[Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    D	22:00:32.648	[DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    V	22:00:32.651	[DFU] DFU service started
    I	22:00:32.651	[DFU] Firmware file opened successfully
    D	22:00:32.651	[DFU] wait(1000)
    D	22:00:33.662	[DFU] wait(1000)
    V	22:00:34.653	[DFU] Connecting to DFU target...
    D	22:00:34.682	[DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
    D	22:00:34.731	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    I	22:00:34.731	[DFU] Connected to C7:7A:40:D9:F2:64
    V	22:00:34.763	[DFU] Discovering services...
    D	22:00:34.763	[DFU] gatt.discoverServices()
    D	22:00:34.763	[DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    I	22:00:35.556	[DFU] Services discovered
    D	22:00:35.588	[DFU] wait(1000)
    V	22:00:36.585	[DFU] Requesting new MTU...
    D	22:00:36.586	[DFU] gatt.requestMtu(517)
    I	22:00:36.604	[DFU] MTU changed to: 247
    V	22:00:36.605	[DFU] Enabling notifications for 8ec90001-f315-4f60-9fb8-838830daea50
    D	22:00:36.605	[DFU] gatt.setCharacteristicNotification(8ec90001-f315-4f60-9fb8-838830daea50, true)
    D	22:00:36.605	[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
    I	22:00:36.663	[DFU] Data written to descr.8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-00
    V	22:00:36.663	[DFU] Notifications enabled for 8ec90001-f315-4f60-9fb8-838830daea50
    A	22:00:36.663	[DFU] Notifications enabled
    D	22:00:36.663	[DFU] wait(1000)
    

  • Hello,

    It looks like the error might be occuring the in the post-validate step in nrf_dfu_validation.c:postvalidate():postvalidate_app(). Maybe you have enabled the 'NRF_BL_APP_SIGNATURE_CHECK_REQUIRED' config setting in your sdk_config.h header? In that case, you will need to include the signature of the app in the dfu pacakage.

    E.g.

    .local/bin/nrfutil pkg generate --hw-version 52 --sd-req 0x0100 --application-version 9999  --app-boot-validation VALIDATE_ECDSA_P256_SHA256 --application /mnt/c/git/nrf52833/Output/Debug/Exe/firmware_256ms.hex --key-file private.pem app_dfu_package.zip

  • Thanks, that is the solution.

    Just to be clear, if we want the bootloader only to accept signed firmware packages, what option has to be enabled. As far as i understand the bootloader now validates the firmware at boot-time. That's fine. But what if we do not want to validate at boot, or after flashing, whenever it happens and only reject non-signed packages. Which option is that?

    Or are there only 2 options:

    1. Enable NRF_BL_APP_SIGNATURE_CHECK_REQUIRED and validate firmware sometime after transferring
    2. Disable NRF_BL_APP_SIGNATURE_CHECK_REQUIRED and there is no need for signed packages at all
  • NRF_DFU_REQUIRE_SIGNED_APP_UPDATE is the setting you should enable to make the bootloader only accept signed FW updates. The NRF_BL_APP_SIGNATURE_CHECK_REQUIRED setting is to require signature Boot validation of the app like you said.

Related