Blocking Particle.connect() and publish()

@Vitesze, have you experienced an Electron doing this when using
if (waitFor(Particle.connected, 180000)) in Threaded + Manual Modes?

I'm asking because I have Electrons deployed in a similar situation (very sensitive to wasting battery power) and haven't noticed this. But as I said before, I don't have near as many deployed as you do.

I step through the modem connect/disconnect process with "safe" delays (seen here), but I've also read where that shouldn't be necessary.
Maybe you need the "safe" delays with the Particle.process() calls?
1 Sec Delay after each action => for (uint32_t ms = millis(); millis() - ms < 1000; Particle.process());

Here's my Generic Flow for 1-shot Manual Mode:

 Cellular.on / 1 Sec / Particle.connect / 10 Sec /
      / waitFor Timeout / Publish / 5 Sec /
 Particle.disconnect / 1 Sec /  Cellular.off / 1 Sec /  Deep Sleep

I even tried disconnecting the Cellular antenna during the connection process many times and could never get the Electron to hang-up and not go to sleep.
This Code Flow "should" mitigate your RSSI issues at the problem sites (similar to no antenna).

2 Likes