I’m trying to pin down the root cause of an issue I seem to have with the Electron when there is no signal (flashing green)
With a good signal present my code runs fine (on photons and electrons), I’m using
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(AUTOMATIC);
Firmware 0.7 and I always check Particle.connected before a publish.
However with the electron unlike the highly detailed post here from @rickkas7 the Particle.connected check seems not to work, sending values to my publish routine causes loop to stop running for an extended period until I get this [system] WARN: Resetting WLAN due to WLAN_WD_TO()
If I add a cellular ready check as well like this:
void SendyMcSenderson(){
Log.info("Before Connectivity check");
char Status[255];
snprintf(Status,sizeof(Status), dooberywhatsitsgoinhere);
if (Cellular.ready() && Particle.connected)
{
Log.info("Send Values - Particle.connected");
Particle.publish("PAT",Status,PRIVATE);
}
else Log.info("We were not connected");
}
That works.
if I add a little check in the the else bit
snprintf(response,sizeof(response),"Connected : %s, Not Sent",Particle.connected() ? "True":"False");
Log.info(response);
That returns connected as false as expected, given how basic a problem this is I can’t help but feel its something truly dumb, however if there was some blocking code in my app then when a signal is present or I set Cellular.off it would also manifest itself… and it doesn’t.