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
  • Exact the same result with a Galaxy Tab A, model SM-T550 with Android 6.0.1, DFU app version: 2.9.0 (build 24123065)

  • Hi again.

    The problem has also been encounteed by our customers who can no longer update our products.

    - The "legacy" DFU bootloader has been the same and working in our product for several years, the DFu bootloader can't be the   problem.

    - The same "Update file" that has been working for years can't no longer be sent to the "product". The "Update file" can't be the problem.

    Devices with secure DFU bootloaders can be updated without problem.

    Devices with legacy DFU bootloaders can't be updated.

    I have found on Internet 2 possible reasons to this problem and they are:

    1. MTU Size Mismatch: DFU libraries, such as the Nordic DFU Library, often default to setting the Maximum Transmission Unit (MTU) size to 247 bytes. However, legacy bootloaders typically support a smaller MTU size of 23 bytes. This discrepancy can lead to upload failures, where the DFU process stalls or does not complete successfully. A user reported that reducing the MTU size to 23 bytes resolved the issue in their case. GitHub
    1. Secure DFU Service Blocking: Some platforms, like Google's Web Bluetooth API, have blacklisted the UUID associated with Nordic's legacy DFU service due to its lack of security features. This blacklist prevents web applications from utilizing this DFU method, leading developers to seek alternative solutions, such as implementing the Secure DFU Service or using different bootloader configurations. RAKwireless Forum

    Can you please help me find a solution to our problem?

     

  • Do you have any suggestion about how to solve the problem?

  • 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% 

Reply Children
No Data
Related