# Photon could not connect to cloud after the safe mode

**URL:** <https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197>\
**Category:** Troubleshooting\
**Created:** [September 7, 2015, 7:00pm UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197 "2015-09-07T19:00:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![helxsz](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helxsz](https://community.particle.io/u/helxsz)\
**Post date:** [September 7, 2015, 7:00pm UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/1 "2015-09-07T19:00:43Z")

</div>

I have a photon, a application firmware has resided in it. Now I want to replace with a new application firmware, so I make the photon into the safe mode, after the mega color, the photon starts to blink green and then blink cyan, but never into the cloud with breathing cyan. I figured out that might be because the WIFI network is different from last time, so I manually configured the WIFI network and password into the photon, tried the safe mode again, but still it didn’t work, just blink cyan and never breath cyan

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [September 7, 2015, 7:23pm UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/2 "2015-09-07T19:23:56Z")

</div>

What does your new code do?  
Could _it_ be the reason for this behaviour?

Do you see this behaviour after each (button) reset or only after flashing new code?

---

<div class="post-metadata">

**Author:** ![helxsz](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helxsz](https://community.particle.io/u/helxsz)\
**Post date:** [September 7, 2015, 7:25pm UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/3 "2015-09-07T19:25:20Z")

</div>

Now the problem is the photon could not connect to the cloud to load the new application firmware

---

<div class="post-metadata">

**Author:** ![HobbyGuy](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@HobbyGuy](https://community.particle.io/u/HobbyGuy)\
**Post date:** [September 7, 2015, 9:14pm UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/4 "2015-09-07T21:14:15Z")

</div>

I’m having this problem also. I just got my photon. I successfully used the “blink an led” example and a thermistor example. Then I tried sending over some other code that the photon didn’t like. I got the SOS code followed by 5 red blinks. When I put the device in safe mode, I can’t flash any code to it. thoughts?

---

<div class="post-metadata">

**Author:** ![helxsz](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helxsz](https://community.particle.io/u/helxsz)\
**Post date:** [September 8, 2015, 2:34am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/5 "2015-09-08T02:34:19Z")

</div>

now after the safe mode, I just can’t connect to the cloud, always blinking cyan. can I try reset, but I read the post saying never try reset

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [September 8, 2015, 5:59am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/6 "2015-09-08T05:59:32Z")

</div>

Reset is fine, but Factory Reset won’t do any good 😉

Just a stab in the dark:  
To exclude some possible router quirks, you might also want to keep your device disconnected (unpowered) for a while after flashing.  
At least this does help on one of my routers.

---

<div class="post-metadata">

**Author:** ![helxsz](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helxsz](https://community.particle.io/u/helxsz)\
**Post date:** [September 8, 2015, 6:17am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/7 "2015-09-08T06:17:49Z")

</div>

Now the possible issue is that the photon is connected to a old WIFI hotspot network generated from mobile 4G where the internet access is not available. so i tried to connect the photon to a new wifi network by changing the wifi network name and password, I let the photon into the listensing mode, input the new WIFI network and password, then the particle still blinks the blue and prints out some serial output from my old firmware. it seems that the new WIFI network and password is not saved into the particle. I did one experiment that close the old WIFI hotpot network, and the photon just blink the green and never the cyan. Why can’t i wipe out the old WIFI network and password

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [September 8, 2015, 6:26am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/8 "2015-09-08T06:26:24Z")

</div>

First, you should not need to wipe old WiFis. When they are not present, the Photon will just realize and move on to the next stored WiFi (how many depends on SSID and PWD length and some other internal factors).

But if you want to reset the stored WiFis, you could either do this via code (`WiFi.clearCredentials()`), or more “conveniently” by holding down the SETUP button (while the Photon is already running) for about 10sec, till the RGB LED goes steady blue.

After that, your Photon will always boot into listening mode, till you provide good credentials.

---

<div class="post-metadata">

**Author:** ![helxsz](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helxsz](https://community.particle.io/u/helxsz)\
**Post date:** [September 8, 2015, 6:48am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/9 "2015-09-08T06:48:30Z")

</div>

Thanks, but these the steps I did many times, the old password can’t be replaced for some reason. perhaps it is because of the firmware running in the photon is SEMI\_AUTOMATIC mode, I don’t know, so frustrating …

---

<div class="post-metadata">

**Author:** ![helxsz](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helxsz](https://community.particle.io/u/helxsz)\
**Post date:** [September 8, 2015, 6:53am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/10 "2015-09-08T06:53:45Z")

</div>

what is the last resort I could try ? factory reset ?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [September 8, 2015, 6:59am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/11 "2015-09-08T06:59:02Z")

</div>

That’s odd, it should work - no matter what code you’re running.

I’ve just tried on my own Photon with a `MANUAL` and a `SEMI_AUTOMATIC` sketch and it works, with the one difference (at least for `MANUAL`), that I had to put the Photon into Safe Mode, then in Safe Mode press and hold SETUP again for 10sec (till the LED flashes rapid blue - not steady blue tho’) and after that all my WiFis were gone.  
The original sketch still started as before the procedure, but entering Safe Mode again, now always ends up in Listening Mode.

Factory Reset won’t clear your application firmware, but will clear the WiFis.

But it’s not your last resort. You could also use USB to flash new code via CLI or provide credentials via CLI or serial monitor.

---

<div class="post-metadata">

**Author:** ![helxsz](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helxsz](https://community.particle.io/u/helxsz)\
**Post date:** [September 8, 2015, 7:04am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/12 "2015-09-08T07:04:01Z")

</div>

can you tell me how to use USB to flash new code? I think this probably works

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [September 8, 2015, 7:11am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/13 "2015-09-08T07:11:59Z")

</div>

Have you got `Particle CLI` installed?  
If not, you’d need to follow these instructions  
[https://docs.particle.io/guide/tools-and-features/cli/](https://docs.particle.io/guide/tools-and-features/cli/)

And once you’ve got CLI, you could use any of the commands here  
[https://docs.particle.io/reference/cli/#particle-flash](https://docs.particle.io/reference/cli/#particle-flash)

Most useful to resurrect a bodged device might be this one  
`particle flash --usb tinker`  
which just reflashes the factory Tinker firmware

---

<div class="post-metadata">

**Author:** ![helxsz](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helxsz](https://community.particle.io/u/helxsz)\
**Post date:** [September 8, 2015, 7:15am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/14 "2015-09-08T07:15:10Z")

</div>

i have them installed , but not used particle flash --usb tinker before, is tinker the firmware,which i can download from the dashboard ?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [September 8, 2015, 7:19am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/15 "2015-09-08T07:19:13Z")

</div>

> [@helxsz](#):
>
> download from the dashboard ?

I must confess I've not used the dashboard, but I'd guess so.  
Can you provide a link for the dashboard where you'd download it?

---

<div class="post-metadata">

**Author:** ![helxsz](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helxsz](https://community.particle.io/u/helxsz)\
**Post date:** [September 8, 2015, 7:20am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/16 "2015-09-08T07:20:55Z")

</div>

![](https://community.particle.io/uploads/particle/original/c/b/cbd3685907b2c9e0c79609058b6cae38073d22e7.png)

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [September 8, 2015, 7:22am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/17 "2015-09-08T07:22:09Z")

</div>

I see, you are refering to `Particle Build` (aka Web IDE), since the dashboard I know is something different 😉

---

<div class="post-metadata">

**Author:** ![helxsz](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helxsz](https://community.particle.io/u/helxsz)\
**Post date:** [September 8, 2015, 7:31am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/18 "2015-09-08T07:31:31Z")

</div>

i tried to load the firmware through usb,

> particle flash --usb firmware.bin  
> Found DFU device 2b04:d006  
> checking file firmware.bin  
> spawning dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D firmware.bin  
> dfu-util 0.8

> Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.  
> Copyright 2010-2014 Tormod Volden and Stefan Schmidt  
> This program is Free Software and has ABSOLUTELY NO WARRANTY  
> Please report bugs to [dfu-util@lists.gnumonks.org](mailto:dfu-util@lists.gnumonks.org)

> dfu-util: Invalid DFU suffix signature  
> dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!  
> Opening DFU capable USB device...  
> ID 2b04:d006  
> Run-time device DFU version 011a  
> Claiming USB DFU Interface...  
> Setting Alternate Setting #0 ...  
> Determining device status: state = dfuIDLE, status = 0  
> dfuIDLE, continuing  
> DFU mode device DFU version 011a  
> Device returned transfer size 4096  
> DfuSe interface name: "Internal Flash "  
> Downloading to address = 0x080a0000, size = 80876  
> Download [=========================] 100% 80876 bytes  
> Download done.  
> File downloaded successfully  
> dfu-util: Error during download get\_status

> Error writing firmware...

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [September 8, 2015, 7:56am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/19 "2015-09-08T07:56:17Z")

</div>

This error message doesn’t usually mean anything - I always get it, but the firmware works.

But just to be sure that you get a working firmware on your device to test your connection issue, I’d still recommend to use this command  
`particle flash --usb tinker`

---

<div class="post-metadata">

**Author:** ![helxsz](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@helxsz](https://community.particle.io/u/helxsz)\
**Post date:** [September 8, 2015, 9:54am UTC](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197/20 "2015-09-08T09:54:43Z")

</div>

ok, now I tried the led\_blink example, and connects it to my local server. my local server shows the photon is connected, but the photon is breathing the maga color rather than cyan. wield for me .

[Next page](https://community.particle.io/t/photon-could-not-connect-to-cloud-after-the-safe-mode/15197.md?page=2)
