DFU OBJECT error on nRF52832

Good day to all

I am trying to change the Application on a device with an nRF52832 chip with an existing firmware. To do this, I use nRF Connect for Mobile 4.25.3. From the nRF5 SDK 17.1.0 examples/ble_peripheral/ble_app_beacon, I used ble_app_beacon_pca10040_s 132.hex and created it through nrfutil 5.2.0.a zip file of the firmware with the key I generated.

When I try to update the firmware via DFU, I get the following errors:

E 23:02:42.318 [DFU] Remote DFU error: INVALID OBJECT
V 23:02:42.318 [DFU] Disconnecting...
D 23:02:42.329 [DFU] gatt.disconnect()
I 23:02:42.342 [DFU] Disconnected
D 23:02:42.342 [DFU] gatt.refresh() (hidden)
D 23:02:42.345 [DFU] gatt.disconnect()
D 23:02:42.346 [DFU] gatt.close()
D 23:02:42.347 [DFU] wait(600)
D 23:02:42.822 [Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I 23:02:42.824 [Server] Device disconnected
D 23:02:42.836 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
E 23:02:42.838 Error 8 (0x8): GATT CONN TIMEOUT
I 23:02:42.838 Disconnected
D 23:02:42.862 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
D 23:02:42.949 gatt.close()
D 23:02:42.950 wait(200)
V 23:02:43.151 Connecting to F3:C3:23:D3:0C:24...
D 23:02:43.151 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 23:03:13.167 [Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I 23:03:13.167 [Server] Device disconnected
D 23:03:13.170 [Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
E 23:03:13.170 Error 133 (0x85): GATT ERROR
I 23:03:13.170 Disconnected

What am I doing wrong? Can you tell me how to update the firmware?

Parents
  • Hello,

    Are you using the pre-compiled hex in /nRF5_SDK_17.1.0_ddde560/examples/ble_peripheral/ble_app_beacon/hex by any chance? This hex contains both the application and the Softdevice, and can therefore not be used to create an application update package.

    Best regards,

    Vidar

  • Thanks.

    I go to nRF5_SDK_17.1.0_ddde560/examples/peripheral/blinky/pca10040/blank/armgcc and use make. So, as I understand, i have get the Application without SoftDevice.

    Then I run nrftils:

    $ nrfutil pkg generate --application nrf52832_xxaa.hex --hw-version 1 --sd-req 0x88 --application-version 1 --key-file keys/private.pem blinky.zip

    And got tthe same error then try DFU:

    V	20:24:09.884	[DFU] DFU service started
    V	20:24:09.884	[DFU] Opening file...
    I	20:24:09.893	[DFU] Firmware file opened successfully
    V	20:24:09.893	[DFU] Connecting to DFU target...
    D	20:24:09.893	[DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
    I	20:24:09.942	[DFU] Connected to F3:C3:23:D3:0C:24
    V	20:24:09.944	[DFU] Discovering services...
    D	20:24:09.944	[DFU] gatt.discoverServices()
    I	20:24:09.949	[DFU] Services discovered
    D	20:24:09.959	[DFU] wait(1000)
    W	20:24:10.955	[DFU] Application with buttonless update found
    V	20:24:10.955	[DFU] Jumping to the DFU Bootloader...
    V	20:24:10.955	[DFU] Enabling indications for 8ec90003-f315-4f60-9fb8-838830daea50
    D	20:24:10.955	[DFU] gatt.setCharacteristicNotification(8ec90003-f315-4f60-9fb8-838830daea50, true)
    D	20:24:10.957	[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x02-00)
    I	20:24:10.990	[DFU] Data written to descr.8ec90003-f315-4f60-9fb8-838830daea50, value (0x): 02-00
    V	20:24:10.990	[DFU] Notifications enabled for 8ec90003-f315-4f60-9fb8-838830daea50
    A	20:24:10.990	[DFU] Indications enabled
    D	20:24:10.990	[DFU] wait(1000)
    V	20:24:11.997	[DFU] Writing to characteristic 8ec90003-f315-4f60-9fb8-838830daea50
    D	20:24:11.998	[DFU] gatt.writeCharacteristic(8ec90003-f315-4f60-9fb8-838830daea50)
    A	20:24:12.023	[DFU] Enter bootloader sent (Op Code = 1)
    I	20:24:12.024	[DFU] Notification received from 8ec90003-f315-4f60-9fb8-838830daea50, value (0x): 20-01-01
    A	20:24:12.024	[DFU] Response received (Op Code = 1, Status = 1)
    D	20:24:12.024	[DFU] gatt.refresh() (hidden)
    D	20:24:12.026	[DFU] gatt.disconnect()
    D	20:24:12.028	[DFU] gatt.close()
    V	20:24:12.030	[DFU] Scanning for the DFU Bootloader...
    I	20:24:12.174	Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    I	20:24:12.412	[DFU] DFU Bootloader found with address F3:C3:23:D3:0C:25
    V	20:24:12.422	[DFU] DFU service started
    I	20:24:12.422	[DFU] Firmware file opened successfully
    D	20:24:12.422	[DFU] wait(1000)
    D	20:24:13.424	[DFU] wait(1000)
    V	20:24:14.435	[DFU] Connecting to DFU target...
    D	20:24:14.461	[DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
    I	20:24:14.579	[DFU] Connected to F3:C3:23:D3:0C:25
    V	20:24:14.583	[DFU] Discovering services...
    D	20:24:14.583	[DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    D	20:24:14.584	[DFU] gatt.discoverServices()
    I	20:24:15.235	[DFU] Services discovered
    D	20:24:15.252	[DFU] wait(1000)
    V	20:24:16.245	[DFU] Requesting new MTU...
    D	20:24:16.245	[DFU] gatt.requestMtu(517)
    I	20:24:16.282	[DFU] MTU changed to: 247
    V	20:24:16.283	[DFU] Enabling notifications for 8ec90001-f315-4f60-9fb8-838830daea50
    D	20:24:16.283	[DFU] gatt.setCharacteristicNotification(8ec90001-f315-4f60-9fb8-838830daea50, true)
    D	20:24:16.289	[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
    I	20:24:16.313	[DFU] Data written to descr.8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-00
    V	20:24:16.313	[DFU] Notifications enabled for 8ec90001-f315-4f60-9fb8-838830daea50
    A	20:24:16.313	[DFU] Notifications enabled
    D	20:24:16.313	[DFU] wait(1000)
    V	20:24:17.320	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	20:24:17.320	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	20:24:17.371	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 06-01
    I	20:24:17.379	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-06-01-00-01-00-00-00-00-00-00-00-00-00-00
    A	20:24:17.379	[DFU] Command object info received (Max size = 256, Offset = 0, CRC = 00000000)
    V	20:24:17.379	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	20:24:17.380	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	20:24:17.408	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 02-00-00
    I	20:24:17.423	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-02-01
    A	20:24:17.423	[DFU] Packet Receipt Notif disabled (Op Code = 2, Value = 0)
    V	20:24:17.423	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	20:24:17.423	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	20:24:17.468	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-01-8D-00-00-00
    I	20:24:17.484	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
    A	20:24:17.485	[DFU] Command object created
    V	20:24:17.485	[DFU] Writing to characteristic 8ec90002-f315-4f60-9fb8-838830daea50
    D	20:24:17.485	[DFU] gatt.writeCharacteristic(8ec90002-f315-4f60-9fb8-838830daea50)
    I	20:24:17.489	[DFU] Data written to 8ec90002-f315-4f60-9fb8-838830daea50, value (0x): 12-8A-01-0A-44-08-01-12-40-08-01-10-01-1A-02-88-01-20-00-28-00-30-00-38-B8-C9-01-42-24-08-03-12-20-6B-E1-92-B5-BB-FB-8B-EB-47-F8-06-E6-14-15-AE-13-FE-83-C9-81-0D-D8-DE-5D-99-FD-D5-E6-17-14-AE-DC-48-00-52-04-08-01-12-00-10-00-1A-40-28-75-F8-F7-49-5C-59-BB-CA-52-C3-84-80-04-61-4D-D7-67-CA-3B-F9-3F-7C-FF-88-71-1C-00-B6-6E-99-16-32-45-64-D6-D0-03-28-27-3D-1E-19-6A-69-1F-5B-8B-6F-65-58-33-C4-78-00-9E-F3-1A-33-F1-85-F4-06-E0
    A	20:24:17.489	[DFU] Command object sent (CRC = CE68E21C)
    V	20:24:17.490	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	20:24:17.490	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	20:24:17.605	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
    I	20:24:17.621	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-8D-00-00-00-1C-E2-68-CE
    A	20:24:17.621	[DFU] Checksum received (Offset = 141, CRC = CE68E21C)
    V	20:24:17.621	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	20:24:17.621	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	20:24:17.654	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
    I	20:24:17.805	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-05
    E	20:24:17.805	[DFU] Remote DFU error: INVALID OBJECT
    V	20:24:17.805	[DFU] Disconnecting...
    D	20:24:17.817	[DFU] gatt.disconnect()
    I	20:24:17.829	[DFU] Disconnected
    D	20:24:17.829	[DFU] gatt.refresh() (hidden)
    D	20:24:17.831	[DFU] gatt.disconnect()
    D	20:24:17.834	[DFU] gatt.close()
    D	20:24:17.836	[DFU] wait(600)
    D	20:24:18.192	[Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
    I	20:24:18.192	[Server] Device disconnected
    D	20:24:18.206	[Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
    E	20:24:18.206	Error 8 (0x8): GATT CONN TIMEOUT
    I	20:24:18.206	Disconnected
    D	20:24:18.217	[Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    D	20:24:18.438	gatt.close()
    D	20:24:18.440	wait(200)
    V	20:24:18.640	Connecting to F3:C3:23:D3:0C:24...
    D	20:24:18.640	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D	20:24:48.660	[Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
    I	20:24:48.660	[Server] Device disconnected
    D	20:24:48.668	[Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
    E	20:24:48.668	Error 133 (0x85): GATT ERROR
    I	20:24:48.668	Disconnected


    Any suggestions?

  • Your application needs to be linked to start above the Softdevice in flash as illustrated here: Memory layout. The "blank" configuration you use now starts at address 0x0 and will therefore overlap with the MBR and Softdevice. Please try with /nRF5_SDK_17.1.0_ddde560/examples/peripheral/blinky/pca10040/s132/armgcc instead.

Reply Children
No Data
Related