Flashing firmware with dfu-util

I am trying to flash the arduino firmware onto the minima r4 using a prebuilt binary.

I looked at the verbose output for arduino-cli and it seems like the magic command is:

dfu-util --device 0x2341:0x0069,:0x0369 -D "./firmware.bin" -a0 -Q dfu-util 0.11-arduino4

This only works with "dfu-util 0.11-arduino4" this version of dfu-util.

If I omit the "-Q dfu-util 0.11-arduino4" I can use the standard dfu-util 0.11 version.
I cant seem to find where I can get "dfu-util 0.11-arduino4" short of copying it from the arduino installation. Is there a place I can get this file standalone or maybe from a repository using wget?

What is the difference? What does "-Q dfu-util 0.11-arduino4" do that dfu-util doesn't? Both seem to flash the code onto the board ok.

I do notice the standard version does it much faster and in one-shot where as the arduino version does it slower with multiple bars.

Hi @narshil94.

Yes. You can find the download URLs for each host target in this index file:

https://downloads.arduino.cc/packages/package_index.json

{
  "name": "dfu-util",
  "version": "0.11.0-arduino5",
  "systems": [
    {
      "host": "aarch64-linux-gnu",
      "url": "http://downloads.arduino.cc/tools/dfu-util-0.11-arduino5-linux_arm64.tar.gz",
      "archiveFileName": "dfu-util-0.11-arduino5-linux_arm64.tar.gz",
      "checksum": "SHA-256:b3f46a65da0c2fed2449dc5a3351c3c74953a868aa7f8d99ba2bb8c418344fe9",
      "size": "2607592"
    },
    {
      "host": "arm-linux-gnueabihf",
      "url": "http://downloads.arduino.cc/tools/dfu-util-0.11-arduino5-linux_arm.tar.gz",
      "archiveFileName": "dfu-util-0.11-arduino5-linux_arm.tar.gz",
      "checksum": "SHA-256:acd4bd283fd408515279a44dd830499ad37b0767e8f2fde5c27e878ded909dc3",
      "size": "2512819"
    },
    {
      "host": "i386-apple-darwin11",
      "url": "http://downloads.arduino.cc/tools/dfu-util-0.11-arduino5-darwin_amd64.tar.gz",
      "archiveFileName": "dfu-util-0.11-arduino5-darwin_amd64.tar.gz",
      "checksum": "SHA-256:9e576c6e44f54b1e921a43ea77bcc08ec99e0e4e0905f4b9acf9ab2c979f0a22",
      "size": "72429"
    },
    {
      "host": "i686-linux-gnu",
      "url": "http://downloads.arduino.cc/tools/dfu-util-0.11-arduino5-linux_386.tar.gz",
      "archiveFileName": "dfu-util-0.11-arduino5-linux_386.tar.gz",
      "checksum": "SHA-256:9a707692261e5710ed79a6d8a4031ffd0bfe1e585216569934346e9b2d68d0c2",
      "size": "2524406"
    },
    {
      "host": "i686-mingw32",
      "url": "http://downloads.arduino.cc/tools/dfu-util-0.11-arduino5-windows_386.tar.gz",
      "archiveFileName": "dfu-util-0.11-arduino5-windows_386.tar.gz",
      "checksum": "SHA-256:6451e16bf77600fe2436c8708ab4b75077c49997cf8bedf03221d9d6726bb641",
      "size": "571340"
    },
    {
      "host": "x86_64-linux-gnu",
      "url": "http://downloads.arduino.cc/tools/dfu-util-0.11-arduino5-linux_amd64.tar.gz",
      "archiveFileName": "dfu-util-0.11-arduino5-linux_amd64.tar.gz",
      "checksum": "SHA-256:96c64c278561af806b585c123c85748926ad02b1aedc07e5578ca9bee2be0d2a",
      "size": "2283425"
    }
  ]
},

There is one confusing thing. The Arduino developers got the version number wrong. So even though dfu-util prints "0.11-arduino4", you are actually using version 0.11-arduino5.

You misinterpreted the output. The dfu-util 0.11-arduino4 is not part of the dfu-util command. It is output that is printed by dfu-util. At least on my system, it is printed on the line after the command line.

So you should not include the arguments dfu-util 0.11-arduino4 in your dfu-util commands. Even if the command did work in some cases with those arguments, they don't serve any purpose.