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

DOUBT IN ZIP FILE GENERATION FOR OTA -DFU.

HI ,

  I need the nrfutil commands used to generate the following zip file

  1. softdevice only
  2. bootloader only
  3. softdevice + bootloader  
  4. softdevice +bootloader+application 

If you can please attach the  command used for generating each zip file in the reply ,please don't provide any link because it  time consuming. 

please answer to 1,2,3 and 4 only.

Parents
  • As Hadi says, you need to add the arguments that are required to generate the DFU image.

    These are common:

    nrfutil pkg generate --sd-req 0xXX --hw-version 52 --key-file private.key "DFU_image_name".zip

    Then if your image contains an application, you need to add:

    --application application.hex --application-version N

    If your image contains a bootloader, you need to add:

    --bootloader bootloader.hex --bootloader-version N

    if your image conatins a softdevice, you need to add: 

    --softdevice softdevice.hex --sd-id 0xYY

    The links that Hadi linked to describes it quite well. Also, if you type "nrfutil pkg generate --help" you will see a description of all possible input parameters.

  • hi edvin ,

     Conisder the below condition .

    • We have a development kit of NRF52832(512 KB FLASH).
    • we flashed the softdevice(s132_nrf52_5.0.0_softdevice.hex ) and bootloader (secure_dfu_ble_s132_pca10040_debug.hex) into it .
    • i.e both softdevice and bootloader is from sdk 14.2.
    • After flashing SD+BL to DK the DK is advertising as "DfuTrag".
    • Now we need to to update a zip file through OTA containing softdevice and bootloder  from sdk 15.3 into it . 

    Doubts

    1. What is nrfutil command for generating a zip file containing SD and BL(sdk 15.3) at these condition. Mainly i need to known what is value of "--sd-req and --sd-id"
    2. These is the Softdevice hex "s132_nrf52_6.1.1_softdevice. hex" and these is the bootloader hex "secure_bootloader_ble_s132_pca10040.hex"  from SDK 15.3. if you need its hex   please ask.

      we you can please reply the command  for generating SD+BL zip file with all the condition mentioned above.

  • If it is not advertising as DFU targ, then there is probably a bug in your application that causes the chip to reset before it starts advertising.

    Actually there is no application in the DK only SD and BL and also there is no application hex in the zip file too.

     You mean the application for bootloader ?

    Do you remember the ticket where I told you about debugging when there is a bootloader present?

    yes, But at that time, debug was done by you and told me to use "pca10040_ble" instead of "pca10040_ble_debug". 

  • You can debug the application using the "pca10040_ble" bootloader project as long as you program the bootloader settings, and use "attach debugger" instead of "build and debug".

    The difference between "attach debugger" and "build and debug" is that "build and debug" will upload the .hex file. When you do this from the IDE, the application will behave the same, but there are some bit differences. If there are any bit differences it means that the signature of the application will change(the signature generated when you create the DFU image or if you generate the bootloader settings and program it manually).

    If the signature changes it means that the bootloader will reject the application. 

    So use "attach debugger". 

  • Just tell me one thing Edvin.

    If a DK contains only SD and BL of sdk 14.2 and its advertising as "DfuTrag"

    Then using nRF_Connect desktop application  we done a OTA -DFU to that DK .

    The zip file used for OTA-DFU contains SD and BL of sdk 15.3.

    After the OTA -update reaches 100% (ie transfer completed) what will happen to DK?

    Is the DK advertise as "DfuTrag " from new bootloder which is updated through OTA or not.

    If the signature changes it means that the bootloader will reject the application. 

    Actually there is no application is using man . please try to understand.

  • NANDHU said:
    Is the DK advertise as "DfuTrag " from new bootloder which is updated through OTA or not.

     Yes. The "DfuTarg" is from the new bootlaoder. You can confirm this by changing the advertising name of the bootloader if you open the bootloader project from SDK15.3.0, and go into sdk_config.h, and look for:

    #define NRF_DFU_BLE_ADV_NAME "DfuTarg"

    Change it to 

    #define NRF_DFU_BLE_ADV_NAME "Dfu15"

    Or something else (not too long). 

  • That is the problem man . Its not advertising . 

    How can i debug the code after OTA-DFU i don't known it.

Reply Children
Related