There was a problem executing dfu-util: The handle is invalid

Trying to flash os to MeadowV2 and I’m getting the following:

meadow flash os
Device in DFU Mode, flashing OS
Flashing OS with C:\Users\cdberry\AppData\Local\WildernessLabs\Firmware\\Meadow.OS.bin
dfu-util 0.10

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2020 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to

Match vendor ID from file: 0000
Match product ID from file: 0000
Opening DFU capable USB device…
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Downloading element to address = 0x08000000, size = 2097152

There was a problem executing dfu-util: The handle is invalid.
meadow : ERROR
At line:1 char:1

  • meadow flash os
  •   + CategoryInfo          : NotSpecified: (ERROR:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError

Meadow.CLI.Core.Exceptions.MeadowDeviceException: Failed to flash meadow
at Meadow.CLI.Core.Devices.MeadowDeviceHelper.DfuFlashAsync(String serialPortName, String osPath, ILogger logger,
CancellationToken cancellationToken) in D:\a\1\s\Meadow.CLI.Core\Devices\MeadowDeviceHelper.cs:521
at Meadow.CLI.Commands.DeviceManagement.FlashOsCommand.ExecuteAsync(IConsole console) in
at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in
at CliFx.CliApplication.RunAsync(IReadOnlyList1 commandLineArguments, IReadOnlyDictionary2 environmentVariables)
in \home\runner\work\CliFx\CliFx\CliFx\CliApplication.cs:191

I have exactly the same error message. Just got my brand new Meadow DevKit and trying to flash the OS…

I restarted visual studio as admin and reran the getting started commands from the powershell terminal in VS and it works now. I was running them from package manager console.

1 Like

That worked for me too. Wow!!

Thanks very much for sharing your solution!