Generate Zip file for FOTA DFu

Hello ,

i am using nrfutil tool and generate zip file but i am getting error which is mention in picture. i try ble_app_blinky code and generated ZIP file successfully, can you tell me how to solve this error

i am using

1 ..nRF5SDK1500a53641a sdk 

2.  nrfutil 7.4.1

3. windows 11 home

  

Parents
  • Hi DG,

    I see that you are using a nrfutil version newer than v7.0.0. In such versions, you need to enable support for nRF5 SDK first. Have you done that?

    If not, please follow the instruction in this page: https://infocenter.nordicsemi.com/topic/ug_nrfutil/UG/nrfutil/nrfutil_installing.html.

    Hieu

  • Hi Hieu

    i dump ble_led.zip file into nrf52840 using nrf connect tool .it is working fine but i generate AES_Encrypt.zip file and dump into nrf52840 sdk but it is not working. can you tell me why it is not working ? same normal_led.zip file not working

    1 . bootloader_dfu.hex file dump into nrf52840 sdk 

    2 . nrfutil pkg generate --hw-version 52 --application-version 1 --application ble_app_blinky_pca10056_s140.hex --sd-req      0xA9 --key-file private.key ble_led.zip

    3. nrfutil pkg generate --hw-version 52 --application-version 1 --application              C:/Dharm_work/Backup_code/DFU/DeviceDownload/nRF5SDK1500a53641a/nRF5_SDK_15.0.0_a53641a/examples/crypto/nrf_crypto/aes/aes_ctr/pca10056/blank/ses/Output/Release/Exe/nrf_crypto_aes_ctr_pca10056.hex --sd-req 0xA9 --key-file private.key AES_Encrtpy.zip

     i generated zip file using  this commands and once try your side alse

    BR

    DG

    bootloader_dfu.hex

    ble_led.zip

    AES_Encrypt.zip

    normal_led.zip

  • Hi DG,

    I must say I am a little confused what is going on. Here I will try to explain what I understand, and give a recommendation based on that. However, please correct me if I am wrong.

    1. You have now been able to generate the DFU ZIP package, which you had difficulty with in the opening post
    2. You then proceeded to these test steps
      1. Starting with erased nRF52840 DK (you said SDK, but I think you meant DK here)
      2. Flash only bootloader.hex
      3. Attempt DFU
      4. Had a failure

    Looking at your setup, I suspect that it is because of the --sd-req field in your command.

    The examples you are testing with are applications that run without the SoftDevice. You have also programmed the SoC to not have any SoftDevice (bootloader only). Therefore, the DFU process would fail.

    Please try to regenerate the package without SoftDevice Requirement.

    BR,

    Hieu

  • i am follow steps

    1 . nrfutil.exe Keys generate private.key   ( generate private key using command )  

    2   nrfutil keys display --key pk --format code private.key --out_file public_key.c 

         ( generate public key using  private key )

    3  create bootloader_dfu.hex  file using soft device hex file or secure bootloader file .

    4  now i dump bootloader_dfu.hex  into nrf52840 sdk  using j flash tool and now board into DFU mode 

    5  now i generate zip file for ble_led  using command 

    • nrfutil pkg generate --hw-version 52 --application-version 1 --application      ble_app_blinky_pca10056_s140.hex --sd-req 0xA9 --key-file private.key app_dfu_package.zip

    6  now  i want dump zip file on board using nrf tool  and  i dump zip file on board and which is working            ble_led properly.

    7  Now problem is generate another zip file for AES and dump into board using nrf tool but it is not                  working. i generate zip file using this command

                                                                                                                                                                 nrfutil pkg generate --h w-version 52 --application-version 1 --application             C:/Dharm_work/Backup_code/DFU/DeviceDownload/nRF5SDK1500a53641a/nRF5_SDK_15.0.0_a53641a/examples/crypto/nrf_crypto/aes/aes_ctr/pca10056/blank/ses/Output/Release/Exe/nrf_crypto_aes_ctr_pca10056.hex --sd-req 0xA9 --key-file private.key AES_Encrtpy.zip

      8. can you check your side and tell me why it is not working .

         

  • yes .

     --sd-req 0xA9  no space .

    i am running application without soft device .

Reply Children
  • It seems you have missed my recommendation:

    Hieu said:
    Please try to regenerate the package without SoftDevice Requirement.
  • how can you tell me ?  (any command ) 

  • nrfutil pkg generate --hw-version <hw_version> --sd-req <sd_version> --application <application_file> --application-version <app_version> --key-file <private.key> <output_zip_file> 

    i used this command for generate zip file and i am not using any soft device file .i used soft device file for generate dfu boatloader hex file . 

  • You can remove the SoftDevice Requirement by removing the --sd-req parameters from the command.

    However, this recommendation from me is not correct. I reviewed your reply and see that you already flashed the SoftDevice onto the DK. I am sorry about this.

    If you are using the SoftDevice, then the issue is most likely that the nrf_crypto_aes_ctr_pca10056 example that you are using is not built to accommodate coexistence with the SoftDevice. 

    Let's refer to the Memory Layout of the SDK's bootloader solution here. All the addresses and pointers in that crypto application is built expecting the application to locate at the MBR or the SoftDevice's place. However, when downloaded with DFU, it is not. Therefore, the application cannot work correctly.

    Technically, you can modify the example to start at a later address, like discussed in this DevZone question. However, if I understand correctly, you are just evaluating the solutions, so I recommend you retry with a BLE example instead.

  • i removed --sd--req  from command then i got  some warning  pc_nrfutil_legacy_v6.1.7.exe pkg generate [OPTIONS] ZIPFILE and i download nrfutls version V6.1.7 and try but i still got error which is Error: --sd-req required.. 

    after install nrfutil version V6.1.7

    Also, we want to understand the following questions:

    1. Is there a BLE code that already integrates AES CTR or any other form of AES? Our goal is to make sure that the communication between the mobile phone and our hardware is encrypted. 

    We were following the methodology of integrating the nrf_crypto_aes_ctr_pca10056 with the BLE uart code. This is the place where we got stuck. We, furthermore, also want to integrate other services like the battery level and some others with our firmware. This is just FYI 

    2. If we are to combine the two examples how should we go about doing this? We want to combine the BLE uart and the nrf_crypto_aes_ctr_pca10056. . On this same point we also understand that both these codes have a different project file and we are not sure how to combine them. Can you advice how to proceed forward on this?

    Thanks

    DG

Related