Json WifiManager makes some Problems

Hi there,

I there. I have installed the Json WifiManager. My Problem is this:

Allways when the Wifi-Router (my Samsung Phone) disapears for a while, than the code (and I suppose also the CPU) slows deep deep down. It slows down because the ESP is allways trying to reconnect to the router. And this is a problem for me (the slowing down).

I also made a counter which counts if there is no connection.. if the counter reaches for example 3000 (3 Seconds) than it disconnects via

WiFi.disconnect();

and than I have put a second counter, which counts up until 30000 (30 Seconds), and than I manually let it reconnect via:

  if(SPIFFS.exists("/config.json")){
    const char * _ssid = "", *_pass = "";
    File configFile = SPIFFS.open("/config.json", "r");
    if(configFile){
      size_t size = configFile.size();
      std::unique_ptr<char[]> buf(new char[size]);
      configFile.readBytes(buf.get(), size);
      configFile.close();
      DynamicJsonDocument jsonBuffer(1024);
      DeserializationError error = deserializeJson(jsonBuffer, buf.get());
      if(error) 
      {
        return   ;
      } 
      else 
      {
        _ssid = jsonBuffer["ssid"];
        _pass = jsonBuffer["password"];   
        WiFi.begin(_ssid, _pass);
      }
  }
}

But if there is still no Wifi router nearby, than suddenly the config.json disapears completely... as if someone has deleted it.

My questions to you is: are the better alternatives to Json Wifimanager which makes no problems at all ?

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