Unable to update or doctor device - problem with DFU utils

I had a working particle workbench back in December, but now it is not functional. Before starting a new project, I want to update my devices with ‘device update’. I updated the cli to 2.2.0. I can see the device with ‘particle usb list’

I did a full reinstall of the cli and the workbench extensions in vs code. Not sure what to do next.

Here is what is going happening from the update-cli to the particle update.

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> npm install -g particle-cli
C:\Users\snowr\AppData\Roaming\npm\particle -> C:\Users\snowr\AppData\Roaming\npm\node_modules\particle-cli\dist\index.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\particle-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ particle-cli@2.2.0
updated 1 package in 6.373s

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle  update
!!! There was an error trying execute DFU utilities.

!!! For help with installing DFU Utilities, please see:
 https://docs.particle.io/guide/tools-and-features/cli/#advanced-install

!!! You may also find our community forums helpful:
 https://community.particle.io/ 

> Error code: unknown 

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> 

Here is what dfu-util says in powershell. dfu-util says it can’t open the device, but it can see into it, so that is a bit confusing.

PS C:\Users\snowr> dfu-util -l
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Cannot open DFU device 2b04:d00d
Found DFU: [2b04:d00d] ver=0251, devnum=25, cfg=1, intf=0, alt=2, name="@External Flash   /0x80000000/1024*004Kg", serial="e00fce680a1eb4d7e1e6cd4d"
Found DFU: [2b04:d00d] ver=0251, devnum=25, cfg=1, intf=0, alt=1, name="@DCD Flash   /0x00000000/1*016Ke", serial="e00fce680a1eb4d7e1e6cd4d"
Found DFU: [2b04:d00d] ver=0251, devnum=25, cfg=1, intf=0, alt=0, name="@Internal Flash   /0x00000000/1*004Ka,47*004Kg,192*004Kg,4*004Kg,4*004Kg,8*004Ka", serial="e00fce680a1eb4d7e1e6cd4d"```

In Windows you shouldn’t use npm to install or update.
You should use the installer and then update via particle update-cli.

1 Like

Thanks for the reply and understood.

This is the second reinstall. The first i did with the installer and update-cli. That exhibited the same issue, hence the try with npm. Every exec seems to be there (dfu-util runs)

I will go back and try a third time.

Can you also run particle serial inspect with the device in Listening Mode?

Ok, here are the results after another reinstall. Note that update-cli asked to run the npm command instead…

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle update-cli
Update the CLI by running npm install -g particle-cli
PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> npm install -g particle-cli
C:\Users\snowr\AppData\Roaming\npm\particle -> C:\Users\snowr\AppData\Roaming\npm\node_modules\particle-cli\dist\index.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\particle-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ particle-cli@2.2.0
updated 1 package in 38.464s

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle serial inspect
Platform: 13 - Boron
Modules
  Bootloader module #0 - version 501, main location, 49152 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 1404, main location, 671744 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #0 - version 501
      Radio stack module #0 - version 202
  User module #1 - version 6, main location, 131072 bytes max size
    UUID: 8E4517F613E1DB9FFBDB2E8F7B462CF8495F9CEF8BBE589FA682E3997B72D803
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 1403
  Radio stack module #0 - version 202, main location, 192512 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle update
!!! There was an error trying execute DFU utilities.

!!! For help with installing DFU Utilities, please see:
 https://docs.particle.io/guide/tools-and-features/cli/#advanced-install

!!! You may also find our community forums helpful:
 https://community.particle.io/ 

> Error code: unknown 

Also, I just realized that the ‘npm’ command put the node_modules in the local dir instead of the AppData/local/particle path.

It seems like the ‘master’ workbench installer isn’t pulling in the cli installer because the ‘bin’ dir is missing from the ‘particle’ dir.

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> dir


    Directory: C:\Users\snowr\source\repos\beacon-checker-logger-particle-1


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        3/29/2020  12:35 PM                node_modules
-a----        3/29/2020   8:54 AM          20845 beacon20particlefeather.ino
-a----        3/29/2020  11:40 AM          22747 package-lock.json
-a----        3/29/2020   8:54 AM            114 README.md


PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle setup
 _ __             _   _      _
| '_ \  __ _ _ __| |_(_) ___| | ___
| |_) |/ _` | '__| __| |/ __| |/ _ \
|  __/| (_| | |  | |_| | (__| |  __/
|_|    \__,_|_|   \__|_|\___|_|\___|
                 https://particle.io

> Setup is easy! Let's get started...
> It appears as though you are already logged in as snowrodeo@gmail.com
? Would you like to use this account? Yes

! PROTIP: Hold the MODE/SETUP button on your device until it blinks blue!
! PROTIP: Please make sure you are connected to the internet.

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle update-cli
Updating CLI... no plugins to update.
PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle update
!!! There was an error trying execute DFU utilities.

!!! For help with installing DFU Utilities, please see:
 https://docs.particle.io/guide/tools-and-features/cli/#advanced-install

!!! You may also find our community forums helpful:
 https://community.particle.io/

> Error code: unknown

Can you try particle update -v to get a more verbose output about the error?

Thanks @ScruffR for the help. Here are the results

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle update -v
!!! There was an error trying execute DFU utilities.

!!! For help with installing DFU Utilities, please see:
 https://docs.particle.io/guide/tools-and-features/cli/#advanced-install

!!! You may also find our community forums helpful:
 https://community.particle.io/

> Error code: unknown 

We have seen such struggles when there are multiple installations of CLI on one machine.
Can you make sure to remove every instance of CLI via Windows Add/Remove Programs and npm uninstall particle-cli and npm uninstall -g particle-cli and then searching for any residue and deleting via explorer.
Then also remove all drivers (serial and DFU - even hidden ones) that may be linked to Particle.

After that restart your machine and try reinstalling via the most recent CLI Installer (making sure to tick the remove and install drivers checkboxes).

Ok, I went through the big remove and reinstall, but no joy.

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle update
!!! There was an error trying execute DFU utilities.

!!! For help with installing DFU Utilities, please see:
 https://docs.particle.io/guide/tools-and-features/cli/#advanced-install

!!! You may also find our community forums helpful:
 https://community.particle.io/

> Error code: unknown

Here is what I did to find the drivers:

  1. Plugged a boron in to USB
  2. Opened Device Manager and looked from the Boron
  3. Right clicked on “Boron” and then properties
  4. Found the ‘particle’ driver (from 2019 I think) and uninstalled it

After the reinstall, I only see the windows driver (10.0.18362.1) Not sure why the particle driver didn’t get installed. Gonna poke at that for a while I guess…

That is odd.
You can download a standalone driver pack to from here
https://binaries.particle.io/drivers/windows/particle_drivers.exe

Can you post a screenshot of your DevMgr while the device is plugged in and blinking yellow?

Also, can you try dfu-util -v and also where dfu-util (in cmd - in PowerShell it’d be where.exe dfu-util)?
It should be found at C:\Users\<yourUser>\AppData\Local\particle\bin\

Installed the driver pack. In non-DFU mode, it shows as using the particle driver. In DFU mode, it is the windows drive The events are shown below

Here is the outputs from powershell

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> dfu-util -v -l
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Cannot open DFU device 2b04:d00e
Found DFU: [2b04:d00e] ver=0251, devnum=21, cfg=1, intf=0, alt=2, name="@External Flash   /0x80000000/1024*004Kg", serial="e00fce681f04cf4a47e950e8"
Found DFU: [2b04:d00e] ver=0251, devnum=21, cfg=1, intf=0, alt=1, name="@DCD Flash   /0x00000000/1*016Ke", serial="e00fce681f04cf4a47e950e8"
Found DFU: [2b04:d00e] ver=0251, devnum=21, cfg=1, intf=0, alt=0, name="@Internal Flash   /0x00000000/1*004Ka,47*004Kg,192*004Kg,4*004Kg,4*004Kg,8*004Ka", serial="e00fce681f04cf4a47e950e8"
PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle device doctor
The Device Doctor will put your device back into a healthy state
It will:
  - Upgrade system firmware
  - Flash the default Tinker app
  - Reset the device and server keys
  - Clear the Wi-Fi settings
The Doctor didn't complete successfully. Timed out attempting to list DFU devices
> Please visit our community forums for help with this error:
https://community.particle.io/
PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle update
!!! There was an error trying execute DFU utilities.

!!! For help with installing DFU Utilities, please see:
 https://docs.particle.io/guide/tools-and-features/cli/#advanced-install

!!! You may also find our community forums helpful:
 https://community.particle.io/

> Error code: unknown 

No idea why the driver pack didn’t help, but you should still be able to use zadig to install the libusbK drivers

Thanks for sticking with me @ScruffR!

I downloaded Zadig and then put the device in DFU more manually. I launched zadig and browsed for the device. The driver was a generic windows version. I then replaced it with a libusbK version. The non-dfu driver is still the particle one.

From there, I tried particle update and it got further, but didn’t complete. Then I tried particle device doctor just for fun, but that didn’t work either.

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle update
!!! There was an error trying execute DFU utilities.

!!! For help with installing DFU Utilities, please see:
 https://docs.particle.io/guide/tools-and-features/cli/#advanced-install

!!! You may also find our community forums helpful:
 https://community.particle.io/

> Error code: unknown


> Your device is ready for a system update.
> This process should take about 30 seconds. Here it goes!


! An error occurred while attempting to update the system firmware of your device:

Error: VError: Error writing firmware: Timed out attempting to list DFU devices

> Please visit our community forums for help with this error:
https://community.particle.io/
Cannot read property 'code' of undefined
PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle usb list
snowrodeo-xenon-1 [e00fce681f04cf4a47e950e8] (Xenon, DFU)
PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle update
!!! There was an error trying execute DFU utilities.

!!! For help with installing DFU Utilities, please see:
 https://docs.particle.io/guide/tools-and-features/cli/#advanced-install

!!! You may also find our community forums helpful:
 https://community.particle.io/

> Error code: unknown

PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> dfu-util -v -l
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Cannot open DFU device 2b04:d00e
Found DFU: [2b04:d00e] ver=0251, devnum=29, cfg=1, intf=0, alt=2, name="@External Flash   /0x80000000/1024*004Kg", serial="e00fce681f04cf4a47e950e8"
Found DFU: [2b04:d00e] ver=0251, devnum=29, cfg=1, intf=0, alt=1, name="@DCD Flash   /0x00000000/1*016Ke", serial="e00fce681f04cf4a47e950e8"
Found DFU: [2b04:d00e] ver=0251, devnum=29, cfg=1, intf=0, alt=0, name="@Internal Flash   /0x00000000/1*004Ka,47*004Kg,192*004Kg,4*004Kg,4*004Kg,8*004Ka", serial="e00fce681f04cf4a47e950e8"
PS C:\Users\snowr\source\repos\beacon-checker-logger-particle-1> particle device doctor
The Device Doctor will put your device back into a healthy state
It will:
  - Upgrade system firmware
  - Flash the default Tinker app
  - Reset the device and server keys
  - Clear the Wi-Fi settings
The Doctor didn't complete successfully. Timed out attempting to list DFU devices
> Please visit our community forums for help with this error:
https://community.particle.io/

I think it’s best to open a support ticket and reference this thread in it.