Photon could not connect to cloud after the safe mode

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

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?

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

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?

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

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

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.

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

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.

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 …

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

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.

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

Have you got Particle CLI installed?
If not, you’d need to follow these instructions

And once you’ve got CLI, you could use any of the commands here

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

i have them installed , but not used particle flash --usb tinker before, is tinker the firmware,which i can 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?

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

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: 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…

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

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 .