DFU OTA suddenly fails on "non secure" bootloaders but works on "secure" bootloaders.

Suddenly DFU OTA fails most of the time while trying to update units with code & "not secure" bootloader that has been working for years. The FW upload stops at 2% to 8% but if i restart my phone sometimes it reaches 15% and on happy days I can update the unit after rebooting the phone.

With the same DFU app DFU update works well with another unit with "secure" bootloader.

I am NOT trying to update a unit with "not secure" bootloader with code made for units with "secure bootloader" and vice versa.

What can suddenly be the problem?

Phone: Samsung Galaxy S21 Ultra 5G

Android version: 14

DFU app version: 2.9.0 (build 24123065)

Parents Reply Children
  • I still don't have enough data to understand the issue. Could you share the logs like I described below?

    Are you using nRF DFU app, nRF Connect or your own app, which is using the DFU library?

  • I am using nRF DFU app Version 2.9.0, downloaded from Google play

    One example log file comes below. DFU always ends with Error 8 GATT CONN TIMEOUT.

    nRF Connect, 2025-04-02
    Dfu_V2.0 (F5:9A:55:96:A5:6B)
    D 09:35:35.546 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    V 09:35:35.849 Connecting to F5:9A:55:96:A5:6B...
    D 09:35:35.850 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D 09:35:35.869 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I 09:35:35.869 Connected to F5:9A:55:96:A5:6B
    V 09:35:35.873 Discovering services...
    D 09:35:35.873 gatt.discoverServices()
    I 09:35:35.968 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 09:35:36.218 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    D 09:35:36.341 [Callback] Services discovered with status: 0
    I 09:35:36.341 Services discovered
    V 09:35:36.350 Generic Access (0x1800)
    - Device Name [R W] (0x2A00)
    - Appearance [R] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    Generic Attribute (0x1801)
    - Service Changed [I] (0x2A05)
       Client Characteristic Configuration (0x2902)
    Device Firmware Update Service (00001530-1212-efde-1523-785feabcd123)
    - DFU Packet [WNR] (00001532-1212-efde-1523-785feabcd123)
    - DFU Control Point [N W] (00001531-1212-efde-1523-785feabcd123)
       Client Characteristic Configuration (0x2902)
    - DFU Version [R] (00001534-1212-efde-1523-785feabcd123)
    D 09:35:36.351 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
    I 09:35:36.420 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 09:35:36.960 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 09:35:38.448 Connection parameters updated (interval: 15.0ms, latency: 0, timeout: 5000ms)
    D 09:35:46.404 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
    E 09:35:46.404 Error 8 (0x8): GATT CONN TIMEOUT
    I 09:35:46.404 Disconnected
    D 09:35:46.439 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED

  • In this log you're using nRF Connect and not starting the DFU before the device disconnects:

    I 09:35:38.448 Connection parameters updated (interval: 15.0ms, latency: 0, timeout: 5000ms)
    D 09:35:46.404 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
    E 09:35:46.404 Error 8 (0x8): GATT CONN TIMEOUT

    There's 8 seconds of inactivity here. It may be that the device is just set to disconnect after some time to save power. Please start DFU before the device disconnects and share logs.

  • That is very strange because every try the app says that uploaded progress is something between 8%and approx. 50% 

  • In this log file, The app says that 11% of the FW was uploaded.

    nRF Connect, 2025-04-02
    Dfu_V2.0 (F5:9A:55:96:A5:6B)
    D 09:55:04.233 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    V 09:55:04.529 Connecting to F5:9A:55:96:A5:6B...
    D 09:55:04.530 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D 09:55:04.548 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I 09:55:04.548 Connected to F5:9A:55:96:A5:6B
    V 09:55:04.550 Discovering services...
    D 09:55:04.550 gatt.discoverServices()
    I 09:55:04.660 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 09:55:04.908 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    D 09:55:05.052 [Callback] Services discovered with status: 0
    I 09:55:05.052 Services discovered
    V 09:55:05.059 Generic Access (0x1800)
    - Device Name [R W] (0x2A00)
    - Appearance [R] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    Generic Attribute (0x1801)
    - Service Changed [I] (0x2A05)
       Client Characteristic Configuration (0x2902)
    Device Firmware Update Service (00001530-1212-efde-1523-785feabcd123)
    - DFU Packet [WNR] (00001532-1212-efde-1523-785feabcd123)
    - DFU Control Point [N W] (00001531-1212-efde-1523-785feabcd123)
       Client Characteristic Configuration (0x2902)
    - DFU Version [R] (00001534-1212-efde-1523-785feabcd123)
    D 09:55:05.059 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
    I 09:55:05.136 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 09:55:05.624 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 09:55:07.110 Connection parameters updated (interval: 15.0ms, latency: 0, timeout: 5000ms)
    D 09:55:13.093 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
    E 09:55:13.093 Error 8 (0x8): GATT CONN TIMEOUT
    I 09:55:13.093 Disconnected
    D 09:55:13.128 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED

Related