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

After DFU (OTA) successful firmware update, device needs to power cycle

Hi, 

For both (nRF52840 / nRF52832 ), with SDK version nRF5_SDK_15.3.0_59ac345

I am using Secure_Bootloader in the eample folder:

    nRF5_SDK_15.3.0_59ac345/examples/ble_peripheral/ble_app_buttonless_dfu

DFU is successful. But after firmware updated, the device needs to be power cycled to run. Otherwise, it stuck.

What needs to be done, in order to reset the device after update?

Thank you,

David

//================================DFU Controller Messages ===========

nRF Connect, 2020-05-18
S4a45@010 (DA:86:98:E3:41:AC)
I 14:28:33.869 [Server] Server started
V 14:28:33.951 Heart Rate (0x180D)
- Heart Rate Measurement [N] (0x2A37)
   Client Characteristic Configuration (0x2902)
- Body Sensor Location [R] (0x2A38)
- Heart Rate Control Point [W] (0x2A39)
Unknown Service (0000aaa0-0000-1000-8000-aabbccddeeff)
- Unknown Characteristic [N R] (0000aaa1-0000-1000-8000-aabbccddeeff)
   Client Characteristic Configuration (0x2902)
   Unknown Descriptor (0000aab0-0000-1000-8000-aabbccddeeff)
   Characteristic User Description (0x2901)
   Characteristic Presentation Format (0x2904)
- Unknown Characteristic [I W WNR] (0000aaa2-0000-1000-8000-aabbccddeeff)
   Client Characteristic Configuration (0x2902)
User Data (0x181C)
- First Name [R W] (0x2A8A)
- Last Name [R W] (0x2A90)
- Gender [R W] (0x2A8C)
V 14:28:34.368 Connecting to DA:86:98:E3:41:AC...
D 14:28:34.368 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 14:28:35.730 [Server callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 14:28:35.730 [Server] Device with address DA:86:98:E3:41:AC connected
D 14:28:35.738 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 14:28:35.738 Connected to DA:86:98:E3:41:AC
D 14:28:35.740 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
V 14:28:35.778 Discovering services...
D 14:28:35.778 gatt.discoverServices()
I 14:28:36.067 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 14:28:36.290 [Callback] Services discovered with status: 0
I 14:28:36.290 Services discovered
V 14:28:36.301 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)
- Service Changed [I] (0x2A05)
   Client Characteristic Configuration (0x2902)
Secure DFU Service (0xFE59)
- Buttonless DFU [I W] (8ec90003-f315-4f60-9fb8-838830daea50)
   Client Characteristic Configuration (0x2902)
D 14:28:36.301 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
I 14:28:36.355 Connection parameters updated (interval: 48.75ms, latency: 0, timeout: 5000ms)
V 14:28:40.986 [DFU] DFU service started
V 14:28:40.986 [DFU] Opening file...
I 14:28:41.003 [DFU] Firmware file opened successfully
V 14:28:41.003 [DFU] Connecting to DFU target...
D 14:28:41.004 [DFU] gatt = device.connectGatt(autoConnect = false)
I 14:28:41.010 [DFU] Connected to DA:86:98:E3:41:AC
V 14:28:41.012 [DFU] Discovering services...
D 14:28:41.012 [DFU] gatt.discoverServices()
I 14:28:41.022 [DFU] Services discovered
D 14:28:41.036 [DFU] wait(1000)
W 14:28:42.043 [DFU] Application with buttonless update found
V 14:28:42.043 [DFU] Jumping to the DFU Bootloader...
V 14:28:42.043 [DFU] Enabling indications for 8ec90003-f315-4f60-9fb8-838830daea50
D 14:28:42.043 [DFU] gatt.setCharacteristicNotification(8ec90003-f315-4f60-9fb8-838830daea50, true)
D 14:28:42.043 [DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x02-00)
I 14:28:42.111 [DFU] Data written to descr.8ec90003-f315-4f60-9fb8-838830daea50, value (0x): 02-00
V 14:28:42.111 [DFU] Notifications enabled for 8ec90003-f315-4f60-9fb8-838830daea50
A 14:28:42.113 [DFU] Indications enabled
D 14:28:42.114 [DFU] wait(1000)
V 14:28:43.131 [DFU] Writing to characteristic 8ec90003-f315-4f60-9fb8-838830daea50
D 14:28:43.131 [DFU] gatt.writeCharacteristic(8ec90003-f315-4f60-9fb8-838830daea50)
A 14:28:43.235 [DFU] Enter bootloader sent (Op Code = 1)
I 14:28:43.236 [DFU] Notification received from 8ec90003-f315-4f60-9fb8-838830daea50, value (0x): 20-01-01
A 14:28:43.236 [DFU] Response received (Op Code = 1, Status = 1)
D 14:28:48.298 [Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I 14:28:48.298 [Server] Device disconnected
I 14:28:48.342 [DFU] Disconnected by the remote device
D 14:28:48.342 [DFU] gatt.refresh() (hidden)
D 14:28:48.342 [DFU] gatt.close()
V 14:28:48.342 [DFU] Scanning for the DFU Bootloader...
D 14:28:48.342 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
E 14:28:48.342 Error 8 (0x8): GATT CONN TIMEOUT
I 14:28:48.342 Disconnected
D 14:28:48.346 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
D 14:28:48.372 [DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
I 14:28:48.453 [DFU] DFU Bootloader found with address DA:86:98:E3:41:AD
V 14:28:48.468 [DFU] DFU service started
I 14:28:48.468 [DFU] Firmware file opened successfully
D 14:28:48.468 [DFU] wait(1000)
D 14:28:49.468 [DFU] wait(1000)
V 14:28:50.469 [DFU] Connecting to DFU target...
D 14:28:50.508 [DFU] gatt = device.connectGatt(autoConnect = false)
I 14:28:50.599 [DFU] Connected to DA:86:98:E3:41:AD
V 14:28:50.601 [DFU] Discovering services...
D 14:28:50.601 [DFU] gatt.discoverServices()
D 14:28:50.604 [DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
I 14:28:51.395 [DFU] Services discovered
D 14:28:51.419 [DFU] wait(1000)
V 14:28:52.409 [DFU] Requesting new MTU...
D 14:28:52.410 [DFU] gatt.requestMtu(517)
I 14:28:52.435 [DFU] MTU changed to: 247
V 14:28:52.436 [DFU] Enabling notifications for 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:52.437 [DFU] gatt.setCharacteristicNotification(8ec90001-f315-4f60-9fb8-838830daea50, true)
D 14:28:52.439 [DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
I 14:28:52.469 [DFU] Data written to descr.8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-00
V 14:28:52.471 [DFU] Notifications enabled for 8ec90001-f315-4f60-9fb8-838830daea50
A 14:28:52.476 [DFU] Notifications enabled
D 14:28:52.478 [DFU] wait(1000)
V 14:28:53.479 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:53.479 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:53.533 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 06-01
I 14:28:53.533 [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
A 14:28:53.535 [DFU] Command object info received (Max size = 512, Offset = 0, CRC = 00000000)
V 14:28:53.535 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:53.535 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:53.559 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 02-00-00
I 14:28:53.559 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-02-01
A 14:28:53.559 [DFU] Packet Receipt Notif disabled (Op Code = 2, Value = 0)
V 14:28:53.559 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:53.560 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:53.590 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-01-8D-00-00-00
I 14:28:53.590 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A 14:28:53.591 [DFU] Command object created
V 14:28:53.592 [DFU] Writing to characteristic 8ec90002-f315-4f60-9fb8-838830daea50
D 14:28:53.592 [DFU] gatt.writeCharacteristic(8ec90002-f315-4f60-9fb8-838830daea50)
I 14:28:53.594 [DFU] Data written to 8ec90002-f315-4f60-9fb8-838830daea50, value (0x): 12-8A-01-0A-44-08-01-12-40-08-01-10-34-1A-02-B7-01-20-00-28-00-30-00-38-88-B0-02-42-24-08-03-12-20-E0-D6-8A-EA-B0-B5-64-D6-1C-70-00-B8-47-0E-77-8A-9F-EC-38-CD-0C-C8-5F-85-14-91-5D-B7-F6-AF-26-9A-48-00-52-04-08-01-12-00-10-00-1A-40-06-96-B1-E6-66-00-C8-28-61-FE-05-23-38-26-44-EE-3D-D7-76-96-D1-33-44-A8-3C-D2-43-08-94-63-73-74-07-C9-1B-69-11-09-12-53-C3-9E-3E-3D-B3-0E-94-9E-50-1E-21-64-B7-F9-2D-08-BB-76-74-E7-50-F3-FB-2F
A 14:28:53.594 [DFU] Command object sent (CRC = B3DCC39B)
V 14:28:53.594 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:53.594 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:53.619 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
I 14:28:53.625 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-8D-00-00-00-9B-C3-DC-B3
A 14:28:53.625 [DFU] Checksum received (Offset = 141, CRC = B3DCC39B)
V 14:28:53.625 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:53.625 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:53.649 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
I 14:28:53.785 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A 14:28:53.785 [DFU] Command object executed
V 14:28:53.785 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:53.786 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:53.816 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 02-0A-00
I 14:28:53.818 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-02-01
A 14:28:53.818 [DFU] Packet Receipt Notif Req (Op Code = 2) sent (Value = 10)
V 14:28:53.818 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:53.818 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:53.934 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 06-02
I 14:28:53.936 [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
A 14:28:53.936 [DFU] Data object info received (Max size = 4096, Offset = 0, CRC = 00000000)
V 14:28:53.964 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:53.964 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:54.076 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
I 14:28:54.077 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A 14:28:54.077 [DFU] Data object (1/10) created
D 14:28:54.077 [DFU] wait(400)
A 14:28:54.479 [DFU] Uploading firmware...
V 14:28:54.479 [DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V 14:28:54.719 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:54.720 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:54.819 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
I 14:28:54.821 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-10-00-00-DC-0C-0D-9B
A 14:28:54.821 [DFU] Checksum received (Offset = 4096, CRC = 9B0D0CDC)
V 14:28:54.821 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:54.821 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:54.850 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
I 14:28:54.911 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A 14:28:54.911 [DFU] Data object executed
V 14:28:54.911 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:54.911 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:54.946 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
I 14:28:54.946 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A 14:28:54.946 [DFU] Data object (2/10) created
A 14:28:54.946 [DFU] Uploading firmware...
V 14:28:54.946 [DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V 14:28:55.297 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:55.297 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:55.391 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
I 14:28:55.391 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-20-00-00-B2-4C-5D-8C
A 14:28:55.391 [DFU] Checksum received (Offset = 8192, CRC = 8C5D4CB2)
V 14:28:55.391 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:55.391 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:55.420 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
I 14:28:55.451 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A 14:28:55.451 [DFU] Data object executed
V 14:28:55.451 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:55.451 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:55.484 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
I 14:28:55.484 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A 14:28:55.484 [DFU] Data object (3/10) created
A 14:28:55.484 [DFU] Uploading firmware...
V 14:28:55.484 [DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V 14:28:55.810 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:55.810 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:55.930 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
I 14:28:55.932 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-30-00-00-84-E9-9C-A6
A 14:28:55.932 [DFU] Checksum received (Offset = 12288, CRC = A69CE984)
V 14:28:55.932 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:55.932 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:55.959 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
I 14:28:55.976 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A 14:28:55.976 [DFU] Data object executed
V 14:28:55.976 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:55.976 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:56.007 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
I 14:28:56.007 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A 14:28:56.007 [DFU] Data object (4/10) created
A 14:28:56.007 [DFU] Uploading firmware...
V 14:28:56.007 [DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V 14:28:56.341 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:56.341 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:56.440 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
I 14:28:56.440 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-40-00-00-4B-16-CF-21
A 14:28:56.441 [DFU] Checksum received (Offset = 16384, CRC = 21CF164B)
V 14:28:56.441 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:56.441 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:56.469 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
I 14:28:56.501 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A 14:28:56.501 [DFU] Data object executed
V 14:28:56.501 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:56.501 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:56.533 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
I 14:28:56.533 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A 14:28:56.533 [DFU] Data object (5/10) created
A 14:28:56.533 [DFU] Uploading firmware...
V 14:28:56.533 [DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V 14:28:56.866 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:56.866 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:56.967 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
I 14:28:56.967 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-50-00-00-CE-65-43-60
A 14:28:56.967 [DFU] Checksum received (Offset = 20480, CRC = 604365CE)
V 14:28:56.967 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:56.967 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:56.994 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
I 14:28:57.026 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A 14:28:57.026 [DFU] Data object executed
V 14:28:57.026 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:57.026 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:57.055 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
I 14:28:57.056 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A 14:28:57.057 [DFU] Data object (6/10) created
A 14:28:57.057 [DFU] Uploading firmware...
V 14:28:57.057 [DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V 14:28:57.397 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:57.397 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:57.489 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
I 14:28:57.490 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-60-00-00-D3-30-F2-F9
A 14:28:57.490 [DFU] Checksum received (Offset = 24576, CRC = F9F230D3)
V 14:28:57.490 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:57.490 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:57.519 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
I 14:28:57.549 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A 14:28:57.549 [DFU] Data object executed
V 14:28:57.549 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:57.549 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:57.578 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
I 14:28:57.579 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A 14:28:57.579 [DFU] Data object (7/10) created
A 14:28:57.579 [DFU] Uploading firmware...
V 14:28:57.579 [DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V 14:28:57.924 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:57.925 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:58.017 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
I 14:28:58.017 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-70-00-00-51-C5-C7-34
A 14:28:58.017 [DFU] Checksum received (Offset = 28672, CRC = 34C7C551)
V 14:28:58.017 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:58.017 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:58.045 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
I 14:28:58.076 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A 14:28:58.076 [DFU] Data object executed
V 14:28:58.076 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:58.076 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:58.105 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
I 14:28:58.105 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A 14:28:58.105 [DFU] Data object (8/10) created
A 14:28:58.105 [DFU] Uploading firmware...
V 14:28:58.105 [DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V 14:28:58.444 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:58.444 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:58.525 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
I 14:28:58.527 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-80-00-00-C5-B2-56-7F
A 14:28:58.527 [DFU] Checksum received (Offset = 32768, CRC = 7F56B2C5)
V 14:28:58.527 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:58.527 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:58.554 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
I 14:28:58.601 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A 14:28:58.601 [DFU] Data object executed
V 14:28:58.601 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:58.601 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:58.632 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
I 14:28:58.632 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A 14:28:58.633 [DFU] Data object (9/10) created
A 14:28:58.633 [DFU] Uploading firmware...
V 14:28:58.633 [DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V 14:28:58.969 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:58.969 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:59.051 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
I 14:28:59.051 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-90-00-00-A5-EA-5C-8E
A 14:28:59.051 [DFU] Checksum received (Offset = 36864, CRC = 8E5CEAA5)
V 14:28:59.051 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:59.051 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:59.079 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
I 14:28:59.127 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A 14:28:59.127 [DFU] Data object executed
V 14:28:59.127 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:59.127 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:59.155 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-08-08-00-00
I 14:28:59.155 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A 14:28:59.155 [DFU] Data object (10/10) created
A 14:28:59.155 [DFU] Uploading firmware...
V 14:28:59.156 [DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V 14:28:59.200 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:59.200 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:59.424 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
I 14:28:59.426 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-08-98-00-00-3E-E7-C2-EE
A 14:28:59.427 [DFU] Checksum received (Offset = 38920, CRC = EEC2E73E)
V 14:28:59.427 [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
D 14:28:59.427 [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
I 14:28:59.456 [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
I 14:28:59.651 [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A 14:28:59.654 [DFU] Data object executed
A 14:28:59.654 [DFU] Upload completed in 5302 ms
I 14:28:59.946 [DFU] Disconnected by the remote device
D 14:28:59.948 [DFU] gatt.refresh() (hidden)
D 14:28:59.950 [DFU] gatt.close()
D 14:28:59.957 [DFU] wait(1400)
D 14:28:59.960 [DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
D 14:29:01.364 gatt.close()
D 14:29:01.365 wait(200)
V 14:29:01.567 Connecting to DA:86:98:E3:41:AC...
D 14:29:01.567 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 14:29:02.249 [Server callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 14:29:02.249 [Server] Device with address DA:86:98:E3:41:AC connected
D 14:29:02.259 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D 14:29:02.291 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 14:29:02.291 Connected to DA:86:98:E3:41:AC
V 14:29:02.326 Discovering services...
D 14:29:02.326 gatt.discoverServices()
I 14:29:02.588 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 14:29:02.816 [Callback] Services discovered with status: 0
I 14:29:02.816 Services discovered
V 14:29:02.826 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)
- Service Changed [I] (0x2A05)
   Client Characteristic Configuration (0x2902)
Secure DFU Service (0xFE59)
- Buttonless DFU [I W] (8ec90003-f315-4f60-9fb8-838830daea50)
   Client Characteristic Configuration (0x2902)
D 14:29:02.826 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
I 14:29:02.883 Connection parameters updated (interval: 48.75ms, latency: 0, timeout: 5000ms)

Parents Reply Children
  • Hi David,

    TigerD said:
    //NRF_POWER->GPREGRET = BOOTLOADER_DFU_START;

    I could not find this code in the main.c of Buttonless DFU Template Application example. Which example are you using?

    Power.GPREGRET register is the general purpose retention register. BOOTLOADER_DFU_START is a magic number to signal that the bootloader should enter DFU mode because of the signal from Buttonless DFU in the main app.

    TigerD said:
    //peer_manager_Init(); 

    peer_manager_Init() is used to initial Peer Manager which manages BLE security (encryption, pairing, and bonding). Please see the Peer Manager Usage section for the detail.  

    -Amanda H.

  • Amanda,

    Sorry, I must have copied from other places. 

    But my main question is Bootloader seems not resetting after firmware update. That should be in the securebootloader, right? The secure_bootloader is the one under dfu folder.

    Any suggestions to what part is missing for not doing software reset?

    Thank you,

    david

  • I tested the example ble_app_buttonless_dfu in the folder

      ../nRF5_SDK_15.3.0_59ac345/examples/ble_peripheral

    And I tested on the nRF52840 dev board. The firmware is updated through OTA, but it needs to toggle the power switch to run the application.

    I looked into the ../components/libraries/nrf_bootloader/nrf_bootloader_app_start.c

    there is nrf_bootloader_app_start();

    AND in the nrf_bootoader_app_start_final.c , there is nrf_bootloader_app_start_final(),  app_start(), I don't know which function is the last call to jump to application. Or is it possible the settings generated through nrfutil tool is not right. But application can be started from bootloader after power cycle. I believe there is something in the secure_bootloader code, not resetting the CPU (softReset) after successfully updated firmware. It is difficult to debug bootloader. 

    Please help on this item.

    Thank you,

    David

  • Hi David, 

    Did you modify the example of ble_app_buttonless_dfu and Secure_Bootloader?

    Did you combine ble_app_buttonless_dfu application, bootloader and softdevice image with the Bootloader settings page?

    I would recommend you to go through this blog post in order to get started with our DFU solution: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader.

    -Amanda H.

  • Amanda,

    I tested again, I found that the DFU reset application and application runs without cold reboot by using the nRFToolBox – DFU app on the Android Phone.

     

    The application is reset and activated without cold reboot by using nRFconnect tool app – DFU menu function. But the new loaded application is immediately entering DFU mode again after it is activated by bootloader after updating . That is the reason that the new loaded application behaves not running. A cold reboot certainly clears the state. I confirmed that the new loaded application goes back into application mode by clicking the DISCONNECT menu button on the nRFConnect app without needing a cold reboot.  That is the symptom. As far as whether the root cause is because some bad setting on the application code or in the nRF Connect app, I don’t know at this point.

     

    With DFU tool in the nRFtoolBox, it seems consistently working ok so far. I think we can live with that by using nRFToolBox only.

    Thank you,

    David

Related