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

nrfutil problem - cannot generate correct CRC

Hi Nordic,

Sorry if I missed and repeated a question, just point me to the previous answer if it has been posted before.

I am trying the DFU example found in the SDK example nRF5_SDK_13.0.0_04a0bfd\examples\dfu\ble_dfu_send_hex\test_images_update_nrf52832

Do note that I only used the files from the example provided, none of my own code so far...

First I tried the following steps:

  1. Flashed dfu_test_bootloader_s132.hex using nRFgo Studio

  2. Flashed dfu_test_softdevice_s132.hex using nRFgo Studio

  3. Used Android nRF Toolbox to program dfu_test_softdevice_s132.zip

  4. So far so good ( the example files work)

Next:

  1. I tried to generate a .zip file using nrfutil.exe, using the provided dfu_test_softdevice_s132.hex (I assumed the generated zip file should be identical to dfu_test_softdevice_s132.zip)

  2. I get an error message when trying to upload using Android nRF Toolbox. It says CRC error. NOTE that this error is displayed even before the uploading starts (no progress bar seen).

  3. I did a Diff comparison between my .dat file and the .dat file that worked. The last 2 bytes are different. Some other bytes are different too.

  4. I tried a variety of settings for the version parameters, but still the same outcome.

  5. The generated .bin file is identical though. So is the manifest file

  6. If I replace the .dat file with the one from the example, it works fine

  7. I also tried updating to the latest nrfutil version 3.2.1 but its still the same

So... what am I doing wrong here? How is it possible that the CRC is different even if the binary file is identical? Am I missing some CRC algorithm setting?

Below is the command line I used. I based the settings on the original .zip file (using nrfutil pkg display):

nrfutil pkg generate --softdevice dfu_test_softdevice_s132.hex --key-file private.pem --hw-version 0x0034 --sd-req 098,0xCAFE mypackage.zip

Also tried to ignore the SD version using:

nrfutil pkg generate --softdevice dfu_test_softdevice_s132.hex --key-file privat e.pem --hw-version 0x0034 --sd-req 0xfffe mypackage.zip

I have attached the files I used. Thanks in advance

Related