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

Issue with bootloader and azure_fota sample on nrf9160

Hello,

I easily explain the issue I've found with azure_fota sample (...\v1.5.1\nrf\samples\nrf9160\azure_fota).

After configuring my azure hub, the prj.cnf of the fota sample, building and running the application, the image stored on the external server (bin file) is succesfully downloaded and stored on the secondary image slot of the flash by the application. Then, there's a reset of the board and the bootloader runs. 

Here is where I find the issue. The bootloader considers that the downloaded bin is not a valid application. It deletes the secondary image slot and runs again the primary one, where the azure_fota sample was saved, considering that the downloaded bin was not a valid application.

My question is, which conditions must to meet the downloaded binary for being considered as a valid application by the bootloader?

PD. The bootloader I'm speaking about is the one included in Nordic's SDK (...v1.5.1\nrf\samples\bootloader).

Parents
  • What bin file are you using? After you've programmed the azure_fota sample, change the text "Azure FOTA sample started\n" to "Azure FOTA v2 sample started\n" and rebuild the sample without flashing it, then use the bin file found in nrf9160\azure_fota\<build folder>\zephyr\app_update.bin.

    It is important that the bin file is signed with the private key that was used to generate the public key stored in mcuboot? If not, the validation will fail. If you follow the above procedure, a default key (should not be used in production) will be used and everything should be handled for you and it should work out of the box.

    If you still don't manage to get it to work, please get back to me.

    Best regards,

    Simon

Reply
  • What bin file are you using? After you've programmed the azure_fota sample, change the text "Azure FOTA sample started\n" to "Azure FOTA v2 sample started\n" and rebuild the sample without flashing it, then use the bin file found in nrf9160\azure_fota\<build folder>\zephyr\app_update.bin.

    It is important that the bin file is signed with the private key that was used to generate the public key stored in mcuboot? If not, the validation will fail. If you follow the above procedure, a default key (should not be used in production) will be used and everything should be handled for you and it should work out of the box.

    If you still don't manage to get it to work, please get back to me.

    Best regards,

    Simon

Children
Related