Topic: MCU hangs

Hello everybody,

after testing the new assembled scale in the cold of the last days I got a consistend feedback of weight, even at -10°C. Great!
At this test the scale was just outside the wifi router and everything worked. Whenever I move the scale farer away, where my bees are, the wifi signal is weaker and the MCU hangs completely. It won't send a message nor react to config jumper anymore. It simply drains the batteries.

When I look into the firmware code I see is that it tries 10 times to get http code 200, when after 10 times not reached abort. But my feeling is right now that it freezes one step before that, whenever it tries to get a wifi connection.

The wifi.ino says

    while ((WiFi.status() != WL_CONNECTED) && ((millis() - wifiStart) < 20000))
    {
      delay(100);
      debug(String(WiFi.status()), true);
    }
    debug("");

    if (WiFi.status() != WL_CONNECTED) {
      debug("Wifi connection failed.... " + String(WiFi.status()));
      //RTCClearInterrupt(); // => switch OFF

    }

    debug("Fin wifi start : " + String(WiFi.status()));

    File logfile = SPIFFS.open("/wifilog.txt", "a");
    logfile.println("");
    logfile.println(nowStr());
    logfile.println("Fin wifi start : " + String(WiFi.status()));
    logfile.close();


    unsigned long wifiConnected;
    wifiConnected = millis();

    debug(wifiConnected);

So I'm not quite shure how the smart thing handles the not succesful connection to a wifi SSID previously configured.

Thank you and greetings!

Tobias