Photon lost connection to the cloud

hello,

i’m doing some “long term” test with the particle photon connected to the particle cloud. The firmware on the photon publish a data to the cloud every 60 seconds with the “particle.publish” function.

The photon work well for some times (a couple of days) but at a certain point it lost the connection to the cloud and start breathing green. The photon cannot recconect to the cloud by itself.

The firmrare is running on the “automatic mode” with the “system thread(enabled)”

can you help me?

thank you

bye

Is this consistent behavior? As in, does this always happen, and if so, at a fixed interval?

2 Likes

Heap fragmentation would be the first thing that springs to mind with that (kind of sparse) symptom description.

2 Likes

The problem doesn’t occour at a fixed interval, we are doing some long term test so we can give you more information

How we can solve that problem??
Thank you

@jackfantello, we can’t help you solve the problem without seeing your code. As @ScruffR pointed out it may be a heap fragmentation issue. If you are using Arduino Strings throughout your code, it could be the possible source of the problem. Other factors include the WiFi signal strength, the type of router used, your program logic, etc. You may want to consider using SYSTEM_MODE(SEMI_AUTOMATIC) to get better control of the WiFi connectivity. Which firmware version are you using?

2 Likes

i’m using 0.7.0 firmware.
the code include “adafruit-htu21df.h” and “Adafruit_MAX31865.h” library

in these days i tried to clear the code moving out from the loop every variable declaration

the code run with non problem for a couple of days but at certain time it lost connection to cloud and start blink green. The only way to reconnect the device is with a button reset

do you think that SEMI_AUTOMATIC MODE can give a better connection to the cloud?

Not really. You may need to check for possible memory leaks and heap fragmentation - as pointed out earlier.

BTW, local/automatic variables don’t contribute to heap fragmentation by themselves.