SYSTEM_THREAD during listen mode?

Not sure what you mean by this. The photon won't cache any publish if it's not Cloud connected. I suspect it may simply ignore the requests. I suggest you add exception code around your publishes using if (Particle.connected()) { and if not connected, buffer your data or wait for connection.

Yes, with SYSTEM_THREAD(ENABLED) loop() will keep running parallel to Listening Mode SoftAP.

… that wasn’t my observation the other night. Had serial.println’s and nothing was coming out. I’ll strip it down and check again!

Try blinking the D7 LED or similar. That is how I know it runs.

Certainly any cloud and possibly any internet connection is doubtful while in listening mode since the credentials can change. I don’t know if the USB serial runs or not since that requires some system code. I would bet that Serial1 continues.

Found the culprit.

bool mdns_success = mdns.setHostname("mydevice");
        if(mdns_success) {
            // Change "MyDevice Config" to whatever you want to name
            // the web server running on your device.  This is purely
            // ornamental and does not affect the actual web server.
            mdns.addService("tcp", "http", 80, "HTTP API");
            mdns.begin();

            Serial.println("mdns success, http 80");
        }

It was blocking the setup() from proceeding to loop.

2 Likes