I am on a Spark Core, and had been having connection problems, but since removed all delay()'s from my code, and it seems to connect faster, and stays connected sort of. The problem is although the led shows breathing cyan which means it is connected to clound, but if I run “particle list” it shows offline and I cannot OTA. I could understand if something in my code got hung or such, (using DallasTemps), but then I would expect the whole unit to freeze and not keep breathing cyan.
It might be. Try flashing tinker and see if it is still listed as offline.
I would expect the tinker to work, but that doesn’t really help me since it doesn’t explain why my code does this, and how to prevent it. Also flashing tinker isn’t so easy, since I will have to revert to factory, and redo wifi credentials, etc, since I can’t flash OTA.
Why do you have to revert to factory reset? You can simply flash the tinker firmware…
For that, you could use the CLI if you’ve got that installed. You can flash your device over USB in DFU mode, which would allow you to reprogram it without requiring a connection.
I have the exact same issue,
It has become apparent after I added some code into my program to ping the local router and if the ping fails then System.sleep(DEEP_SLEEP, 5) Essentially its a 5 second delayed reset.
This solution works well enough to keep the photon online, but now every once in a while the score goes off line, yet the LED is breathing Cyan.
My current solution is to just walk over and reset it. Then everything works fine until the next crash.