Update Softdevice via DFU (2025 update)

I'm wondering if this feature is still supported. 
I'd like to update some devices from SD 5 to 7.1
I saw an old post and wanted fresh info. 

 Update Softdevice via DFU 

If this is the same, I can

  • make a new bootloader with SD 7.1 
  • create a DFU package for app + bootloader + SD 7.1

and that's still the solution ? 

Thanks!

  • Thanks Hieu. 
    I don't have space to enable RTT logging in these bootloaders so I've been running blind there. 
    It looks like you're also failing the valid app check, that's definitely different. 

    Here is the entire nrf connect DFU attempt log 

    [10:15:07.1530] Normal: Scanner On.
    [10:15:07.1620] Normal: Device Scanned.
    [10:15:10.3570] Normal: Connected.
    [10:15:10.7420] Normal: Discovered Secure DFU Service and Device Information Services.
    [10:15:10.8600] Normal: Discovered DFU Packet and DFU Control Point Characteristics for Service Secure DFU Service.
    [10:15:11.0720] Normal: Discovered Manufacturer Name String, Model Number String, Serial Number String, Hardware Revision String, Firmware Revision String, and Software Revision String Characteristics for Service Device Information.
    [10:15:11.0720] Normal: DFU Packet has no Descriptors.
    [10:15:11.1280] Normal: Discovered Client Characteristic Configuration Descriptors for Characteristic DFU Control Point
    [10:15:11.1290] Normal: Manufacturer Name String has no Descriptors.
    [10:15:11.1290] Normal: Model Number String has no Descriptors.
    [10:15:11.1290] Normal: Serial Number String has no Descriptors.
    [10:15:11.1290] Normal: Hardware Revision String has no Descriptors.
    [10:15:11.1300] Normal: Firmware Revision String has no Descriptors.
    [10:15:11.1910] Normal: Software Revision String has no Descriptors.
    [10:15:11.6500] Normal: Appearance changed from Generic to nRF5DFU.
    [10:15:23.7330] Normal: Found valid Firmware in file:///var/mobile/Containers/Data/Application/8E89727C-516F-413B-8C85-EADC3A302582/Library/Caches/dfu_hc_chc_1.04.25_bl_v1.01.06_273A49845-A04D-42FA-B302-0435C5E27338-641-000000BFF9EDB4EB.zip for Device DFU nRF5 SDK.
    [10:15:26.1720] Normal: Connecting to XmtF...
    [10:15:26.1720] Normal: Connected to XmtF
    [10:15:26.1720] Normal: Discovering services...
    [10:15:26.1720] Normal: Services discovered
    [10:15:26.1720] Normal: Starting Secure DFU...
    [10:15:26.1720] Normal: Connected to XmtF
    [10:15:26.1720] Normal: Services discovered
    [10:15:26.1720] Normal: Secure DFU Service found
    [10:15:26.1720] Normal: Discovering characteristics in DFU Service...
    [10:15:26.1720] Normal: DFU characteristics discovered
    [10:15:26.1720] Normal: Enabling notifications for 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.2200] Normal: Notifications enabled for 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:15:26.2200] Normal: Secure DFU Control Point notifications enabled
    [10:15:26.2200] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.3090] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:15:26.3100] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600601000100000000000000000000
    [10:15:26.3100] Normal: Command object selected (Max size = 256, Offset = 0, CRC = 00000000) received
    [10:15:26.3100] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.3700] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:15:26.3700] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600101
    [10:15:26.3700] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.4310] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:15:26.4310] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600201
    [10:15:26.4310] Normal: Packet Receipt Notif disabled
    [10:15:26.4310] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.4310] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.4310] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.4320] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.4320] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.4320] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.4320] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.4320] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.4320] Normal: Command object sent (CRC = 8B8734E7)
    [10:15:26.4320] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.5200] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:15:26.5200] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 60030198000000e734878b
    [10:15:26.5200] Normal: Checksum (Offset = 152, CRC = 8B8734E7) received
    [10:15:26.5210] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.5800] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:15:26.7000] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600405
    [10:15:26.7000] Error: Error 5: Invalid object
    [10:15:26.7000] Warning: Invalid system components. Trying to send application
    [10:15:26.7000] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7890] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:15:26.7890] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600101
    [10:15:26.7890] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7890] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7900] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7900] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7900] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7900] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7900] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7910] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7910] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7910] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7910] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.7910] Normal: Command object sent (CRC = 12ADAAFD)
    [10:15:26.7910] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.9110] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:15:26.9110] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600301d0000000fdaaad12
    [10:15:26.9110] Normal: Checksum (Offset = 208, CRC = 12ADAAFD) received
    [10:15:26.9110] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:15:26.9710] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:15:26.9710] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 60040b07
    [10:15:26.9710] Error: Error 7: SD version check failed
    [10:15:26.9710] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:15:27.0310] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:15:27.0310] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600c03
    [10:15:27.0310] Error: Error 3: Invalid parameter
    [10:15:27.0310] Normal: Disconnecting...
    [10:15:27.0310] Normal: Disconnected
    [10:15:27.0330] Error: DFU Failed with Error: SD version check failed
    [10:15:47.7650] Normal: Disconnected.

  • Hi ms360,

    It looks like my previous log was from an accident. I couldn't reproduce it anymore.

    Turns out that the nRF52840 cannot have bootloader updated with its S140 v5.0.0-2.alpha, so I had to recreate everything on a nRF52832 environment.

    With that, I now reproduced the issue and has started to see some clues. It looks like that even though the package would include 2 sd-req entries, at the checking step, the count is only 1, so it only checks the first entry, which is 0x101, and would fail.

    I am trying to figure out if that is an issue from the mobile app DFU library or from the command parsing of the bootloader.

    It doesn't seem possible to switch the order of the sd-req entries in the package with nrfutil either. It also doesn't make sense to me why the BL+SD image part would need to include the application's SD requirement...

    Nonetheless, this presents us with a workaround: you could DFU BL+SD first, and then APP later. Is this acceptable?

    Another workaround would be to manually decode the .dat file in the package, edit the sd_req field for the BL+SD image, then re-encode it and repackage it.

    Beyond that, I am also having a signature failure issue for some unknown reason... I didn't have that with the nRF52840 project with the exact same source code and key pair, so that is another mystery to figure out. But the focus now is to figure out this SD requirement issue.

    To be sure you will not have this same signature issue, could you please try to DFU only BL+SD first, regardless of whether or not you could do that for your final project?

  • Thanks Hieu! Seems like we have a path forward. 

    Nonetheless, this presents us with a workaround: you could DFU BL+SD first, and then APP later. Is this acceptable?

    I tried this a few weeks ago and got a similar failure. I will follow up with logs when I get a chance. It would be acceptable if this could work. 

    Another workaround would be to manually decode the .dat file in the package, edit the sd_req field for the BL+SD image, then re-encode it and repackage it.

    This would also be acceptable as this would hopefully be a one time thing. Is it just a hex edit? do I need to change a checksum as well? Is it a manual re-encoding, then just a zip?  

  • Here is the log from my BL+SD DFU test

    [10:40:00.4790] Normal: Scanner On.
    [10:40:00.4890] Normal: Device Scanned.
    [10:40:03.7220] Normal: Connected.
    [10:40:04.1090] Normal: Discovered Secure DFU Service and Device Information Services.
    [10:40:04.2300] Normal: Discovered DFU Packet and DFU Control Point Characteristics for Service Secure DFU Service.
    [10:40:04.4130] Normal: Discovered Manufacturer Name String, Model Number String, Serial Number String, Hardware Revision String, Firmware Revision String, and Software Revision String Characteristics for Service Device Information.
    [10:40:04.4130] Normal: DFU Packet has no Descriptors.
    [10:40:04.4680] Normal: Discovered Client Characteristic Configuration Descriptors for Characteristic DFU Control Point
    [10:40:04.4700] Normal: Manufacturer Name String has no Descriptors.
    [10:40:04.4710] Normal: Model Number String has no Descriptors.
    [10:40:04.4720] Normal: Serial Number String has no Descriptors.
    [10:40:04.4730] Normal: Hardware Revision String has no Descriptors.
    [10:40:04.4740] Normal: Firmware Revision String has no Descriptors.
    [10:40:04.5260] Normal: Software Revision String has no Descriptors.
    [10:40:05.0660] Normal: Appearance changed from Generic to nRF5DFU.
    [10:40:23.2020] Normal: Found valid Firmware in file:///var/mobile/Containers/Data/Application/8E89727C-516F-413B-8C85-EADC3A302582/Library/Caches/LF_chc_bl_dfu_v1.01.06%20212EF5263-E990-4D5C-A3A7-A296D6CE1519-641-000003719B25824D.zip for Device DFU nRF5 SDK.
    [10:40:24.3470] Normal: Connecting to XmtF...
    [10:40:24.3480] Normal: Connected to XmtF
    [10:40:24.3480] Normal: Discovering services...
    [10:40:24.3480] Normal: Services discovered
    [10:40:24.3480] Normal: Starting Secure DFU...
    [10:40:24.3480] Normal: Connected to XmtF
    [10:40:24.3480] Normal: Services discovered
    [10:40:24.3480] Normal: Secure DFU Service found
    [10:40:24.3480] Normal: Discovering characteristics in DFU Service...
    [10:40:24.3480] Normal: DFU characteristics discovered
    [10:40:24.3480] Normal: Enabling notifications for 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.3870] Normal: Notifications enabled for 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:40:24.3870] Normal: Secure DFU Control Point notifications enabled
    [10:40:24.3870] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.4460] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:40:24.4470] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600601000100000000000000000000
    [10:40:24.4470] Normal: Command object selected (Max size = 256, Offset = 0, CRC = 00000000) received
    [10:40:24.4470] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.5060] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:40:24.5070] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600101
    [10:40:24.5070] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.5660] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:40:24.5670] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600201
    [10:40:24.5670] Normal: Packet Receipt Notif disabled
    [10:40:24.5670] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.5670] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.5680] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.5680] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.5690] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.5690] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.5690] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.5690] Normal: Writing to characteristic 8EC90002-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.5690] Normal: Command object sent (CRC = E524DC06)
    [10:40:24.5700] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.6850] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:40:24.6850] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 6003019800000006dc24e5
    [10:40:24.6850] Normal: Checksum (Offset = 152, CRC = E524DC06) received
    [10:40:24.6850] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.7460] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:40:24.8650] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600405
    [10:40:24.8650] Error: Error 5: Invalid object
    [10:40:24.8650] Normal: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50...
    [10:40:24.9250] Normal: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50
    [10:40:24.9270] Normal: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600c03
    [10:40:24.9270] Error: Error 3: Invalid parameter
    [10:40:24.9270] Normal: Disconnecting...
    [10:40:24.9270] Normal: Disconnected
    [10:40:24.9290] Error: DFU Failed with Error: Invalid object
    [10:40:45.6900] Normal: Disconnected.

  • Right, after I got your response, I changed priority to verify the workaround by updating only SD + BL to v17.1.0 first. After a little blundering, I got things to work now, in this order:

    1. Starting with: nRF5 SDK v14.2.0 SD + BL + App
    2. DFU nRF5 SDK v17.1.0 SD + BL
    3. DFU nRF5 SDK v17.1.0 App

    Basically, the workaround is proven.

    However, this also means I cannot reproduce the issue you are having.

    Are you able to setup a test device with debug bootloader and see more information from within the bootloader?

Related