Photon 2 is repaired/updated/setup and then restarting device gets stuck in listening mode

I manage a fleet of 100+ Photon 2 devices used by students across multiple classes. I’ve configured these successfully for years using Device Doctor, Setup, and Restore.

Current issue (seen on dozens of devices):

  • Device completes setup, breathes cyan, and responds to Console → Signal and Ping successfully

  • Device is marked as Development in the Particle console

  • After a power cycle or reset, the device consistently boots into Listening Mode (blinking dark blue) instead of reconnecting

This behavior occurs regardless of provisioning method (Device Doctor, Setup, or Restore).

Additional context:

  • Firmware auto-update no longer moves devices from v4 → v5, though version isn’t critical for our use case

  • Custom firmware is minimal (Wi-Fi setup plus hotspot fallback for classroom reliability)

Question:
What would cause Photon 2 devices to repeatedly revert to Listening Mode after a successful cloud connection, and what is the recommended way to reset, re-claim, or stabilize them at scale so students can program them normally?

UPDATE: One of the Photon 2s just did this again and after about 2 min started blinking green and then booted properly. It’s almost as if it’s not immediately finding the wifi credentials stored in memory and it’s pausing the boot sequence?

That's not a known issue. The best way to troubleshoot this is to enable trace logging in your firmware.

SerialLogHandler logHandler(LOG_LEVEL_TRACE);

When the problem occurs, capture a USB serial debugging log to see what the device is doing. This might be tricky because you might lose log messages before you can connect by USB serial.

One solution is to wait for serial connected at the beginning of setup, but this will also delay operation when the USB serial debug is not connected.

void setup() {
  waitFor(Serial.isConnected, 10000); 
  delay(2000);
  // ... rest of your code