My PHOTON can't login cloud

Hello all.
In this week, I got first PHOTON and I enjoy it.
When I try to use OSC(local network) , PHOTON get lost Wifi connection …
After that I did my best ,although I can’t repair it…

The current situation in the following
My mac is OSX 10.10.5
My PHOTON is flashing Slow Cyan now
1, At first ,I tried reset.

sudo dfu-util -l
dfu-util -d 2b04:d006 -a 0 -s 0x8020000 -D system-part1-0.5.2-photon.bin
dfu-util -d 2b04:d006 -a 0 -s 0x8060000:leave -D system-part2-0.5.2-photon.bin

2, and update firmware

spark flash --usb cc3000
spark flash --usb tinker

3,next,login

particle setup

But my PHOTON can’t login cloud.
when I triy reset and update firmware. I delete my PHOTON form cloud (Particle Devices) …
I guess that is reason…

I am not English native and programmer…
Please help me.
Best regards

This only applied to the Spark Core but not to the Particle Photon.

In order to reapply your WiFi credentials most of the above is not required.

Just power up your device, press and hold SETUP for 10+ sec till you see rapid blue flashing - this erases any stored credentials.
After that use

particle serial wifi

and I’d recommend not to use the auto-scan features but enter your SSID, enc-type and PW manually.

If you still got issues try posting a video of your RGB LED codes here

Thanks ScruffR.
I did particle serial wifi and I set SSID, pass word.
My PHOTON keep flashing cyan and sometime flash green…

Any chance there are also blinks of orange in between?
If at all possible, please try to make a short video of the colors, since that’s infinitely more easy than trying to describe them.

1 Like

It seems your device can make it onto your WiFi network but can’t communicate with the cloud.
Can you check your firewall if CoAP port 5683 is open, your network is 2.4GHz, you’re not using a captive portal (landing page, splash page)?

You can also try this code to see where exactly your device gets stuck

STARTUP(WiFi.selectAntenna(ANT_INTERNAL))
SYSTEM_MODE(MANUAL)


void setup() 
{
  uint32_t ms;
  WiFiAccessPoint ap[5];

  Serial.begin(115200);
  pinMode(D7, OUTPUT);
  // connect via serial terminal and press any key to send data
  while(Serial.read() < 0 && millis() < 20000) digitalWrite(D7, (millis() >> 2) % 0x88);

  digitalWrite(D7, HIGH);
  Serial.print("WiFi.on()");
  ms = millis();
  WiFi.on();
  Serial.printlnf(" took %.1f sec", (millis()-ms)/1000.0);
  digitalWrite(D7, LOW);
  delay(100);

  // make sure we use dynamic IP
  WiFi.useDynamicIP();
  Serial.print("Known WiFi networks");
  for (int i = WiFi.getCredentials(ap, 5)-1; i >= 0; i--) 
  {
    Serial.printlnf("  ssid: %s", ap[i].ssid);
  }

  digitalWrite(D7, HIGH);
  Serial.print("WiFi.connect()");
  ms = millis();
  WiFi.connect();
  Serial.printlnf(" took %.1f sec", (millis()-ms)/1000.0);
  digitalWrite(D7, LOW);
  delay(100);

  digitalWrite(D7, HIGH);
  Serial.print("waitUntil(WiFi.ready)");
  ms = millis();
  waitUntil(WiFi.ready);
  Serial.printlnf(" took %.1f sec", (millis()-ms)/1000.0);
  digitalWrite(D7, LOW);
  delay(100);
  
  Particle.process(); // allow for internal transfer of WiFi data
  Serial.print("localIP "); Serial.println(WiFi.localIP());
  Serial.print("gatewayIP "); Serial.println(WiFi.gatewayIP());

  digitalWrite(D7, HIGH);
  Serial.print("Particle.connect()");
  ms = millis();
  Particle.connect();
  Serial.printlnf(" took %.1f sec", (millis()-ms)/1000.0);
  digitalWrite(D7, LOW);
  delay(100);
  
  digitalWrite(D7, HIGH);
  Serial.print("waitUntil(Particle.connected)");
  ms = millis();
  waitUntil(Particle.connected);
  Serial.printlnf(" took %.1f sec", (millis()-ms)/1000.0);
  digitalWrite(D7, LOW);
  delay(100);

  Serial.println("Particle.connected");
}

void loop() 
{
  Particle.process();
}

Flash this via USB, then open a serial terminal like PuTTY, send one byte to the device and see what happens.
Maybe post the output here

Also, if possible, try some other WiFi network.

1 Like