Photon lost Wi-Fi, won't setup now

I’ve had a Photon running for awhile, then it lost Wi-Fi connection and wouldn’t reconnect after a reset. I tried resetting credentials, but it won’t connect to either a WPA2 or wide open SSID. When I try connecting via the app, it fails at verifying device ownership. When I use the CLI, it never connects to the cloud. It starts blinking yellow, then switches to white. When I tried the DFU-Util’s, it never see’s the photon in DFU mode, even though it’s blinking yellow and connected via USB.

Help! :slight_smile:

Jeff.

Maybe it is not the photon, but the router: have you made any changes here (firmware update or user permission restricted)?
Have you already tried the particle device doctor via CLI?

Hey folks,

Sorry for the delay in responding, been a busy few weeks.

Yes, I’ve tried the connection doctor, no changes to the router (2 other Photon’s are working correctly), no-joy with either the app or the CLI to re-add the photon back. It errors out with trying to add the device to my account.

Any other ideas?

Before you can add your device to your account you have to have it connect to the cloud.

However unclaiming (removing from your acccount) the device for any other reason than giving it to someone else who will claim it to his account does never really help to resolve connection issues.

Having said this, have you tried Safe Mode?

You can also try to reset some settings that might have got set and stuck on your Photon with this sketch.

SYSTEM_MODE(SEMI_AUTOMATIC)

const uint32_t magicNumber = 0x000c0ffe;

void setup() {
  uint32_t check;
  EEPROM.get(0, check);
  
  WiFi.on();

  if (check != magicNumber) {
    WiFi.useDynamicIP();
    WiFi.selectAntenna(ANT_INTERNAL);
    WiFi.clearCredentials();
    EEPROM.put(0, magicNumber);
    delay(1000);
    System.reset();      
  }
  
  Particle.connect();
}

This clears your credentials once, selects the chip antenna and dynamic IP.
After that the device should enter Listening Mode and wait for you to provide WiFi credentials which I'd suggest you provide via particle serial wifi without auto-scanning.