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

Upload failed: UNKNOWN (8202)

Hi,

I am working on implementing secure DFU. I have complied and loaded the secure DFU using gcc and am trying to upload a package using nRF Toolbox on android.

I have a package zip file which I built from an example hex (dfu_test_softdevice_s132.hex) using nrfutil. I can connect to the DFU and start the upload then I get the message. Upload failed: UNKNOWN (8202) from the app in the phone.

Not sure how to solve this one.

  • I looked through this one devzone.nordicsemi.com/.../ but what worked there did not seem to help me.

    • Do you see the same behaviour if you use the nRF Connect app ( formerly known as Master Control Panel)?
    • Do you see the same behaviour when using the test packages?
    • Which version of the apps are you using?
    • Could you post the nrutil command you used to generate the zip package?
    • How are you compiling the micro-ecc library?Are you using the supplied makefiles?
    • I have not tried with nRF connect app. Will try back at the office tomorrow.
    • I tried the test packages done with my key (as in the hex files put into a package with the command given) they give the same result, the test packages provided as zip will have the wrong verification key I believe
    • nRF Toolbox is 2.1.1
    • Command line is "nrfutil pkg generate --hw-version 52 --sd-req 0x80 --application-version 52 --application test4.hex --key-file private.pem DFU_test4.zip"
    • micro-ecc was compiled using the makefile given path being "C:\projects\SensorBlue\trunk\external\micro-ecc\nrf52_armgcc\armgcc" Thanks will post the other answers when I can
  • I am assuming that you have used the default public key when testing with the sample packages and replaced the public key when testing with packages that you have created yourself. Since the sample packages does not work, then it suggests that the micro-ecc library has been compiled incorrectly. Please make sure that the following definitions are used

    -DuECC_ENABLE_VLI_API -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1 -DuECC_SQUARE_FUNC=1 -DuECC_SUPPORTS_secp256r1=1 -DuECC_SUPPORT_COMPRESSED_POINT=0 -DuECC_OPTIMIZATION_LEVEL=3
    
  • I just retested. With the sample package and the default key it does work in the bootloader. I was able to get full bootload. (sample package dfu_test_softdevice_s132.zip) so I think the issue is my building the package. It would be nice to have the private key for the sample packages so I could test my building of packages on the sample hex files. I ran through the process of generating a new key private and public and rebuilding the bootloader and the package but still get the same error. This is the command line:

    1. Generate new key "nrfutil keys generate Key2.pem"

    2. Generate new public key "nrfutil keys display --key pk --format code Key2.pem --out_file public_key2.c"

    3. Build Package "nrfutil pkg generate --hw-version 52 --sd-req 0x80 --application-version 4 --application Test4.hex --key-file Key2.pem DFU_test4.zip"

    Also double checked that the default image would now not work (the default key has been changed to the new key) this gives the error "UPLOAD FAILED: Remote DFU Invalid CRC ERROR"

    I would appreciate any further help you can give me?

Related