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

DFU was getting failed after updating UICR Register with Model No.

Written a custom script to write product model no into UICR Registers.  After updating Model No, DFU was getting failed at state 6 i.e after updating init data after moving bootloader mode.

I uploaded my custom script for your reference.

  • I am using nrfutil tool to generate .zip file that contain manifest.json, .bin and .dat files.  I am sending .dat  is init packet for DFU.  

    nrfutil dfu genpkg --application _build/ble_cloudleaf_app_s130_xxac.hex --application-version 2 LM2.zip

    here is contents of  manifest.json

        "manifest": {
            "application": {
                "bin_file": "ble_cloudleaf_app_s130_xxac.bin",
                "dat_file": "ble_cloudleaf_app_s130_xxac.dat",
                "init_packet_data": {
                    "application_version": 4294967295,
                    "device_revision": 65535,
                    "device_type": 65535,
                    "firmware_crc16": 59631,
                    "softdevice_req": [
                        65534
                    ]
                }
            },
            "dfu_version": 0.5
        }
    }

    Instead of  removing the optional pre-validation step.  Is there a way to update device_type & device_revision fields  in init packet to  the same model number used in the shell script to update UICR Registers.

    If it works fine with out any code changes, I will go with that.

  • Yes, it is possible to defined the device revision and type to be the same as the model number. You can use the optional --dev-revision and --dev-type arguments when generating the package: 

     

  • nrfutil command is not accepting model number POI1-BD3i3B  as --dev-type & --dev-revision. 

    nrfutil dfu genpkg --application _build/ble_cloudleaf_app_s130_xxac.hex --dev-type POI1-BD3i3B --application-version 3 LM3.zip
    Usage: nrfutil dfu genpkg [OPTIONS] ZIPFILE

    Error: Invalid value for "--dev-type": POI1-BD3i3B is not a valid integer

    nrfutil dfu genpkg --application _build/ble_cloudleaf_app_s130_xxac.hex --dev-revision POI1-BD3i3B --dev-type POI1-BD3i3B --application-version 3 LM3.zip
    Usage: nrfutil dfu genpkg [OPTIONS] ZIPFILE

    Error: Invalid value for "--dev-revision": POI1-BD3i3B is not a valid integer

Related