Can we set the particle device in dfu mode via usb serial communication?

So I am trying to setup Continuous Integration for our project using electron. The idea is, when there is pull request for new code, it will trigger internal build and flash the binary into the device.

However, if we want to flash via usb, it will give this error:
particle flash --usb ./electron_firmware.bin

!!! I was unable to detect any devices in DFU mode

Is there anyway we can setup the device in DFU mode remotely? Without physically pressing and holding of the RESET and MODE button.

You can use particle usb dfu for that

Or just try particle help this will render a command usb which in turn gives this

>particle help usb
Control USB devices
Usage: particle usb <command>
Help:  particle help usb <command>

  list             List the devices connected to the host computer
  start-listening  Put a device into the listening mode
  listen           alias for start-listening
  stop-listening   Make a device exit the listening mode
  safe-mode        Put a device into the safe mode
  dfu              Put a device into the DFU mode
  reset            Reset a device
  setup-done       Set the setup done flag
  configure        Update the system USB configuration
1 Like

Great, thank you @ScruffR, it works!
I love this forum :slight_smile:

1 Like