Argon "blocking" loop() when WiFi AP goes down?

Unsure why the loop() operation would block when my AP goes down?
What am I missing?

#include "Particle.h"

SYSTEM_MODE(AUTOMATIC); // default, but explicitly declared
SYSTEM_THREAD(ENABLED);

uint32_t now;
uint32_t lastMsg;

void setup() {}

void loop() 
{
  now = millis();
  if (now - lastMsg > 100)
  {
     Serial.printlnf("100 ms of loop / %d", now);
     lastMsg = now;
  }
}

Additional info bullets:

  • DevOS v1.5.2
  • Ubiquiti AC Pro AP that I can gate on/off at will
  • Repeats Reliably / Runs for ~3 secs / Blocks for ~2 secs
  • Single WiFi provisional instance in Argon (can’t failover to router WiFi when AP is off)

I believe this is fixed in 2.0.0. The problem in 1.5.x and earlier is a thread priority issue where the networking thread is blocked (AP down) and has a higher priority than the application thread, so the application thread stops running. In 2.0.0 the blocking wait is no longer done in the networking thread, so the application can continue to run freely.

That was my next tactic, to rebuild in different Dev OS versions…
Appreciate the official confirmation, Rick.

Happy New Year!

Confirmed with upgrade to DevOS 2.0.1

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.