Not able to flash the code in Particle Photon

Hello,

I’m not able to flash code in my particle photon device.

The device was working fine. But suddenly it stopped working. Even the particle android app is showing the device as offline.

I have tried below things

  1. Setting the photon Wi-Fi again.
  2. Unclaiming and Claiming the device.
  3. I flashed the firmware again using ‘particle update’ command in CLI window.

I can change the device’s wifi credentials but not able to download the code from cloud.

what should be the problem?

Are you able to do so in Safe mode?

Thanks @kennethlimcp

I tried couple of things, but at last I put the photon in DFU mode and using CLI, DFU-UTIL and Particle-Dev. I compiled the code and flashed into the photon using command ‘particle flash --usb firmware.bin’ (Compile online, flash locally )
and It started working.

Problem was that, it had some issue while connecting with the cloud. But once I flashed code using CLI, it started accepting code changes from cloud as well.