nRF52832 Secure DFU: Succeeds at 100% but fails to reconnect (GATT Error 133)

Hardware: nRF52832 (BM832 Module) 

Programming setup: Custom board connected via Debug Out pins of nRF52-DK (PCA10040) 

SDK Version: [nRF5_SDK_17.1.0_ddde560] 

SoftDevice: S132 

Description: I am implementing Buttonless Secure DFU on a custom nRF52832 module. I recently moved my bootloader start address to 0x71000 to accommodate a larger bootloader size. While the nRF Connect app (Android) shows the DFU transfer reaching 100% and the bootloader seems to "execute" the data object, the reconnect attempt to the application fails with GATT ERROR 133 (0x85).

Observations from nRF Connect Log:

  1. Jump from Application to Bootloader (...EB to ...EC) works correctly.
  2. During the transfer, I occasionally see Error 8 (0x8): GATT INSUF AUTHORIZATION or GATT CONN TIMEOUT, but the nRF Connect app seems to recover and continues the upload.
  3. Final Data object executed notification is received.
  4. Reconnection attempt to original address (...EB) lasts 10 seconds and ends with Error 133 (0x85).
  5. After the failure, the device is not advertising.

What I have tried:

  • Verified UICR matches the linker FLASH_START.
  • Performed a full chip erase and re-programmed the stack.
  • Verified that the application binary size (approx 96KB) is well within the Dual Bank limits for this layout.

Questions:

  1. Could the GATT INSUF AUTHORIZATION error during the transfer be causing a post-update validation issue, even if the transfer reaches 100%?
  2. Since I am using a custom BM832 module, are there specific reset or power behaviors after the DFU swap that could lead to a GATT 133 error?
  3. Does the S132 require specific RAM adjustments if the bootloader is moved to a lower address like 0x71000?

nRF Connect, 2026-04-27
Nordic (D9:12:D8:0A:E4:EB)
I	17:48:16.563	[Server] Server started
V	17:48:16.567	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	17:48:16.750	Connecting to D9:12:D8:0A:E4:EB...
D	17:48:16.750	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D	17:48:17.319	[Server callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I	17:48:17.319	[Server] Device with address D9:12:D8:0A:E4:EB connected
D	17:48:17.347	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I	17:48:17.347	Connected to D9:12:D8:0A:E4:EB
V	17:48:17.348	Discovering services...
D	17:48:17.348	gatt.discoverServices()
I	17:48:17.584	Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D	17:48:17.675	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D	17:48:17.758	[Callback] Services discovered with status: 0
I	17:48:17.759	Services discovered
V	17:48:17.770	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	17:48:17.771	gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
I	17:48:17.825	Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 5000ms)
I	17:48:22.445	Connection parameters updated (interval: 180.0ms, latency: 0, timeout: 4000ms)
V	17:50:07.206	[DFU] DFU service started
V	17:50:07.206	[DFU] Opening file...
I	17:50:07.213	[DFU] Firmware file opened successfully
V	17:50:07.213	[DFU] Connecting to DFU target...
D	17:50:07.213	[DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
I	17:50:07.230	[DFU] Connected to D9:12:D8:0A:E4:EB
V	17:50:07.230	[DFU] Discovering services...
D	17:50:07.230	[DFU] gatt.discoverServices()
I	17:50:07.233	[DFU] Services discovered
W	17:50:07.241	[DFU] Application with buttonless update found
V	17:50:07.241	[DFU] Jumping to the DFU Bootloader...
V	17:50:07.241	[DFU] Enabling indications for 8ec90003-f315-4f60-9fb8-838830daea50
D	17:50:07.241	[DFU] gatt.setCharacteristicNotification(8ec90003-f315-4f60-9fb8-838830daea50, true)
D	17:50:07.241	[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x02-00)
I	17:50:07.580	[DFU] Data written to descr.8ec90003-f315-4f60-9fb8-838830daea50
V	17:50:07.580	[DFU] Notifications enabled for 8ec90003-f315-4f60-9fb8-838830daea50
A	17:50:07.580	[DFU] Indications enabled
V	17:50:07.602	[DFU] Writing to characteristic 8ec90003-f315-4f60-9fb8-838830daea50, value (0x): 01
D	17:50:07.602	[DFU] gatt.writeCharacteristic(8ec90003-f315-4f60-9fb8-838830daea50, value=0x01, WRITE_TYPE_DEFAULT)
A	17:50:07.935	[DFU] Enter bootloader sent (Op Code = 1)
I	17:50:07.936	[DFU] Notification received from 8ec90003-f315-4f60-9fb8-838830daea50, value (0x): 20-01-01
A	17:50:07.936	[DFU] Response received (Op Code = 1, Status = 1)
D	17:50:07.936	[DFU] wait(500)
V	17:50:08.436	[DFU] Disconnecting...
D	17:50:08.444	[DFU] gatt.disconnect()
I	17:50:08.448	[DFU] Disconnected
D	17:50:08.448	[DFU] gatt.refresh() (hidden)
D	17:50:08.451	[DFU] gatt.disconnect()
D	17:50:08.458	[DFU] gatt.close()
V	17:50:08.463	[DFU] Scanning for the DFU Bootloader... (timeout 5000 ms)
I	17:50:08.530	[DFU] DFU Bootloader found with address D9:12:D8:0A:E4:EC
V	17:50:08.540	[DFU] DFU service started
I	17:50:08.540	[DFU] Firmware file opened successfully
V	17:50:08.540	[DFU] Connecting to DFU target...
D	17:50:08.541	[DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
I	17:50:08.676	[DFU] Connected to D9:12:D8:0A:E4:EC
V	17:50:08.677	[DFU] Discovering services...
D	17:50:08.677	[DFU] gatt.discoverServices()
D	17:50:08.760	[DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
I	17:50:09.226	[DFU] Services discovered
V	17:50:09.236	[DFU] Requesting new MTU...
D	17:50:09.236	[DFU] gatt.requestMtu(517)
I	17:50:09.245	[DFU] MTU changed to: 23
V	17:50:09.246	[DFU] Enabling notifications for 8ec90001-f315-4f60-9fb8-838830daea50
D	17:50:09.246	[DFU] gatt.setCharacteristicNotification(8ec90001-f315-4f60-9fb8-838830daea50, true)
D	17:50:09.247	[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
I	17:50:09.264	[DFU] Data written to descr.8ec90001-f315-4f60-9fb8-838830daea50
V	17:50:09.264	[DFU] Notifications enabled for 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:09.264	[DFU] Notifications enabled
V	17:50:09.265	[DFU] Requesting high connection priority...
D	17:50:09.265	[DFU] gatt.requestConnectionPriority(HIGH)
V	17:50:09.268	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 06-01
D	17:50:09.269	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x06-01, WRITE_TYPE_DEFAULT)
I	17:50:09.281	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:09.311	[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	17:50:09.311	[DFU] Command object info received (Max size = 512, Offset = 0, CRC = 00000000)
V	17:50:09.312	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 02-00-00
D	17:50:09.312	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x02-00-00, WRITE_TYPE_DEFAULT)
I	17:50:09.402	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:09.432	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-02-01
A	17:50:09.432	[DFU] Packet Receipt Notif disabled (Op Code = 2, Value = 0)
V	17:50:09.432	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-01-8D-00-00-00
D	17:50:09.432	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-01-8D-00-00-00, WRITE_TYPE_DEFAULT)
I	17:50:09.491	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:09.491	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:09.491	[DFU] Command object created
V	17:50:09.491	[DFU] Writing to characteristic 8ec90002-f315-4f60-9fb8-838830daea50 value (0x): 12-8A-01-0A-44-08-01-12-40-08-05-10-34-1A-02-81-02-20-00-28
D	17:50:09.491	[DFU] gatt.writeCharacteristic(8ec90002-f315-4f60-9fb8-838830daea50, value=0x12-8A-01-0A-44-08-01-12-40-08-05-10-34-1A-02-81-02-20-00-28, WRITE_TYPE_NO_RESPONSE)
I	17:50:09.494	[DFU] Data written to 8ec90002-f315-4f60-9fb8-838830daea50
V	17:50:09.495	[DFU] Writing to characteristic 8ec90002-f315-4f60-9fb8-838830daea50 value (0x): 00-30-00-38-98-80-06-42-24-08-03-12-20-ED-22-02-DB-B7-83-5C
D	17:50:09.495	[DFU] gatt.writeCharacteristic(8ec90002-f315-4f60-9fb8-838830daea50, value=0x00-30-00-38-98-80-06-42-24-08-03-12-20-ED-22-02-DB-B7-83-5C, WRITE_TYPE_NO_RESPONSE)
I	17:50:09.498	[DFU] Data written to 8ec90002-f315-4f60-9fb8-838830daea50
V	17:50:09.500	[DFU] Writing to characteristic 8ec90002-f315-4f60-9fb8-838830daea50 value (0x): E1-B8-CE-6C-3B-47-1E-A1-6F-17-EB-87-1C-E7-93-82-D4-99-E5-1D
D	17:50:09.501	[DFU] gatt.writeCharacteristic(8ec90002-f315-4f60-9fb8-838830daea50, value=0xE1-B8-CE-6C-3B-47-1E-A1-6F-17-EB-87-1C-E7-93-82-D4-99-E5-1D, WRITE_TYPE_NO_RESPONSE)
I	17:50:09.503	[DFU] Data written to 8ec90002-f315-4f60-9fb8-838830daea50
V	17:50:09.505	[DFU] Writing to characteristic 8ec90002-f315-4f60-9fb8-838830daea50 value (0x): 3E-32-A5-38-3C-48-00-52-04-08-01-12-00-10-00-1A-40-0E-56-A3
D	17:50:09.505	[DFU] gatt.writeCharacteristic(8ec90002-f315-4f60-9fb8-838830daea50, value=0x3E-32-A5-38-3C-48-00-52-04-08-01-12-00-10-00-1A-40-0E-56-A3, WRITE_TYPE_NO_RESPONSE)
I	17:50:09.509	[DFU] Data written to 8ec90002-f315-4f60-9fb8-838830daea50
V	17:50:09.509	[DFU] Writing to characteristic 8ec90002-f315-4f60-9fb8-838830daea50 value (0x): 15-87-93-DB-4A-FB-D1-3F-27-41-3C-CC-AF-78-19-2E-40-45-F7-11
D	17:50:09.509	[DFU] gatt.writeCharacteristic(8ec90002-f315-4f60-9fb8-838830daea50, value=0x15-87-93-DB-4A-FB-D1-3F-27-41-3C-CC-AF-78-19-2E-40-45-F7-11, WRITE_TYPE_NO_RESPONSE)
I	17:50:09.510	[DFU] Data written to 8ec90002-f315-4f60-9fb8-838830daea50
V	17:50:09.510	[DFU] Writing to characteristic 8ec90002-f315-4f60-9fb8-838830daea50 value (0x): EB-96-01-CB-14-1C-F8-ED-AE-5D-BB-13-F7-75-62-C5-65-17-46-AE
D	17:50:09.510	[DFU] gatt.writeCharacteristic(8ec90002-f315-4f60-9fb8-838830daea50, value=0xEB-96-01-CB-14-1C-F8-ED-AE-5D-BB-13-F7-75-62-C5-65-17-46-AE, WRITE_TYPE_NO_RESPONSE)
I	17:50:09.513	[DFU] Data written to 8ec90002-f315-4f60-9fb8-838830daea50
V	17:50:09.513	[DFU] Writing to characteristic 8ec90002-f315-4f60-9fb8-838830daea50 value (0x): 54-45-7D-45-D5-8F-BF-FD-9D-9E-FE-7B-2D-56-85-B1-26-A4-9D-81
D	17:50:09.513	[DFU] gatt.writeCharacteristic(8ec90002-f315-4f60-9fb8-838830daea50, value=0x54-45-7D-45-D5-8F-BF-FD-9D-9E-FE-7B-2D-56-85-B1-26-A4-9D-81, WRITE_TYPE_NO_RESPONSE)
I	17:50:09.517	[DFU] Data written to 8ec90002-f315-4f60-9fb8-838830daea50
V	17:50:09.517	[DFU] Writing to characteristic 8ec90002-f315-4f60-9fb8-838830daea50 value (0x): 5A
D	17:50:09.517	[DFU] gatt.writeCharacteristic(8ec90002-f315-4f60-9fb8-838830daea50, value=0x5A, WRITE_TYPE_NO_RESPONSE)
I	17:50:09.518	[DFU] Data written to 8ec90002-f315-4f60-9fb8-838830daea50
A	17:50:09.518	[DFU] Command object sent (CRC = 2FD27C1B)
V	17:50:09.518	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:09.519	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:09.551	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:09.552	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-8D-00-00-00-1B-7C-D2-2F
A	17:50:09.552	[DFU] Checksum received (Offset = 141, CRC = 2FD27C1B)
V	17:50:09.552	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:09.552	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:09.596	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:09.596	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:09.596	[DFU] Command object executed
V	17:50:09.596	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 02-0A-00
D	17:50:09.596	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x02-0A-00, WRITE_TYPE_DEFAULT)
I	17:50:09.626	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:09.626	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-02-01
A	17:50:09.629	[DFU] Packet Receipt Notif Req (Op Code = 2) sent (Value = 10)
V	17:50:09.629	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 06-02
D	17:50:09.629	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x06-02, WRITE_TYPE_DEFAULT)
I	17:50:09.746	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:09.747	[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	17:50:09.747	[DFU] Data object info received (Max size = 4096, Offset = 0, CRC = 00000000)
V	17:50:09.762	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:09.762	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:09.776	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:09.777	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:09.777	[DFU] Data object (1/25) created
A	17:50:09.777	[DFU] Uploading firmware...
V	17:50:09.777	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:10.792	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:10.792	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:10.812	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:10.813	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-10-00-00-A1-6E-58-C1
A	17:50:10.813	[DFU] Checksum received (Offset = 4096, CRC = C1586EA1)
V	17:50:10.813	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:10.813	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:10.842	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:10.843	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:10.843	[DFU] Data object executed
V	17:50:10.843	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:10.843	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:10.872	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
I	17:50:10.875	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:10.875	[DFU] Data object (2/25) created
A	17:50:10.875	[DFU] Uploading firmware...
V	17:50:10.875	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:12.048	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:12.048	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:12.073	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:12.073	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-20-00-00-54-23-F3-37
A	17:50:12.074	[DFU] Checksum received (Offset = 8192, CRC = 37F32354)
V	17:50:12.074	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:12.074	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:12.102	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:12.103	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:12.103	[DFU] Data object executed
V	17:50:12.103	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:12.103	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
W	17:50:12.117	Connection parameters update failed with status 8 (interval: 0.0ms, latency: 0, timeout: 0ms)
E	17:50:12.119	Error 8 (0x8): GATT INSUF AUTHORIZATION
D	17:50:12.123	[Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I	17:50:12.123	[Server] Device disconnected
D	17:50:12.127	[Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
E	17:50:12.127	Error 8 (0x8): GATT CONN TIMEOUT
I	17:50:12.127	Disconnected
D	17:50:12.148	[Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
I	17:50:12.150	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:12.152	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:12.152	[DFU] Data object (3/25) created
A	17:50:12.152	[DFU] Uploading firmware...
V	17:50:12.152	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:13.501	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:13.501	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:13.527	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:13.528	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-30-00-00-8C-E3-E9-39
A	17:50:13.528	[DFU] Checksum received (Offset = 12288, CRC = 39E9E38C)
V	17:50:13.528	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:13.528	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:13.557	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:13.557	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:13.558	[DFU] Data object executed
V	17:50:13.558	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:13.558	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:13.587	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:13.587	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:13.588	[DFU] Data object (4/25) created
A	17:50:13.588	[DFU] Uploading firmware...
V	17:50:13.588	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:14.720	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:14.720	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:14.740	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:14.741	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-40-00-00-7E-8E-6A-1A
A	17:50:14.741	[DFU] Checksum received (Offset = 16384, CRC = 1A6A8E7E)
V	17:50:14.741	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:14.741	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:14.770	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:14.770	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:14.770	[DFU] Data object executed
V	17:50:14.770	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:14.770	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:14.800	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:14.800	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:14.801	[DFU] Data object (5/25) created
A	17:50:14.801	[DFU] Uploading firmware...
V	17:50:14.802	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:16.024	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:16.024	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:16.048	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:16.048	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-50-00-00-FF-16-8A-CD
A	17:50:16.049	[DFU] Checksum received (Offset = 20480, CRC = CD8A16FF)
V	17:50:16.049	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:16.049	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:16.078	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:16.079	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:16.079	[DFU] Data object executed
V	17:50:16.079	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:16.079	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:16.110	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:16.110	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:16.110	[DFU] Data object (6/25) created
A	17:50:16.110	[DFU] Uploading firmware...
V	17:50:16.111	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:17.360	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:17.360	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:17.380	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:17.381	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-60-00-00-6B-EB-60-E4
A	17:50:17.381	[DFU] Checksum received (Offset = 24576, CRC = E460EB6B)
V	17:50:17.381	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:17.381	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:17.410	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:17.410	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:17.411	[DFU] Data object executed
V	17:50:17.411	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:17.411	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:17.440	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:17.443	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:17.443	[DFU] Data object (7/25) created
A	17:50:17.443	[DFU] Uploading firmware...
V	17:50:17.443	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:18.548	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:18.548	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:18.566	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-70-00-00-B7-78-16-20
I	17:50:18.566	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:18.566	[DFU] Checksum received (Offset = 28672, CRC = 201678B7)
V	17:50:18.566	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:18.566	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:18.595	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
I	17:50:18.596	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:18.596	[DFU] Data object executed
V	17:50:18.596	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:18.597	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:18.626	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:18.626	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:18.626	[DFU] Data object (8/25) created
A	17:50:18.626	[DFU] Uploading firmware...
V	17:50:18.626	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:19.883	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:19.883	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:19.903	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:19.903	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-80-00-00-B3-CF-60-8A
A	17:50:19.904	[DFU] Checksum received (Offset = 32768, CRC = 8A60CFB3)
V	17:50:19.904	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:19.904	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:19.931	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:19.931	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:19.931	[DFU] Data object executed
V	17:50:19.931	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:19.931	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:19.960	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:19.960	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:19.960	[DFU] Data object (9/25) created
A	17:50:19.960	[DFU] Uploading firmware...
V	17:50:19.960	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:21.305	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:21.305	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:21.327	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:21.328	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-90-00-00-B4-F6-61-DB
A	17:50:21.328	[DFU] Checksum received (Offset = 36864, CRC = DB61F6B4)
V	17:50:21.328	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:21.328	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:21.357	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
I	17:50:21.358	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:21.358	[DFU] Data object executed
V	17:50:21.358	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:21.359	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:21.387	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:21.387	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:21.388	[DFU] Data object (10/25) created
A	17:50:21.388	[DFU] Uploading firmware...
V	17:50:21.388	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:22.791	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:22.791	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:22.811	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-A0-00-00-1B-A0-0D-88
I	17:50:22.813	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:22.813	[DFU] Checksum received (Offset = 40960, CRC = 880DA01B)
V	17:50:22.813	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:22.813	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:22.842	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:22.843	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:22.843	[DFU] Data object executed
V	17:50:22.843	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:22.843	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:22.871	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
I	17:50:22.873	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:22.873	[DFU] Data object (11/25) created
A	17:50:22.873	[DFU] Uploading firmware...
V	17:50:22.873	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:24.377	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:24.377	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:24.401	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:24.403	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-B0-00-00-A5-61-1A-57
A	17:50:24.403	[DFU] Checksum received (Offset = 45056, CRC = 571A61A5)
V	17:50:24.403	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:24.403	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:24.430	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:24.431	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:24.431	[DFU] Data object executed
V	17:50:24.431	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:24.431	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:24.460	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:24.460	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:24.461	[DFU] Data object (12/25) created
A	17:50:24.461	[DFU] Uploading firmware...
V	17:50:24.461	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:25.516	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:25.516	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:25.542	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:25.543	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-C0-00-00-B7-11-98-63
A	17:50:25.543	[DFU] Checksum received (Offset = 49152, CRC = 639811B7)
V	17:50:25.543	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:25.543	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:25.572	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:25.572	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:25.572	[DFU] Data object executed
V	17:50:25.572	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:25.572	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:25.603	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:25.605	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:25.605	[DFU] Data object (13/25) created
A	17:50:25.605	[DFU] Uploading firmware...
V	17:50:25.605	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:27.082	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:27.082	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:27.118	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:27.120	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-D0-00-00-3F-25-61-12
A	17:50:27.121	[DFU] Checksum received (Offset = 53248, CRC = 1261253F)
V	17:50:27.121	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:27.122	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:27.150	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:27.151	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:27.151	[DFU] Data object executed
V	17:50:27.151	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:27.151	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:27.198	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:27.198	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:27.198	[DFU] Data object (14/25) created
A	17:50:27.198	[DFU] Uploading firmware...
V	17:50:27.198	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:28.503	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:28.503	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:28.528	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-E0-00-00-59-00-DA-29
I	17:50:28.528	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:28.528	[DFU] Checksum received (Offset = 57344, CRC = 29DA0059)
V	17:50:28.529	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:28.529	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:28.557	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:28.558	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:28.558	[DFU] Data object executed
V	17:50:28.558	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:28.558	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:28.589	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:28.590	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:28.590	[DFU] Data object (15/25) created
A	17:50:28.590	[DFU] Uploading firmware...
V	17:50:28.590	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:29.928	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:29.928	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:29.950	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:29.950	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-F0-00-00-99-C4-9B-9D
A	17:50:29.950	[DFU] Checksum received (Offset = 61440, CRC = 9D9BC499)
V	17:50:29.950	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:29.950	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:29.980	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:29.980	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:29.981	[DFU] Data object executed
V	17:50:29.981	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:29.981	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:30.012	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:30.012	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:30.012	[DFU] Data object (16/25) created
A	17:50:30.012	[DFU] Uploading firmware...
V	17:50:30.012	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:31.175	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:31.175	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:31.197	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:31.198	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-00-01-00-34-83-23-17
A	17:50:31.199	[DFU] Checksum received (Offset = 65536, CRC = 17238334)
V	17:50:31.199	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:31.199	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:31.228	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
I	17:50:31.228	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:31.228	[DFU] Data object executed
V	17:50:31.229	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:31.229	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:31.258	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:31.259	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:31.259	[DFU] Data object (17/25) created
A	17:50:31.259	[DFU] Uploading firmware...
V	17:50:31.259	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:32.721	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:32.721	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:32.758	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:32.759	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-10-01-00-8D-49-5F-CF
A	17:50:32.759	[DFU] Checksum received (Offset = 69632, CRC = CF5F498D)
V	17:50:32.760	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:32.760	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:32.787	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
I	17:50:32.788	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:32.788	[DFU] Data object executed
V	17:50:32.788	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:32.789	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:32.818	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:32.818	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:32.819	[DFU] Data object (18/25) created
A	17:50:32.819	[DFU] Uploading firmware...
V	17:50:32.819	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:34.029	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:34.029	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:34.063	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-20-01-00-29-C3-DA-37
I	17:50:34.064	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:34.064	[DFU] Checksum received (Offset = 73728, CRC = 37DAC329)
V	17:50:34.064	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:34.064	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:34.093	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:34.094	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:34.094	[DFU] Data object executed
V	17:50:34.094	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:34.094	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:34.123	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
I	17:50:34.123	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:34.123	[DFU] Data object (19/25) created
A	17:50:34.123	[DFU] Uploading firmware...
V	17:50:34.123	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:35.307	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:35.307	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:35.335	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:35.336	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-30-01-00-B1-89-3E-78
A	17:50:35.336	[DFU] Checksum received (Offset = 77824, CRC = 783E89B1)
V	17:50:35.336	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:35.336	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:35.366	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:35.367	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:35.367	[DFU] Data object executed
V	17:50:35.368	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:35.368	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:35.396	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:35.397	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:35.397	[DFU] Data object (20/25) created
A	17:50:35.397	[DFU] Uploading firmware...
V	17:50:35.397	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:36.632	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:36.632	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:36.657	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:36.657	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-40-01-00-E9-BB-B8-DA
A	17:50:36.657	[DFU] Checksum received (Offset = 81920, CRC = DAB8BBE9)
V	17:50:36.657	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:36.657	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:36.688	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
I	17:50:36.689	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:36.689	[DFU] Data object executed
V	17:50:36.689	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:36.689	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:36.719	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:36.719	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:36.719	[DFU] Data object (21/25) created
A	17:50:36.719	[DFU] Uploading firmware...
V	17:50:36.719	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:38.241	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:38.241	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:38.260	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:38.261	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-50-01-00-FE-2A-31-CA
A	17:50:38.261	[DFU] Checksum received (Offset = 86016, CRC = CA312AFE)
V	17:50:38.261	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:38.261	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:38.289	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:38.290	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:38.290	[DFU] Data object executed
V	17:50:38.290	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:38.290	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:38.321	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:38.321	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:38.321	[DFU] Data object (22/25) created
A	17:50:38.321	[DFU] Uploading firmware...
V	17:50:38.321	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:39.636	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:39.636	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:39.672	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:39.672	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-60-01-00-3F-D4-3C-49
A	17:50:39.673	[DFU] Checksum received (Offset = 90112, CRC = 493CD43F)
V	17:50:39.673	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:39.673	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:39.702	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
I	17:50:39.703	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
A	17:50:39.703	[DFU] Data object executed
V	17:50:39.703	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:39.703	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:39.731	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:39.731	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:39.731	[DFU] Data object (23/25) created
A	17:50:39.731	[DFU] Uploading firmware...
V	17:50:39.731	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:40.823	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:40.824	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:40.840	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:40.840	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-70-01-00-8D-26-24-E7
A	17:50:40.840	[DFU] Checksum received (Offset = 94208, CRC = E724268D)
V	17:50:40.840	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:40.840	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:40.870	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:40.870	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:40.870	[DFU] Data object executed
V	17:50:40.870	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-00-10-00-00
D	17:50:40.870	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-00-10-00-00, WRITE_TYPE_DEFAULT)
I	17:50:40.901	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:40.902	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:40.902	[DFU] Data object (24/25) created
A	17:50:40.902	[DFU] Uploading firmware...
V	17:50:40.902	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:42.337	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:42.337	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:42.372	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:42.373	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-00-80-01-00-A4-10-C6-16
A	17:50:42.373	[DFU] Checksum received (Offset = 98304, CRC = 16C610A4)
V	17:50:42.373	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:42.373	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:42.404	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:42.404	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:42.405	[DFU] Data object executed
V	17:50:42.405	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-02-18-00-00-00
D	17:50:42.405	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x01-02-18-00-00-00, WRITE_TYPE_DEFAULT)
I	17:50:42.434	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:42.436	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-01-01
A	17:50:42.436	[DFU] Data object (25/25) created
A	17:50:42.436	[DFU] Uploading firmware...
V	17:50:42.436	[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
V	17:50:42.470	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 03
D	17:50:42.470	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x03, WRITE_TYPE_DEFAULT)
I	17:50:42.585	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:42.586	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-03-01-18-80-01-00-60-A7-26-8B
A	17:50:42.586	[DFU] Checksum received (Offset = 98328, CRC = 8B26A760)
V	17:50:42.587	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
D	17:50:42.587	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50, value=0x04, WRITE_TYPE_DEFAULT)
I	17:50:42.615	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50
I	17:50:42.959	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
A	17:50:42.959	[DFU] Data object executed
A	17:50:42.960	[DFU] Upload completed in 33208 ms
I	17:50:43.137	[DFU] Disconnected by the remote device
D	17:50:43.138	[DFU] gatt.refresh() (hidden)
D	17:50:43.144	[DFU] gatt.disconnect()
D	17:50:43.155	[DFU] gatt.close()
D	17:50:43.203	gatt.close()
D	17:50:43.207	wait(200)
V	17:50:43.407	Connecting to D9:12:D8:0A:E4:EB...
D	17:50:43.408	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D	17:50:53.439	[Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I	17:50:53.439	[Server] Device disconnected
D	17:50:53.444	[Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
E	17:50:53.444	Error 133 (0x85): GATT ERROR
I	17:50:53.444	Disconnected

Parents
  • Hi Varsha, 
    My suggestion for testing this is: 
    - Start with a blank chip and only flash the bootloader and the softdevice. Don't flash the application just yet. If you have added any modification, please try testing with the original one. 

    - Try to do DFU update with just the bootloader to see if your application can boot up. 

    - Try to do a minimum modification to the application, for example change something in the log and try to do DFU update via buttonless or via button pressed. 

    - If it's still doesn't work, try to do a flash hex dump to see how you flash look like. If the new image on it or it's the old image (by using binary comparison tool). 

    - Try testing with very simple application, blinky for example. 


    Does your application do any flash modification ? Do you have user data retention ,for example for bonding  ? 
    I would suggest to use a GPIO to signal out if the device is in bootloader or it's in application. I suspect that the device crashed/deadloop in application , not a deadloop in the bootloader. 

Reply
  • Hi Varsha, 
    My suggestion for testing this is: 
    - Start with a blank chip and only flash the bootloader and the softdevice. Don't flash the application just yet. If you have added any modification, please try testing with the original one. 

    - Try to do DFU update with just the bootloader to see if your application can boot up. 

    - Try to do a minimum modification to the application, for example change something in the log and try to do DFU update via buttonless or via button pressed. 

    - If it's still doesn't work, try to do a flash hex dump to see how you flash look like. If the new image on it or it's the old image (by using binary comparison tool). 

    - Try testing with very simple application, blinky for example. 


    Does your application do any flash modification ? Do you have user data retention ,for example for bonding  ? 
    I would suggest to use a GPIO to signal out if the device is in bootloader or it's in application. I suspect that the device crashed/deadloop in application , not a deadloop in the bootloader. 

Children
  • Thanks for the suggestions!

    I'm using a bare BM832 module via the nRF52 DK Debug Out pin (so I don't have built-in LEDs/buttons for signaling) and I am not using bonding or user data retention.

     If I completely erase the chip and flash all the files natively via USB (softdeviceappbootloadersettings.hex), the application boots and advertises perfectly

    However, if I erase and put the board in Bootloader mode, upload the app.zip via phone, the phone says "Success." The bootloader resets, but then the module goes completely silent and fails to advertise.

    I dumped the MCU registers (nrfjprog --readregs) and saw a Software Reset (0x04) took place. 

    /**
     * Copyright (c) 2014 - 2021, Nordic Semiconductor ASA
     *
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without modification,
     * are permitted provided that the following conditions are met:
     *
     * 1. Redistributions of source code must retain the above copyright notice, this
     *    list of conditions and the following disclaimer.
     *
     * 2. Redistributions in binary form, except as embedded into a Nordic
     *    Semiconductor ASA integrated circuit in a product or a software update for
     *    such product, must reproduce the above copyright notice, this list of
     *    conditions and the following disclaimer in the documentation and/or other
     *    materials provided with the distribution.
     *
     * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
     *    contributors may be used to endorse or promote products derived from this
     *    software without specific prior written permission.
     *
     * 4. This software, with or without modification, must only be used with a
     *    Nordic Semiconductor ASA integrated circuit.
     *
     * 5. Any software provided in binary form under this license must not be reverse
     *    engineered, decompiled, modified and/or disassembled.
     *
     * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
     * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
     * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
     * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
     * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
     * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
     */
    /** @example examples/ble_peripheral/ble_app_buttonless_dfu
     *
     * @brief Secure DFU Buttonless Service Application main file.
     *
     * This file contains the source code for a sample application using the proprietary
     * Secure DFU Buttonless Service. This is a template application that can be modified
     * to your needs. To extend the functionality of this application, please find
     * locations where the comment "// YOUR_JOB:" is present and read the comments.
     */
    
    #include <stdbool.h>
    #include <stdint.h>
    #include <string.h>
    
    #include "nrf_delay.h"
    #include "nrf_dfu_ble_svci_bond_sharing.h"
    #include "nrf_svci_async_function.h"
    #include "nrf_svci_async_handler.h"
    
    #include "nordic_common.h"
    #include "nrf.h"
    #include "app_error.h"
    #include "ble.h"
    #include "ble_hci.h"
    #include "ble_srv_common.h"
    #include "ble_advdata.h"
    #include "ble_advertising.h"
    #include "ble_conn_params.h"
    #include "nrf_sdh.h"
    #include "nrf_sdh_soc.h"
    #include "nrf_sdh_ble.h"
    #include "app_timer.h"
    #include "peer_manager.h"
    #include "peer_manager_handler.h"
    #include "bsp_btn_ble.h"
    #include "ble_hci.h"
    #include "ble_advdata.h"
    #include "ble_advertising.h"
    #include "ble_conn_state.h"
    #include "ble_dfu.h"
    #include "nrf_ble_gatt.h"
    #include "nrf_ble_qwr.h"
    #include "fds.h"
    #include "nrf_pwr_mgmt.h"
    #include "nrf_drv_clock.h"
    #include "nrf_power.h"
    #include "nrf_log.h"
    #include "nrf_log_ctrl.h"
    #include "nrf_log_default_backends.h"
    #include "nrf_bootloader_info.h"
    
    #define DEVICE_NAME                     "Nordic"                         /**< Name of device. Will be included in the advertising data. */
    #define MANUFACTURER_NAME               "NordicSemiconductor"                       /**< Manufacturer. Will be passed to Device Information Service. */
    #define APP_ADV_INTERVAL                300                                         /**< The advertising interval (in units of 0.625 ms. This value corresponds to 187.5 ms). */
    #define APP_ADV_DURATION                18000                                       /**< The advertising duration (180 seconds) in units of 10 milliseconds. */
    
    #define APP_BLE_OBSERVER_PRIO           3                                           /**< Application's BLE observer priority. You shouldn't need to modify this value. */
    #define APP_BLE_CONN_CFG_TAG            1                                           /**< A tag identifying the SoftDevice BLE configuration. */
    
    #define MIN_CONN_INTERVAL               MSEC_TO_UNITS(100, UNIT_1_25_MS)            /**< Minimum acceptable connection interval (0.1 seconds). */
    #define MAX_CONN_INTERVAL               MSEC_TO_UNITS(200, UNIT_1_25_MS)            /**< Maximum acceptable connection interval (0.2 second). */
    #define SLAVE_LATENCY                   0                                           /**< Slave latency. */
    #define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS)             /**< Connection supervisory timeout (4 seconds). */
    
    #define FIRST_CONN_PARAMS_UPDATE_DELAY  APP_TIMER_TICKS(5000)                       /**< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (5 seconds). */
    #define NEXT_CONN_PARAMS_UPDATE_DELAY   APP_TIMER_TICKS(30000)                      /**< Time between each call to sd_ble_gap_conn_param_update after the first call (30 seconds). */
    #define MAX_CONN_PARAMS_UPDATE_COUNT    3                                           /**< Number of attempts before giving up the connection parameter negotiation. */
    
    #define SEC_PARAM_BOND                  1                                           /**< Perform bonding. */
    #define SEC_PARAM_MITM                  0                                           /**< Man In The Middle protection not required. */
    #define SEC_PARAM_LESC                  0                                           /**< LE Secure Connections not enabled. */
    #define SEC_PARAM_KEYPRESS              0                                           /**< Keypress notifications not enabled. */
    #define SEC_PARAM_IO_CAPABILITIES       BLE_GAP_IO_CAPS_NONE                        /**< No I/O capabilities. */
    #define SEC_PARAM_OOB                   0                                           /**< Out Of Band data not available. */
    #define SEC_PARAM_MIN_KEY_SIZE          7                                           /**< Minimum encryption key size. */
    #define SEC_PARAM_MAX_KEY_SIZE          16                                          /**< Maximum encryption key size. */
    
    #define DEAD_BEEF                       0xDEADBEEF                                  /**< Value used as error code on stack dump, can be used to identify stack location on stack unwind. */
    
    
    NRF_BLE_GATT_DEF(m_gatt);                                                           /**< GATT module instance. */
    NRF_BLE_QWR_DEF(m_qwr);                                                             /**< Context for the Queued Write module.*/
    BLE_ADVERTISING_DEF(m_advertising);                                                 /**< Advertising module instance. */
    
    static uint16_t m_conn_handle = BLE_CONN_HANDLE_INVALID;                            /**< Handle of the current connection. */
    static void advertising_start(bool erase_bonds);                                    /**< Forward declaration of advertising start function */
    
    // YOUR_JOB: Use UUIDs for service(s) used in your application.
    static ble_uuid_t m_adv_uuids[] = {{BLE_UUID_DEVICE_INFORMATION_SERVICE, BLE_UUID_TYPE_BLE}};
    
    // added for debug w.r.t FOTA failure
    volatile uint32_t m_test_ram_start = 0;
    
    /**@brief Handler for shutdown preparation.
     *
     * @details During shutdown procedures, this function will be called at a 1 second interval
     *          untill the function returns true. When the function returns true, it means that the
     *          app is ready to reset to DFU mode.
     *
     * @param[in]   event   Power manager event.
     *
     * @retval  True if shutdown is allowed by this power manager handler, otherwise false.
     */
    static bool app_shutdown_handler(nrf_pwr_mgmt_evt_t event)
    {
        switch (event)
        {
            case NRF_PWR_MGMT_EVT_PREPARE_DFU:
                NRF_LOG_INFO("Power management wants to reset to DFU mode.");
                // YOUR_JOB: Get ready to reset into DFU mode
                //
                // If you aren't finished with any ongoing tasks, return "false" to
                // signal to the system that reset is impossible at this stage.
                //
                // Here is an example using a variable to delay resetting the device.
                //
                // if (!m_ready_for_reset)
                // {
                //      return false;
                // }
                // else
                //{
                //
                //    // Device ready to enter
                //    uint32_t err_code;
                //    err_code = sd_softdevice_disable();
                //    APP_ERROR_CHECK(err_code);
                //    err_code = app_timer_stop_all();
                //    APP_ERROR_CHECK(err_code);
                //}
                break;
    
            default:
                // YOUR_JOB: Implement any of the other events available from the power management module:
                //      -NRF_PWR_MGMT_EVT_PREPARE_SYSOFF
                //      -NRF_PWR_MGMT_EVT_PREPARE_WAKEUP
                //      -NRF_PWR_MGMT_EVT_PREPARE_RESET
                return true;
        }
    
        NRF_LOG_INFO("Power management allowed to reset to DFU mode.");
        return true;
    }
    
    //lint -esym(528, m_app_shutdown_handler)
    /**@brief Register application shutdown handler with priority 0.
     */
    NRF_PWR_MGMT_HANDLER_REGISTER(app_shutdown_handler, 0);
    
    
    static void buttonless_dfu_sdh_state_observer(nrf_sdh_state_evt_t state, void * p_context)
    {
        if (state == NRF_SDH_EVT_STATE_DISABLED)
        {
            // Softdevice was disabled before going into reset. Inform bootloader to skip CRC on next boot.
            nrf_power_gpregret2_set(BOOTLOADER_DFU_SKIP_CRC);
    
            //Go to system off.
            nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF);
        }
    }
    
    /* nrf_sdh state observer. */
    NRF_SDH_STATE_OBSERVER(m_buttonless_dfu_state_obs, 0) =
    {
        .handler = buttonless_dfu_sdh_state_observer,
    };
    
    
    static void advertising_config_get(ble_adv_modes_config_t * p_config)
    {
        memset(p_config, 0, sizeof(ble_adv_modes_config_t));
    
        p_config->ble_adv_fast_enabled  = true;
        p_config->ble_adv_fast_interval = APP_ADV_INTERVAL;
        p_config->ble_adv_fast_timeout  = APP_ADV_DURATION;
    }
    
    
    static void disconnect(uint16_t conn_handle, void * p_context)
    {
        UNUSED_PARAMETER(p_context);
    
        ret_code_t err_code = sd_ble_gap_disconnect(conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
        if (err_code != NRF_SUCCESS)
        {
            NRF_LOG_WARNING("Failed to disconnect connection. Connection handle: %d Error: %d", conn_handle, err_code);
        }
        else
        {
            NRF_LOG_DEBUG("Disconnected connection handle %d", conn_handle);
        }
    }
    
    
    
    // YOUR_JOB: Update this code if you want to do anything given a DFU event (optional).
    /**@brief Function for handling dfu events from the Buttonless Secure DFU service
     *
     * @param[in]   event   Event from the Buttonless Secure DFU service.
     */
    static void ble_dfu_evt_handler(ble_dfu_buttonless_evt_type_t event)
    {
        switch (event)
        {
            case BLE_DFU_EVT_BOOTLOADER_ENTER_PREPARE:
            {
                NRF_LOG_INFO("Device is preparing to enter bootloader mode.");
    
                // Prevent device from advertising on disconnect.
                ble_adv_modes_config_t config;
                advertising_config_get(&config);
                config.ble_adv_on_disconnect_disabled = true;
                ble_advertising_modes_config_set(&m_advertising, &config);
    
                // Disconnect all other bonded devices that currently are connected.
                // This is required to receive a service changed indication
                // on bootup after a successful (or aborted) Device Firmware Update.
                uint32_t conn_count = ble_conn_state_for_each_connected(disconnect, NULL);
                NRF_LOG_INFO("Disconnected %d links.", conn_count);
                break;
            }
    
            case BLE_DFU_EVT_BOOTLOADER_ENTER:
                // YOUR_JOB: Write app-specific unwritten data to FLASH, control finalization of this
                //           by delaying reset by reporting false in app_shutdown_handler
                NRF_LOG_INFO("Device will enter bootloader mode.");
                break;
    
            case BLE_DFU_EVT_BOOTLOADER_ENTER_FAILED:
                NRF_LOG_ERROR("Request to enter bootloader mode failed asynchroneously.");
                // YOUR_JOB: Take corrective measures to resolve the issue
                //           like calling APP_ERROR_CHECK to reset the device.
                break;
    
            case BLE_DFU_EVT_RESPONSE_SEND_ERROR:
                NRF_LOG_ERROR("Request to send a response to client failed.");
                // YOUR_JOB: Take corrective measures to resolve the issue
                //           like calling APP_ERROR_CHECK to reset the device.
                APP_ERROR_CHECK(false);
                break;
    
            default:
                NRF_LOG_ERROR("Unknown event from ble_dfu_buttonless.");
                break;
        }
    }
    
    
    /**@brief Callback function for asserts in the SoftDevice.
     *
     * @details This function will be called in case of an assert in the SoftDevice.
     *
     * @warning This handler is an example only and does not fit a final product. You need to analyze
     *          how your product is supposed to react in case of Assert.
     * @warning On assert from the SoftDevice, the system can only recover on reset.
     *
     * @param[in] line_num   Line number of the failing ASSERT call.
     * @param[in] file_name  File name of the failing ASSERT call.
     */
    void assert_nrf_callback(uint16_t line_num, const uint8_t * p_file_name)
    {
        app_error_handler(DEAD_BEEF, line_num, p_file_name);
    }
    
    
    /**@brief Function for handling Peer Manager events.
     *
     * @param[in] p_evt  Peer Manager event.
     */
    static void pm_evt_handler(pm_evt_t const * p_evt)
    {
        pm_handler_on_pm_evt(p_evt);
        pm_handler_disconnect_on_sec_failure(p_evt);
        pm_handler_flash_clean(p_evt);
    }
    
    
    /**@brief Function for the Timer initialization.
     *
     * @details Initializes the timer module. This creates and starts application timers.
     */
    static void timers_init(void)
    {
    
        // Initialize timer module.
        uint32_t err_code = app_timer_init();
        APP_ERROR_CHECK(err_code);
    
        // Create timers.
    
        /* YOUR_JOB: Create any timers to be used by the application.
                     Below is an example of how to create a timer.
                     For every new timer needed, increase the value of the macro APP_TIMER_MAX_TIMERS by
                     one.
           uint32_t err_code;
           err_code = app_timer_create(&m_app_timer_id, APP_TIMER_MODE_REPEATED, timer_timeout_handler);
           APP_ERROR_CHECK(err_code); */
    }
    
    
    /**@brief Function for the GAP initialization.
     *
     * @details This function sets up all the necessary GAP (Generic Access Profile) parameters of the
     *          device including the device name, appearance, and the preferred connection parameters.
     */
    static void gap_params_init(void)
    {
        uint32_t                err_code;
        ble_gap_conn_params_t   gap_conn_params;
        ble_gap_conn_sec_mode_t sec_mode;
    
        BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);
    
        err_code = sd_ble_gap_device_name_set(&sec_mode,
                                              (const uint8_t *)DEVICE_NAME,
                                              strlen(DEVICE_NAME));
        APP_ERROR_CHECK(err_code);
    
        /* YOUR_JOB: Use an appearance value matching the application's use case.
           err_code = sd_ble_gap_appearance_set(BLE_APPEARANCE_);
           APP_ERROR_CHECK(err_code); */
    
        memset(&gap_conn_params, 0, sizeof(gap_conn_params));
    
        gap_conn_params.min_conn_interval = MIN_CONN_INTERVAL;
        gap_conn_params.max_conn_interval = MAX_CONN_INTERVAL;
        gap_conn_params.slave_latency     = SLAVE_LATENCY;
        gap_conn_params.conn_sup_timeout  = CONN_SUP_TIMEOUT;
    
        err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
        APP_ERROR_CHECK(err_code);
    }
    
    
    /**@brief Function for handling Queued Write Module errors.
     *
     * @details A pointer to this function will be passed to each service which may need to inform the
     *          application about an error.
     *
     * @param[in]   nrf_error   Error code containing information about what went wrong.
     */
    static void nrf_qwr_error_handler(uint32_t nrf_error)
    {
        APP_ERROR_HANDLER(nrf_error);
    }
    
    
    /**@brief Function for handling the YYY Service events.
     * YOUR_JOB implement a service handler function depending on the event the service you are using can generate
     *
     * @details This function will be called for all YY Service events which are passed to
     *          the application.
     *
     * @param[in]   p_yy_service   YY Service structure.
     * @param[in]   p_evt          Event received from the YY Service.
     *
     *
       static void on_yys_evt(ble_yy_service_t     * p_yy_service,
                              ble_yy_service_evt_t * p_evt)
       {
        switch (p_evt->evt_type)
        {
            case BLE_YY_NAME_EVT_WRITE:
                APPL_LOG("[APPL]: charact written with value %s. ", p_evt->params.char_xx.value.p_str);
                break;
    
            default:
                // No implementation needed.
                break;
        }
       }*/
    
    
    /**@brief Function for initializing services that will be used by the application.
     */
    static void services_init(void)
    {
        uint32_t                  err_code;
        nrf_ble_qwr_init_t        qwr_init  = {0};
        ble_dfu_buttonless_init_t dfus_init = {0};
    
        // Initialize Queued Write Module.
        qwr_init.error_handler = nrf_qwr_error_handler;
    
        err_code = nrf_ble_qwr_init(&m_qwr, &qwr_init);
        APP_ERROR_CHECK(err_code);
    
        dfus_init.evt_handler = ble_dfu_evt_handler;
    
        err_code = ble_dfu_buttonless_init(&dfus_init);
        APP_ERROR_CHECK(err_code);
    
        /* YOUR_JOB: Add code to initialize the services used by the application.
           uint32_t                           err_code;
           ble_xxs_init_t                     xxs_init;
           ble_yys_init_t                     yys_init;
    
           // Initialize XXX Service.
           memset(&xxs_init, 0, sizeof(xxs_init));
    
           xxs_init.evt_handler                = NULL;
           xxs_init.is_xxx_notify_supported    = true;
           xxs_init.ble_xx_initial_value.level = 100;
    
           err_code = ble_bas_init(&m_xxs, &xxs_init);
           APP_ERROR_CHECK(err_code);
    
           // Initialize YYY Service.
           memset(&yys_init, 0, sizeof(yys_init));
           yys_init.evt_handler                  = on_yys_evt;
           yys_init.ble_yy_initial_value.counter = 0;
    
           err_code = ble_yy_service_init(&yys_init, &yy_init);
           APP_ERROR_CHECK(err_code);
         */
    }
    
    
    /**@brief Function for handling the Connection Parameters Module.
     *
     * @details This function will be called for all events in the Connection Parameters Module which
     *          are passed to the application.
     *          @note All this function does is to disconnect. This could have been done by simply
     *                setting the disconnect_on_fail config parameter, but instead we use the event
     *                handler mechanism to demonstrate its use.
     *
     * @param[in] p_evt  Event received from the Connection Parameters Module.
     */
    static void on_conn_params_evt(ble_conn_params_evt_t * p_evt)
    {
        uint32_t err_code;
    
        if (p_evt->evt_type == BLE_CONN_PARAMS_EVT_FAILED)
        {
            err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_CONN_INTERVAL_UNACCEPTABLE);
            APP_ERROR_CHECK(err_code);
        }
    }
    
    
    /**@brief Function for handling a Connection Parameters error.
     *
     * @param[in] nrf_error  Error code containing information about what went wrong.
     */
    static void conn_params_error_handler(uint32_t nrf_error)
    {
        APP_ERROR_HANDLER(nrf_error);
    }
    
    
    /**@brief Function for initializing the Connection Parameters module.
     */
    static void conn_params_init(void)
    {
        uint32_t               err_code;
        ble_conn_params_init_t cp_init;
    
        memset(&cp_init, 0, sizeof(cp_init));
    
        cp_init.p_conn_params                  = NULL;
        cp_init.first_conn_params_update_delay = FIRST_CONN_PARAMS_UPDATE_DELAY;
        cp_init.next_conn_params_update_delay  = NEXT_CONN_PARAMS_UPDATE_DELAY;
        cp_init.max_conn_params_update_count   = MAX_CONN_PARAMS_UPDATE_COUNT;
        cp_init.start_on_notify_cccd_handle    = BLE_GATT_HANDLE_INVALID;
        cp_init.disconnect_on_fail             = false;
        cp_init.evt_handler                    = on_conn_params_evt;
        cp_init.error_handler                  = conn_params_error_handler;
    
        err_code = ble_conn_params_init(&cp_init);
        APP_ERROR_CHECK(err_code);
    }
    
    
    /**@brief Function for starting timers.
     */
    static void application_timers_start(void)
    {
        /* YOUR_JOB: Start your timers. below is an example of how to start a timer.
           uint32_t err_code;
           err_code = app_timer_start(m_app_timer_id, TIMER_INTERVAL, NULL);
           APP_ERROR_CHECK(err_code); */
    }
    
    
    /**@brief Function for putting the chip into sleep mode.
     *
     * @note This function will not return.
     */
    static void sleep_mode_enter(void)
    {
        // uint32_t err_code = bsp_indication_set(BSP_INDICATE_IDLE);
        // APP_ERROR_CHECK(err_code);
    
        // Prepare wakeup buttons.
        // err_code = bsp_btn_ble_sleep_mode_prepare();
        // APP_ERROR_CHECK(err_code);
    
        uint32_t err_code;
        //Disable SoftDevice. It is required to be able to write to GPREGRET2 register (SoftDevice API blocks it).
        //GPREGRET2 register holds the information about skipping CRC check on next boot.
        err_code = nrf_sdh_disable_request();
        APP_ERROR_CHECK(err_code);
    }
    
    
    /**@brief Function for handling advertising events.
     *
     * @details This function will be called for advertising events which are passed to the application.
     *
     * @param[in] ble_adv_evt  Advertising event.
     */
    static void on_adv_evt(ble_adv_evt_t ble_adv_evt)
    {
        // uint32_t err_code;
    
        switch (ble_adv_evt)
        {
            case BLE_ADV_EVT_FAST:
                // err_code = bsp_indication_set(BSP_INDICATE_ADVERTISING);
                // APP_ERROR_CHECK(err_code);
                break;
    
            case BLE_ADV_EVT_IDLE:
                sleep_mode_enter();
                break;
    
            default:
                break;
        }
    }
    
    
    /**@brief Function for handling BLE events.
     *
     * @param[in]   p_ble_evt   Bluetooth stack event.
     * @param[in]   p_context   Unused.
     */
    static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
    {
        uint32_t err_code = NRF_SUCCESS;
    
        switch (p_ble_evt->header.evt_id)
        {
            case BLE_GAP_EVT_DISCONNECTED:
                // LED indication will be changed when advertising starts.
                break;
    
            case BLE_GAP_EVT_CONNECTED:
                // err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
                // APP_ERROR_CHECK(err_code);
                m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
                err_code = nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle);
                APP_ERROR_CHECK(err_code);
                break;
    
            case BLE_GAP_EVT_PHY_UPDATE_REQUEST:
            {
                NRF_LOG_DEBUG("PHY update request.");
                ble_gap_phys_t const phys =
                {
                    .rx_phys = BLE_GAP_PHY_AUTO,
                    .tx_phys = BLE_GAP_PHY_AUTO,
                };
                err_code = sd_ble_gap_phy_update(p_ble_evt->evt.gap_evt.conn_handle, &phys);
                APP_ERROR_CHECK(err_code);
                break;
            }
    
            case BLE_GATTC_EVT_TIMEOUT:
                // Disconnect on GATT Client timeout event.
                NRF_LOG_DEBUG("GATT Client Timeout.");
                err_code = sd_ble_gap_disconnect(p_ble_evt->evt.gattc_evt.conn_handle,
                                                 BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
                APP_ERROR_CHECK(err_code);
                break;
    
            case BLE_GATTS_EVT_TIMEOUT:
                // Disconnect on GATT Server timeout event.
                NRF_LOG_DEBUG("GATT Server Timeout.");
                err_code = sd_ble_gap_disconnect(p_ble_evt->evt.gatts_evt.conn_handle,
                                                 BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
                APP_ERROR_CHECK(err_code);
                break;
    
            default:
                // No implementation needed.
                break;
        }
    }
    
    
    /**@brief Function for initializing the BLE stack.
     *
     * @details Initializes the SoftDevice and the BLE event interrupt.
     */
    static void ble_stack_init(void)
    {
        ret_code_t err_code;
    
        err_code = nrf_sdh_enable_request();
        APP_ERROR_CHECK(err_code);
    
        // Configure the BLE stack using the default settings.
        // Fetch the start address of the application RAM.
        uint32_t ram_start = 0;
        err_code = nrf_sdh_ble_default_cfg_set(APP_BLE_CONN_CFG_TAG, &ram_start);
        APP_ERROR_CHECK(err_code);
    
        // Enable BLE stack.
        err_code = nrf_sdh_ble_enable(&ram_start);
        if (err_code == NRF_ERROR_NO_MEM)
        // added to get the ram start 
        {
          m_test_ram_start = ram_start;
          NRF_LOG_ERROR("REQUIRED RAM START IS : 0x%08X !!", m_test_ram_start);
          NRF_LOG_FLUSH();
          while(1)
          {
            //Trapped     
          }
    
        }
        APP_ERROR_CHECK(err_code);
    
        NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
    }
    
    
    /**@brief Function for the Peer Manager initialization.
     */
    static void peer_manager_init()
    {
        ble_gap_sec_params_t sec_param;
        ret_code_t           err_code;
    
        err_code = pm_init();
        APP_ERROR_CHECK(err_code);
    
        memset(&sec_param, 0, sizeof(ble_gap_sec_params_t));
    
        // Security parameters to be used for all security procedures.
        sec_param.bond           = SEC_PARAM_BOND;
        sec_param.mitm           = SEC_PARAM_MITM;
        sec_param.lesc           = SEC_PARAM_LESC;
        sec_param.keypress       = SEC_PARAM_KEYPRESS;
        sec_param.io_caps        = SEC_PARAM_IO_CAPABILITIES;
        sec_param.oob            = SEC_PARAM_OOB;
        sec_param.min_key_size   = SEC_PARAM_MIN_KEY_SIZE;
        sec_param.max_key_size   = SEC_PARAM_MAX_KEY_SIZE;
        sec_param.kdist_own.enc  = 1;
        sec_param.kdist_own.id   = 1;
        sec_param.kdist_peer.enc = 1;
        sec_param.kdist_peer.id  = 1;
    
        err_code = pm_sec_params_set(&sec_param);
        APP_ERROR_CHECK(err_code);
    
        err_code = pm_register(pm_evt_handler);
        APP_ERROR_CHECK(err_code);
    }
    
    
    /** @brief Clear bonding information from persistent storage.
     */
    static void delete_bonds(void)
    {
        ret_code_t err_code;
    
        NRF_LOG_INFO("Erase bonds!");
    
        err_code = pm_peers_delete();
        APP_ERROR_CHECK(err_code);
    }
    
    
    /**@brief Function for handling events from the BSP module.
     *
     * @param[in]   event   Event generated when button is pressed.
     */
    static void bsp_event_handler(bsp_event_t event)
    {
        uint32_t err_code;
    
        switch (event)
        {
            case BSP_EVENT_SLEEP:
                sleep_mode_enter();
                break; // BSP_EVENT_SLEEP
    
            case BSP_EVENT_DISCONNECT:
                err_code = sd_ble_gap_disconnect(m_conn_handle,
                                                 BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
                if (err_code != NRF_ERROR_INVALID_STATE)
                {
                    APP_ERROR_CHECK(err_code);
                }
                break; // BSP_EVENT_DISCONNECT
    
            case BSP_EVENT_WHITELIST_OFF:
                if (m_conn_handle == BLE_CONN_HANDLE_INVALID)
                {
                    err_code = ble_advertising_restart_without_whitelist(&m_advertising);
                    if (err_code != NRF_ERROR_INVALID_STATE)
                    {
                        APP_ERROR_CHECK(err_code);
                    }
                }
                break; // BSP_EVENT_KEY_0
    
            default:
                break;
        }
    }
    
    
    /**@brief Function for initializing the Advertising functionality.
     */
    static void advertising_init(void)
    {
        uint32_t               err_code;
        ble_advertising_init_t init;
    
        memset(&init, 0, sizeof(init));
    
        init.advdata.name_type               = BLE_ADVDATA_FULL_NAME;
        init.advdata.include_appearance      = true;
        init.advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
        init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
        init.advdata.uuids_complete.p_uuids  = m_adv_uuids;
    
        advertising_config_get(&init.config);
    
        init.evt_handler = on_adv_evt;
    
        err_code = ble_advertising_init(&m_advertising, &init);
        APP_ERROR_CHECK(err_code);
    
        ble_advertising_conn_cfg_tag_set(&m_advertising, APP_BLE_CONN_CFG_TAG);
    }
    
    
    /**@brief Function for initializing buttons and leds.
     *
     * @param[out] p_erase_bonds  Will be true if the clear bonding button was pressed to wake the application up.
     */
    static void buttons_leds_init(bool * p_erase_bonds)
    {
        uint32_t err_code;
        bsp_event_t startup_event;
    
        err_code = bsp_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS, bsp_event_handler);
        APP_ERROR_CHECK(err_code);
    
        err_code = bsp_btn_ble_init(NULL, &startup_event);
        APP_ERROR_CHECK(err_code);
    
        *p_erase_bonds = (startup_event == BSP_EVENT_CLEAR_BONDING_DATA);
    }
    
    
    /**@brief Function for the Power manager.
     */
    static void log_init(void)
    {
        uint32_t err_code = NRF_LOG_INIT(NULL);
        APP_ERROR_CHECK(err_code);
    
        NRF_LOG_DEFAULT_BACKENDS_INIT();
    }
    
    
    /**@brief   Function for initializing the GATT module.
     * @details The GATT module handles ATT_MTU and Data Length update procedures automatically.
     */
    static void gatt_init(void)
    {
        ret_code_t err_code = nrf_ble_gatt_init(&m_gatt, NULL);
        APP_ERROR_CHECK(err_code);
    }
    
    
    /**@brief Function for starting advertising.
     */
    static void advertising_start(bool erase_bonds)
    {
        if (erase_bonds == true)
        {
            delete_bonds();
            // Advertising is started by PM_EVT_PEERS_DELETE_SUCCEEDED event.
        }
        else
        {
            uint32_t err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
            APP_ERROR_CHECK(err_code);
    
            NRF_LOG_DEBUG("advertising is started");
        }
    }
    
    static void power_management_init(void)
    {
        uint32_t err_code = nrf_pwr_mgmt_init();
        APP_ERROR_CHECK(err_code);
    }
    
    
    /**@brief Function for handling the idle state (main loop).
     *
     * @details If there is no pending log operation, then sleep until next the next event occurs.
     */
    static void idle_state_handle(void)
    {
        if (NRF_LOG_PROCESS() == false)
        {
            nrf_pwr_mgmt_run();
        }
    }
    
    
    /**@brief Function for application main entry.
     */
    int main(void)
    {
        // --- START ROBUST HANDOFF ---
        // Clear the DFU request flag to prevent the bootloader from pulling us back.
        if (nrf_power_gpregret_get() != 0x00)
        {
            nrf_power_gpregret_set(0x00);
        }
    
        // Clear reset reasons to ensure a fresh state
        uint32_t rr = NRF_POWER->RESETREAS;
        NRF_POWER->RESETREAS = 0xFFFFFFFF;
    
        // BREADCRUMB: If you read 0xEE in GPREGRET, the app successfully reached main()
        nrf_power_gpregret_set(0xEE); 
        // --- END ROBUST HANDOFF ---
    
        bool       erase_bonds;
        ret_code_t err_code;
    
        log_init();
    
        NRF_LOG_INFO("--- APP STARTING (RR:0x%x) ---", rr);
        NRF_LOG_FLUSH();
    
        // Give hardware time to settle after the Bootloader-to-SoftDevice jump
        nrf_delay_ms(100);
    
        // Initialize the async SVCI interface to bootloader before any interrupts are enabled.
        err_code = ble_dfu_buttonless_async_svci_init();
        if (err_code != NRF_SUCCESS)
        {
            NRF_LOG_WARNING("SVCI Init failed (expected if no Bootloader is flashed): 0x%x", err_code);
        }
    
        timers_init();
        power_management_init();
        // buttons_leds_init(&erase_bonds); // COMMENTED OUT for custom board testing
        erase_bonds = false;               
        ble_stack_init();
        peer_manager_init();
        gap_params_init();
        gatt_init();
        advertising_init();
        services_init();
        conn_params_init();
    
        NRF_LOG_INFO("Buttonless DFU Application started.");
    
        // Start execution.
        application_timers_start();
        advertising_start(erase_bonds);
    
        // Enter main loop.
        for (;;)
        {
            idle_state_handle();
        }
    }
    
    

Related