Unable to open USB device - Argon

TL/DR:

If particle usb commands are not working for one of your devices on a Windows machine, try "uninstalling" all of the "hidden devices" using Windows Device Manager.

This fixed my problem.


I can't get any of the particle usb commands to work with my Argon.

I'm using Windows 11 with particle CLI version

Step 1 - Tries to Restore Argon using USB commands

Followed the guide here: How Can I Set Up My Argon Or Boron Via USB? | Troubleshooting | Particle

Can't get past step 8. Here is the PowerShell output:

PS C:\Users\macdo> particle update
Updating argon e00fce681885451c74454197 to latest Device OS version
[██████████████░░░░░░░░░░░] 57% | Flash failed.
Unable to reconnect to the device. Try again or run particle update to repair the device
PS C:\Users\macdo>

Step 2 - Try Device Restore USB Tool

Selected OS version 5.3.0

Still not working... after all the steps of the USB restore tool get a green check mark, my device resets, connects to the server (breathing cyan), and the web restore tool shows:

Waiting for the device to finish updating itself and restart...

This will take several seconds, and the status LED may blink yellow, white, magenta (red and blue at the same time), blue, or green.

Nothing happens after this... and my device is still not being recognized by any particle usb commands if I try to interact with it using CLI.

Step 3 - Try Device Restore JTAG Tool

Upgraded my Particle Debugger: Debugger | Reference | Particle

Then pressed the 4.2.0 button on the JTAG restore page (see screenshot):

After a few minutes got the following status on this web page:

Flash complete!

Still, particle usb commands not working...

PS C:\Users\macdo> particle serial list
Found 1 device connected via serial:
COM5 - Argon - e00fce681885451c74454197
PS C:\Users\macdo> particle usb dfu
Unable to open USB device
PS C:\Users\macdo> particle usb dfu -v
Getting device information...
Unable to open USB device
UsbError: Unable to open USB device
    at wrapUsbError (C:\Users\macdo\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\src\usb-device-node.js:25:9)
    at C:\Users\macdo\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\src\usb-device-node.js:50:19
    at new Promise (<anonymous>)
    at UsbDevice.open (C:\Users\macdo\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\src\usb-device-node.js:46:10)
    at klass.open (C:\Users\macdo\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\src\device-base.js:131:20)
    at openUsbDevice (C:\Users\macdo\AppData\Local\particle\node_modules\particle-cli\src\cmd\usb-util.js:91:26)
    at C:\Users\macdo\AppData\Local\particle\node_modules\particle-cli\src\cmd\usb.js:277:15
    at async CLI.runCommand (C:\Users\macdo\AppData\Local\particle\node_modules\particle-cli\src\app\cli.js:148:4)
    at async CLI.run (C:\Users\macdo\AppData\Local\particle\node_modules\particle-cli\src\app\cli.js:175:11)
PS C:\Users\macdo>

Step 4 - Try "factory reset" method

I tried to do a factory reset of the Argon by continuing to holding down mode button for 10 seconds or more (see factory reset instructions here: How to do a factory reset

Step 5 - Reinstalled Particle CLI

Then I tried re-installing Particle CLI and running particle update-cli command afterwards, putting the Argon into DFU mode, connecting to computer, and using particle update command. This process fails:

C:\Users\macdo>particle update-cli
Updating CLI... no plugins to update.

C:\Users\macdo>particle --version
3.22.0

C:\Users\macdo>particle update
Updating argon e00fce681885451c74454197 to latest Device OS version
The access token was not found

C:\Users\macdo>particle login
? Please enter your email address tom@jazaenergy.com
? Please enter your password [hidden]
> Successfully completed login!

C:\Users\macdo>particle update
Updating argon e00fce681885451c74454197 to latest Device OS version
[██████████████░░░░░░░░░░░] 57% | Flash failed.
Unable to reconnect to the device. Try again or run particle update to repair the device

Step 6 - Check with a different Argon to confirm nothing wrong with setup

I have another Argon which works fine after each of the above steps (continues to respond to the particle usb suite of commands).

Step 7 - Compare differences between Argons

The only difference other than the behavior of any commands/processes that use the particle usb command between the two Argons that I can see is the device status that gets listed when using the USB restore command:

The working Argon says "CDC Mode" and the problematic Argon says "CDC Mode - Paired"


Summary

Seems that whatever is causing the device not to be able to respond to particle usb flavored commands is also causing particle update process to fail...

Since both Argons went through the Device Restore JTAG process without incident, it would seem that whatever is causing this difference of behavior from one Argon to the other has something to do with

Open questions

Is there a way to check what version of the bootloader is installed?

What reasons could there be for particle usb style commands not working?

Can anyone recommend how to get my Argon working with the particle usb commands so that I can easily develop/flash code to this Argon using Particle Workbench?

It is not clear why that is happening.

The working Argon says "CDC Mode" and the problematic Argon says "CDC Mode - Paired"

That's because you previously allowed the browser to acces the problematic device and is expected.

Is there a way to check what version of the bootloader is installed?

Since the device can still boot, the device inspect tool will show that.

I tried this.

With the problematic Argon I get:

{
  "p": 12,
  "m": [
    {
      "s": 49152,
      "l": "m",
      "vc": 30,
      "vv": 30,
      "f": "b",
      "n": "0",
      "v": 1200,
      "d": []
    },
    {
      "s": 671744,
      "l": "m",
      "vc": 30,
      "vv": 30,
      "f": "s",
      "n": "1",
      "v": 4200,
      "d": [
        {
          "f": "a",
          "n": "0",
          "v": 202
        },
        {
          "f": "b",
          "n": "0",
          "v": 1200
        }
      ]
    },
    {
      "s": 131072,
      "l": "m",
      "vc": 30,
      "vv": 30,
      "u": "72B73BFAB5C902DBE9EC90A13958C90408C6FA4758B9F9C5CFB5100141C1C58B",
      "f": "u",
      "n": "1",
      "v": 5,
      "d": [
        {
          "f": "s",
          "n": "1",
          "v": 326
        }
      ]
    },
    {
      "s": 1536000,
      "l": "m",
      "vc": 30,
      "vv": 30,
      "f": "c",
      "n": "0",
      "v": 5,
      "d": []
    },
    {
      "s": 192512,
      "l": "m",
      "vc": 30,
      "vv": 30,
      "f": "a",
      "n": "0",
      "v": 202,
      "d": []
    }
  ]
}

With the working Argon I get:

{
  "p": 12,
  "m": [
    {
      "s": 49152,
      "l": "m",
      "vc": 30,
      "vv": 30,
      "f": "b",
      "n": "0",
      "v": 1200,
      "d": []
    },
    {
      "s": 671744,
      "l": "m",
      "vc": 30,
      "vv": 30,
      "f": "s",
      "n": "1",
      "v": 4200,
      "d": [
        {
          "f": "a",
          "n": "0",
          "v": 202
        },
        {
          "f": "b",
          "n": "0",
          "v": 1200
        }
      ]
    },
    {
      "s": 131072,
      "l": "m",
      "vc": 30,
      "vv": 30,
      "u": "72B73BFAB5C902DBE9EC90A13958C90408C6FA4758B9F9C5CFB5100141C1C58B",
      "f": "u",
      "n": "1",
      "v": 5,
      "d": [
        {
          "f": "s",
          "n": "1",
          "v": 326
        }
      ]
    },
    {
      "s": 1536000,
      "l": "m",
      "vc": 30,
      "vv": 30,
      "f": "c",
      "n": "0",
      "v": 5,
      "d": []
    },
    {
      "s": 192512,
      "l": "m",
      "vc": 30,
      "vv": 30,
      "f": "a",
      "n": "0",
      "v": 202,
      "d": []
    }
  ]
}

... it would seem that everything is the same for both of them.

@rickkas7 There is no way that this could be a hardware issue is there? Are there different coprocessors or other hardware differences in various Argon mass production runs?

I'm using the same USB cable/port for both of these Argons, and everything that the device inspect tool gathers is identical for both of these....

Update: I tried the Particle Device Doctor tool.

Argon that was responding to particle usb commands

  • The tool works fine

  • healthy Argon asks for WiFi setup after device doctor done flashing OS/bootloader/etc

  • healthy Argon also provides a completion message, and live debug logging during execution of the Device Doctor tool;

Argon that was not responding to particle usb commands

  • Device Doctor Tool unable to initiate the restoration process after the device gets selected (see device selection screen below)

  • If I put the device into DFU mode some time after trying to initiate the Device Doctor tool, I get the following message from the device doctor tool

An error occurred putting your device into DFU mode (blinking yellow).

Hold down the MODE (or SETUP) button and tap the RESET button. Continue to hold down MODE while the status LED blinks magenta (red and blue at the same time) until it blinks yellow, then release.

  • Pressing the "device is blinking yellow" button resumes the restoration process

  • Device OS, NRF52 soft device, user firmware (particle cloud debugging app) and Device OS bootloader all complete

  • Cloud events come through once the device reconnects to the cloud

  • No device debugging logs are shown, unlike the process with the healthy Argon...

Questions and Next Steps

  • Is there a way to COMPLETELY factory reset an Argon?
  • When I use the particle usb list or any other particle usb command, what is actually happening? Is Particle CLI talking to Particle OS using the USB serial connection?
  • How does Particle CLI execute these types of commands on a pack that is already running user firmware that is using Serial debug port for debug messaging?
  • If using particle usb types of commands is not working for a particular Argon, but it is working for another Argon, is it likely or even possible that the issue could be hardware damage to the Argon?
  • If the Argon is not responding to particle usb types of commands, is it possible that the USB Restore or Device Doctor tools are actually not succeeding fully restoring the Argon, but are also not displaying any error messages?

Is there a way to COMPLETELY factory reset an Argon?

I believe you would need to SWD/JTAG device restore, and also erase the external flash.

There's also the programming of the NCP (ESP32 software) but that shouldn't have any effect on what you are seeing.

When I use the particle usb list or any other particle usb command, what is actually happening? Is Particle CLI talking to Particle OS using the USB serial connection?

Sort of. particle usb list only needs to enumerate the USB devices to find the Particle vendor ID (VID). From the USB product ID (unrelated to the Particle product ID), the platform can be determined, as well as whether it's in serial mode or DFU mode. The device ID is the USB ID. These can all be determined from the USB descriptor, and works even if Device OS is not fully running, which is why it works in DFU mode.

How does Particle CLI execute these types of commands on a pack that is already running user firmware that is using Serial debug port for debug messaging?

Prior to a few months, ago, things like particle identify did use USB CDC mode, and didn't always work right when user firmware was outputting data to serial.

The Particle CLI was updated to use USB control requests, which are separate from USB CDC serial mode, which is why it now works. The control requests have been supported in Device OS since around Device OS 0.9.0, it's just that the Particle CLI never used them. Control requests only work when Device OS is running (not in DFU mode).

Since particle usb list just used the USB device descriptor, it was unaffected if the USB CDC serial port was in use, even with older versions of the Particle CLI.

If using particle usb types of commands is not working for a particular Argon, but it is working for another Argon, is it likely or even possible that the issue could be hardware damage to the Argon?

It's a mystery. I can't think of why that would happen. If all of the system parts (including bootloader and softdevice) are the same version, my only remaining thought is that the file system might be corrupted. This will likely have some side effects since the DCT and several configuration files are stored there.

If the Argon is not responding to particle usb types of commands, is it possible that the USB Restore or Device Doctor tools are actually not succeeding fully restoring the Argon, but are also not displaying any error messages?

Yes, that is a possibility. That's why the SWD device restore might be necessary.

This is unnecessary, but a fun fact: On nRF52 devices you can copy the entire internal flash from one device to another device of the same type and it works properly. Using a Segger J/LINK it's just four commands that take maybe 10 seconds to run:

// On source device
nrfjprog -f NRF52 --readcode backupcode.hex
nrfjprog -f NRF52 --readuicr backupuicr.hex

// On destination device
nfrjprog -f NRF52 --program backupuicr.hex --chiperase
nfrjprog -f NRF52 --program backupcode.hex

OK. So for SWD/JTAG device restore, I just use the Device Restore JTAG tool right?

Since I already tried this before and it didn't solve the problem, I'm guessing maybe the problem is that I need to erase the external flash?

How do I do that?

Possible Clue - Unplugging Device Effect on Other Devices

Here is what my cmd terminal shows me with and without this problematic Argon connected along with a working Argon and an Electron:

  • With problematic Argon plugged in, other two devices not listed in particle usb list command
  • When problematic Argon gets unplugged, the other two device pop back up when using particle usb list command

OK, that's good information. I'm now leaning toward hardware failure. An odd failure mode for sure.

Update: if I try the troublesome Argon on my colleagues' computer, I get different results (it works!)

This leaves me with the following questions:

  • Why does the particle usb list command fail if you are not logged in to Particle CLI? Why is this command sending an HTTP request to the Particle servers?

  • The Argon working as expected on my colleague's laptop means that the troublesome Argon has no hardware damage, right?

  • If its not a hardware problem, then it means that its a software problem, right?

  • If it is a software problem, then the problem likely lies in the way that USB devices are being identified or enumerated right?

  • If it is a USB device identification/enumeration problem, then are the following the only possible software culprits? Are there any modalities within each culprit that are not identified here?

    • Windows OS
      • different remembered USB device history/configuration
    • Particle CLI
      • different Particle CLI installations/dependencies
      • local cached Particle CLI device history
      • different USB drivers installed
    • Particle OS
      • different firmware/OS USB drivers
  • Does Particle CLI cache device information locally after device gets disconnected from the computer?

    • In other words, would Particle CLI treat the device the same on my colleagues computer as it does on my computer (given that I have previously connected it to my compute, but my colleague hasn't)?
  • Is there a way to get Windows to completely forget about a USB device and treat it as though it has never been connected before the next time you plug it back in?

If it works on a different computer, that's a different problem entirely, and actually makes more sense.

The "bad" device is associated with the old Particle device driver for Windows, which does not work properly or reliably on current versions of Windows. It's a pain to fix, but it is possible following these instructions.

I went into Windows Device manager, and clicked "view hidden devices". I then went through each device listed in the following Ports section as well as in the Universal Serial Bus controllers sections that was either a Particle Device, or else was a device that I'm not currently using, right-clicked, and selected "Uninstall device"

Now the troublesome Argon works as expected.

This appears to be the same advice that you just posted the link to; Windows 10 device drivers | Troubleshooting | Particle

Thanks for your help!

1 Like