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

Incorrect manifest file in DFU .zip

I try to create ZIP file for DFU:

nrfutil pkg generate --hw-version 52 --application-version 1 --application nrf52832_xxaa.hex --sd-req 0xA8 --key-file private.key app_dfu_package.zip

I get the message:

Zip created at app_dfu_package.zip

So there is no error reported. But I can't use the created file. After selecting the file nRF Connect shows chart screen with "Intializing" status for half a second. The it disappears without any message. I'm again at characteristics view. For me it's a bug in nRF Connect because it doesn't say why it rejects the ZIP. I suppose it's because of incorrect manifest file:

{
    "manifest": {
        "application": {
            "bin_file": "nrf52832_xxaa.bin",
            "dat_file": "nrf52832_xxaa.dat"
        }
    }
}

It looks incomplete. There is no init_packet_data section. Why? I provided all necessary information in command line.

  • It seems everything is OK. The nrfutil pkg display command shows that all the information are in the dat file:

    DFU Package: <app_dfu_package.zip>:
    |
    |- Image count: 1
    |
    |- Image #0:
       |- Type: application
       |- Image file: nrf52832_xxaa.bin
       |- Init packet file: nrf52832_xxaa.dat
          |
          |- op_code: INIT
          |- signature_type: ECDSA_P256_SHA256
          |- signature (little-endian): 76f195554cc1e61b3674befc7edd3d50db2a599d93929bcb06b73260a3d9cb496b53b3493381fd7957bf7823250685c07a9fbb5220b1cb1447b8c7f0732ee063
          |
          |- fw_version: 0x00000001 (1)
          |- hw_version 0x00000034 (52)
          |- sd_req: 0xA8
          |- type: APPLICATION
          |- sd_size: 0
          |- bl_size: 0
          |- app_size: 42144
          |
          |- hash_type: SHA256
          |- hash (little-endian): 80b29beaad73e443c98056236e14dfc9d837fd2cdfd794f0feaed8dcd67567c1
          |
          |- is_debug: False

    So probably manifest format has changed and I was using some old tutorials which described longer manifests.

    As for the nRF Connect issue it's a known bug with selecting ZIP file on some Android phones which treat ZIP as a folder. Now I use ES File Explorer and nRF Connect and correctly select ZIP package.

Related