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 have installed the nRF Logger.

    Every time I want to "open it" through nRF Toolbox  i first come to "Google Play" from where I can open it.

    The same happens if i press the "Magnifying glass" as you suggested above. And when I have started the nRF Logger it only says "No log sessions found".

    For some reason I always get directed to "Google play" to start the nRF log app. 

  • Then you can try to view the log from the nRF connect app instead. It would also be good if you could try the nRF DFU app with long ATT MTU disabled as suggested by  

  • If you by "long ATT MTU disabled" mean unchecking the box "Request high MTU" i have already tried that but it makes no difference.

    After installing nRF connect i suddenly got a log from when I try to DFU update and the update percentage reaches 8%

    It looks like this:

    nRF Connect, 2025-03-31
    Dfu_V2.0 (F5:9A:55:96:A5:6B)
    D 12:52:23.101 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    V 12:52:23.220 Connecting to F5:9A:55:96:A5:6B...
    D 12:52:23.220 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D 12:52:23.236 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I 12:52:23.236 Connected to F5:9A:55:96:A5:6B
    V 12:52:23.254 Discovering services...
    D 12:52:23.254 gatt.discoverServices()
    I 12:52:23.547 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 12:52:23.797 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    D 12:52:23.938 [Callback] Services discovered with status: 0
    I 12:52:23.938 Services discovered
    V 12:52:23.945 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 12:52:23.945 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
    I 12:52:24.000 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 12:52:24.540 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 12:52:26.031 Connection parameters updated (interval: 15.0ms, latency: 0, timeout: 5000ms)
    D 12:52:31.750 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
    E 12:52:31.751 Error 8 (0x8): GATT CONN TIMEOUT
    I 12:52:31.751 Disconnected
    D 12:52:31.770 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED

  • Yes that is what I meant. Regarding the log, it shows a connection timeout, which could indicate that the app is not sending the disconnect PDU as it is supposed to. This results in the phone having to wait for the supervision timer to expire before it can consider the link lost and attempt to reconnect to the device in bootloader DFU mode. 

    Have you tried setting the scan timeout to the max. in the nRF DFU app?

  • I have tried setting the scan timeout = max. Result is: Upload halts after 15 - 50% 

    nRF Connect, 2025-03-31
    Dfu_V2.0 (F5:9A:55:96:A5:6B)
    D 15:27:48.141 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    V 15:27:48.476 Connecting to F5:9A:55:96:A5:6B...
    D 15:27:48.477 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D 15:27:48.494 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I 15:27:48.494 Connected to F5:9A:55:96:A5:6B
    V 15:27:48.496 Discovering services...
    D 15:27:48.496 gatt.discoverServices()
    I 15:27:48.627 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 15:27:48.901 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    D 15:27:49.004 [Callback] Services discovered with status: 0
    I 15:27:49.005 Services discovered
    V 15:27:49.018 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 15:27:49.018 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
    I 15:27:49.088 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 15:27:49.663 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 15:27:51.087 Connection parameters updated (interval: 15.0ms, latency: 0, timeout: 5000ms)
    D 15:27:58.337 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
    E 15:27:58.338 Error 8 (0x8): GATT CONN TIMEOUT
    I 15:27:58.338 Disconnected
    D 15:27:58.364 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED

    I have tried setting the scan timeout = min. Result is: Same, upload halts after 15 - 50% 

    nRF Connect, 2025-03-31
    Dfu_V2.0 (F5:9A:55:96:A5:6B)
    D 15:27:48.141 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    V 15:27:48.476 Connecting to F5:9A:55:96:A5:6B...
    D 15:27:48.477 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D 15:27:48.494 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I 15:27:48.494 Connected to F5:9A:55:96:A5:6B
    V 15:27:48.496 Discovering services...
    D 15:27:48.496 gatt.discoverServices()
    I 15:27:48.627 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 15:27:48.901 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    D 15:27:49.004 [Callback] Services discovered with status: 0
    I 15:27:49.005 Services discovered
    V 15:27:49.018 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 15:27:49.018 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
    I 15:27:49.088 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 15:27:49.663 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 15:27:51.087 Connection parameters updated (interval: 15.0ms, latency: 0, timeout: 5000ms)
    D 15:27:58.337 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
    E 15:27:58.338 Error 8 (0x8): GATT CONN TIMEOUT
    I 15:27:58.338 Disconnected
    D 15:27:58.364 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    D 15:31:01.707 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    D 15:31:01.707 gatt.close()
    D 15:31:01.718 wait(200)
    V 15:31:01.919 Connecting to F5:9A:55:96:A5:6B...
    D 15:31:01.919 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D 15:31:01.926 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I 15:31:01.926 Connected to F5:9A:55:96:A5:6B
    V 15:31:01.931 Discovering services...
    D 15:31:01.931 gatt.discoverServices()
    I 15:31:02.065 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 15:31:02.316 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    D 15:31:02.451 [Callback] Services discovered with status: 0
    I 15:31:02.451 Services discovered
    V 15:31:02.459 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 15:31:02.459 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
    I 15:31:02.542 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 15:31:03.054 Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    I 15:31:04.507 Connection parameters updated (interval: 15.0ms, latency: 0, timeout: 5000ms)
    D 15:31:13.158 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
    E 15:31:13.158 Error 8 (0x8): GATT CONN TIMEOUT
    I 15:31:13.158 Disconnected
    D 15:31:13.184 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    D 15:31:26.630 gatt.close()
    D 15:31:26.635 wait(200)

Related