Can no longer flash Photon over USB (stuck in dfu mode) , but flashing with Web IDE still works

I have a Photon that has worked well over the past few days (compiling/flashing worked fine). I am however no longer able to flash new firmware to it over USB. When I flash, the device enters dfu mode (and the light blinks yellow, as expected) and it stays in this mode with the progress bar staying at 0%. After a minute or so, it says "Unable to reconnect to the device. Try again or run particle update to repair the device" and I have to manually reset or power-cycle the board to get it out of dfu mode. However, I can still flash the Photon from the Particle Web IDE (tested with the sample "Blink an LED" program).

I followed troubleshooting steps from other discussions about similar issues:

particle serial inspect outputs the following (everything looks good):

Platform: 6 - Photon

Modules
  Bootloader module #0 - version 1100
  Size: 15.184 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS

  System part module #1 - version 3302
  Size: 244.676 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System part module #2 - version 207

  System part module #2 - version 3302
  Size: 251.604 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System part module #1 - version 3302
      Bootloader module #0 - version 1003

  User part module #1 - version 6
  Size: 4.588 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System part module #2 - version 3302

Running particle update works for the first 23%, then the progress freezes as soon as the device switches to dfu mode. Similar to above, the operation eventually times out and I have to manually reset the board.

I have also downloaded the bootloader binary from github (photon-bootloader@3.3.1+lto.bin) and manually installed it with particle flash --local photon-bootloader@3.3.1+lto.bin. This operation succeeded, but I still run into firmware flashing issues.

What else can I try? Thanks a lot

Are you using Windows? If so, my first guess is a problem with the DFU device driver.

It also would be a good thing to see if web-based DFU works.

Also you can use the Particle: Cloud Flash option from Workbench which will flash the device OTA, which is how the WebIDE works.

1 Like

Great, thanks for the quick reply. The restoration over the web-based DFU worked, and I can now compile/flash over USB again. That seems to have fixed it.

For the record, I am working on Ubuntu 22.04, with particle --version 3.32.5. I typically compile/flash directly with Workbench in VSCode, or straight from the command line.