This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Zip file failed to upload for ble_secure project

Hello, I am working on ota ble_secure project. I have created a zip file which is the last step and copied this file to my smart phone so that I can upload it using nrf toolbox. The upload fails. I am not sure which files to include to create a zip package. I am attaching my zip package as well as the files that I used to merge.app_dfu_package.zip. The hex file is nrf52832_xxaa_s132.hex.

The log file of error is log.txt

Sdk which I have is www.nordicsemi.com/.../nRF5-SDK

I am using this project in sdk sdknordic\examples\dfu\bootloader_secure\pca10040

Left side is new sdk and right side is old sdk. bootloader.PNG

Log file New Text Document.txt

New log file errorlog.txt

  • Hello Hung, I am familiar with the nrf2832 application. I have used many ble projects before for example ble_app_uart and ble_app_template. dfu.hex that i used was nrf51latest13alpha\examples\dfu\bootloader_secure\pca10040\arm5_no_packs_build\nrf52832_xxaa_s132.hex I generated this file my myself as this is the file I got after the compilation of the project. I used the one without debug suffix. I have tried with the two sdk versions and I am facing same issue in both. nRF5_SDK_12.2.0_f012efa (2) nRF5_SDK_13.0.0-1.alpha_055eef3 (1)

    That unknown 8202 was the error i git in app while transferring my firmware from app.

  • I assume now you use the correct softdevice s132_nrf52_3.0.0_softdevice.hex instead of dfu_test_softdevice_s140.hex ?

    If you use --debug-mode you need to use the bootloader with _debug surfix.

    Please point me to where you find "8202" code.

  • Hello Hung, When I compile the bootloader with _debug suffix my linked gives me error like the size of this image exceeds the max size allowed. Can you tell me what should I do to run the code without _debug suffix. Can you please write steps with commands to generate key as well and to prepare the filnal zip package and which all files needs to be used. I am attaching log file above.

  • If you want to use the one without _debug, you need to state all the versions requirement needed, as mentioned in this.

    Here is the commandline script I used:

    Generate private key:

    nrfutil keys generate priv.pem
    

    Generate public key:

    nrfutil keys display --key pk --format code priv.pem --out_file public_key.c
    

    Genrate package (this is only for S132 v3.0):

    nrfutil pkg generate --hw-version 52 --sd-req 0x8c --application-version 1 --application ble_app_hrs.hex --key-file priv.pem app_dfu_package.zip
    

    Note the --hw-version should be either "52" for nRF52832/40 or "51" if you use nRF51 chip. You can however, change this if you want your own hw-version code by modifying the bootloader to add NRF_DFU_HW_VERSION define in your code. For testing, I suggest you to stick to the "52". This is a little bit tricky part because in the documentation we have an example using "--hw-version 1" which can cause trouble if testing without adding NRF_DFU_HW_VERSION define.

  • Hello Hung, Great news. Finally I solved the problem. The problem was with my app package and I generated new file with this command nrfutil pkg generate --hw-version 52 --sd-req 0x8C --application-version 0xff --application app.hex --key-file key.pem app_dfu_package.zip

Related