DFU using Flutter library

Dear Nordic Support Team,

I'm currently working with your Flutter library, mcumgr_flutter version 0.4.1, to implement Device Firmware Update (DFU) functionality. However, I am encountering an issue where the DFU process fails with the following error:

Uncaught exception in binary message listener Wrong magic number (found 0x20031208, expected 0x96F3B83D or 0x96F3B83C) at io.runtime.mcumgr.image.McuMgrImageHeader.fromBytes(McuMgrImageHeader.java:66)

This suggests that my firmware files may not be packaged correctly for use with your library.

I am only testing it with android

I have both a .bin file and a .dat file in my DFU package, along with a manifest.json. My current manifest.json looks like this:

{

  "format-version": 1,

  "time": 1234567890,

  "files": [

    {

      "file": "002-175-0-02 tj-s140 Small Engine Application.bin",

      "image_index": "0"

    },

    {

      "file": "002-175-0-02 tj-s140 Small Engine Application.dat",

      "image_index": "1"

    }

  ]

}

I suspect that the issue might be related to incorrect packaging or an incompatible tool version. Could you please advise which version of Nordic's tools I should use to package my firmware files so that they are compatible with mcumgr_flutter? Any specific guidelines or recommendations regarding the use of .dat and .bin files with the Flutter library would be very helpful.

With android native no.nordicsemi.android:dfu:2.7.0

It works when i use the same bin and dat file and  the manifest is :

{

  "manifest": {

    "application": {

      "bin_file": "002-175-0-02 tj-s140 Small Engine Application.bin",

      "dat_file": "002-175-0-02 tj-s140 Small Engine Application.dat"

    }

  }

}

 

Thank you for your support.

Best regards,

Related