This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

DFU update with SD+BL+APP

Hello,

about two years ago we have made a Device basked on SDK 13 with S132 4.0.2 on it.

Now we had to build a newer version for our application and for this we have taken the SDK 16 with S132 7.0.1.

Now it looke like the new Application is not compatible with the old boodloader and SD. Because after update the new application to an existing Tag the Tag/Device does not work.

So we think we have to update also the SD and the BL. For this I have build also the DFU Booloader from SDK 16 and I want to have a *.ziü file for the dfu with SD+BL+APP

I have genereated the *. zip file with the following tow way's:

nrfutil pkg generate --hw-version 1 --key-file C:\Entwicklung\BeverageMetrics\Firmware\BevMetTag\key\private.pem --application-version 1 --application ble_app_BevMetTag.hex --sd-req 0x98,0xCA --softdevice s132_nrf52_7.0.1_softdevice.hex --sd-id 0xCA --bootloader secure_bootloader_ble_s132_pca10040.hex --bootloader-version 1 BevMetTag_package.zip

nrfutil pkg generate --debug-mode --key-file C:\Entwicklung\BeverageMetrics\Firmware\BevMetTag\key\private.pem --application ble_app_BevMetTag.hex --sd-req 0x98,0xCA --softdevice s132_nrf52_7.0.1_softdevice.hex --sd-id 0xCA --bootloader secure_bootloader_ble_s132_pca10040.hex BevMetTag_package_debug.zip

But every time I want to update an existing Tag with the NRF Connect I got a Timeout after the SD+BL was tranfered to the Device. And at the moment I realy don't know what I should do to be able to update my devices with this new *.zip file!

regards

markus

Parents
  • Hi Markus, 

    When you update the softdevice, the original bootloader won't be able to work with this new softdevice, so you need to update the SD+BL+APP.

    In your script to generate the .zip file, it seems that you would need to set --hw-version to 52 (by default it's 52 if you use nRF52) and you would need to increase the bootloader version to 2 for example. The bootloader won't update if the new version is not higher than the current version. 

    Please try capture a sniffer trace when you do DFU update. Also any log from the bootloader and DFU master would be useful.

  • Hi,

    I have now tired ot make my package with this two possibilities:

    nrfutil pkg generate --hw-version 52 --key-file C:\Entwicklung\BeverageMetrics\Firmware\BevMetTag\key\private.pem --application-version 2 --application ble_app_BevMetTag.hex --sd-req 0x98,0xCA --softdevice s132_nrf52_7.0.1_softdevice.hex --sd-id 0xCA --bootloader secure_bootloader_ble_s132_pca10040.hex --bootloader-version 2 BevMetTag_package.zip

    nrfutil pkg generate --hw-version 52 --debug-mode --key-file C:\Entwicklung\BeverageMetrics\Firmware\BevMetTag\key\private.pem --application-version 2 --application ble_app_BevMetTag.hex --sd-req 0x98,0xCA --softdevice s132_nrf52_7.0.1_softdevice.hex --sd-id 0xCA --bootloader secure_bootloader_ble_s132_pca10040.hex --bootloader-version 2 BevMetTag_package_debug.zip

    And for both *.zip files I get the same Connection timeout error after SD+BL was transfered to the Device.

    Do you think it has something todo with a possible DEBUG option in the old Bootloader?

    regards

    markus

  • Hi Markus, 


    Could you clarify the DEBUG option you mentioned on the old bootloader, did you used the _debug project example in the SDK ? 

    If you did, the new bootloader should have the start address at the same place as the old bootloader (0x73000).

    Could you get any logging from the bootloader ? And get a sniffer trace ? 

    When testing, you can try testing to update just the SD+BL first (generate the DFU packet with just the SD and BL) 

  • Hi,

    I have checked the Start address of the old and new booloader and you are right these addresses was different. I have now build the new bootloader with the  same start address like the old Bootloader. Now I was able to update the Device with the *.zip file.

    But now i want to checkl if the new updated device can be also update in futurte I have tried to load the same *.zip file again on the Tag. but there i will then get the message Result code 11 extended erro code 5 (fw_version_failure)

    Do you have a idea how to prevent this ? I also have tried to load this *.zip file with the --debug-mode set on the new updated tag but with the same result

    thank your regards markus

Reply
  • Hi,

    I have checked the Start address of the old and new booloader and you are right these addresses was different. I have now build the new bootloader with the  same start address like the old Bootloader. Now I was able to update the Device with the *.zip file.

    But now i want to checkl if the new updated device can be also update in futurte I have tried to load the same *.zip file again on the Tag. but there i will then get the message Result code 11 extended erro code 5 (fw_version_failure)

    Do you have a idea how to prevent this ? I also have tried to load this *.zip file with the --debug-mode set on the new updated tag but with the same result

    thank your regards markus

Children
Related