Photon tries to connect to Particle-Cloud but Code says it shouldn't do that

I have some trouble with my photon. My goal is to write a simple TCP-Client, which should send Messages to my local TCP-Server, a raspberryPi. In this given enviroment, there will be no uplink. Everything is local, so i cant, and also dont want to connect to particles Cloud. I got a working code some month ago, but then this project did fall asleep due to university stuff. In this version of the code my photon would connect to my open raspberryWLAN and set up a static IP. Green breathing indicated, that this worked fine. Now, when i compile the same code, an flash the resulting binary, my photon show a different behavior: I starts falshing green, but than after a time it flashes cyan. As I understand the LED-Codes, it tries to connect to the particle-Cloud, which fails of couse.

Did something happen in the last 3 month pereventing the local use?

Sorry, I dont get you to format my code in a readable way over here, anyway here it is.

    #include "InternetButton.h"
    //enter semiautomatic mode to prevent cloud
    //create internet button object
    InternetButton b = InternetButton();
    void setup(){
    //start the button
    //set config for WiFi
    IPAddress myAddress(192,168,0,11);
    IPAddress netmask(255,255,255,0);
    IPAddress gateway(192,168,0,1);
    //this shouldnt play a role but is needed to satisfy setStaticIP
    IPAddress dns(8,8,8,8);
    //set IP
    WiFi.setStaticIP(myAddress, netmask, gateway, dns);
    // now let's use the configured IP
    void loop(){}

Could this be due to incompatibility with your application firmware and the installed system version?
In such a case the device would go into Safe Mode to auto-update the system and for that requires the cloud.
How did you compile?

But you can always update the system via USB.

I compiled via CLI, since my particle-dev didn’t want to compile.

I’ll do a update tomorrow, but first green than blue than green then blue… isnt the code for save mode, isnt it?

Safe Mode will only turn into magenta after successfully connected to the cloud, let it do that then you'll see if it is Safe Mode or not.

CLI will by default build against the latest stable system version (currently 0.5.2) unless you explicitly target an older version.
And hence I'm very inclined to stick with my earlier diagnosis.

BTW, your original color sequence was stated differently


In order to "guess" causes, you'd need to provide correct and full report of what you actually see.

Sorry, it was late yesterday, so i got somewhat unclear.

I see about 8 sec green flashing, i guess it is the “Connecting to local WiFi”-Code after that comes ca 20-30 sec magenta flashing, what i think is the “Connecting to the Particle-Cloud”-Code as it is listed in this documentation. After that it repeats itself. A magenta or any other color is never visible.

I just used

particle update

while beeing in dfu-Mode, to update my photon, as you suggested, but i still face the same problem.

Maybe it is helpfull if I tell you from code to photon everything.

  1. I wrote the Code above using die particle-dev for windows.

  2. I compiled my code using

    particle compile photon tuer

    in which “tuer” is my Project-Dir

  3. This runs without error and i end up having a file called


  4. I flash this to my Photon, by first, entering DFU mode and second using

    particle flash --usb photon_firmware_1469449100972.bin

  5. Thats it. The device will flash green (looking for a known WiFi ?) for a while and than change to cyan (finding and connecting to one, i guess, but not having internetaccess, as it is autonom network without uplink) for a longer while, an than, green again and so on.

Edit, at this point i reinstalled everything, but the probelem is this there : (

Uhm, connecting to the cloud will not flash magenta.
Magenta breathing is Safe Mode already connected to the cloud, an magenta flashing indicates OTA updates.

Could you post the output of particle serial inspect and particle identify (both in Listening Mode)?

BTW: When you have set your static IP once, you don't need to do it over and over again.

And I also tried flashing your code, and my Photon ended up breathing green, no cyan to see anywhere.

I was stupid again when i wrote magentaI meant cyan. Its like I said, magenta never shows up. Sorry on that.

I’ll post the outputs tomorrow.

And I also tried flashing your code, and my Photon ended up breathing green, no cyan to see anywhere.

Im somewhat happy, it’s not the code. Thanks!

Hi there, I’m back again to post the requested outputs.

first is from particle serial inspect

Platform: 6 - Photon Modules Bootloader module #0 - version 7, main location, 16384 bytes max size Integrity: PASS Address Range: PASS Platform: PASS Dependencies: PASS System module #1 - version 11, main location, 262144 bytes max size Integrity: PASS Address Range: PASS Platform: PASS Dependencies: PASS System module #2 - version 11, main location, 262144 bytes max size Integrity: PASS Address Range: PASS Platform: PASS Dependencies: PASS System module #1 - version 11 User module #1 - version 4, main location, 131072 bytes max size UUID: 2893B83B6B492DDD6AFF8650C8C953EB03D73AB7C52F4193EFD4F0A1690113F8 Integrity: PASS Address Range: PASS Platform: PASS Dependencies: FAIL System module #2 - version 17 empty - factory location, 131072 bytes max size

This one is from particle identify :

Your device id is 270032000547343138333038
Your system firmware version is 0.4.9

Hope you can make something out of it!
Thanks for your help!

That does in fact look as I expected, you have a failing dependency

since you are using 0.4.9 while your code wants 0.5.2 (aka Version 17) - and hence not your code is running, but Safe Mode (which demands for the cloud connection).

I thought you said you did a system firmware update, but obviously that didn't stick!
I guess you are not using the most recent CLI (particle --version should return 1.15.0 or more)

1 Like

I’m very sure I did an update, but you’re right, something is wrong. I 'll try again and report back.

I’m happy to report, that my flash is now happily breathing green. Thank you very much! I hope and think everything will work now just fine! I hope I didn’t steel to much of your time! Have a nice day!

1 Like