I'm trying to test the Wifimanager library but using the example "basic", i found the following error message!
Does anybody have the same issue?
In file included from C:\Users\Carlos\Documents\Arduino\libraries\WiFiManager/WiFiManager.h:96,
from C:\Windows\Temp\arduino_modified_sketch_275231\Basic.ino:1:
C:\Users\Carlos\Documents\Arduino\libraries\WiFiManager/strings_en.h:348:46: error: 'CONFIG_ESP32_PHY_MAX_TX_POWER' was not declared in this scope
const wifi_country_t WM_COUNTRY_US{"US",1,11,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Carlos\Documents\Arduino\libraries\WiFiManager/strings_en.h:348:46: note: suggested alternative: 'CONFIG_ESP_PHY_MAX_TX_POWER'
const wifi_country_t WM_COUNTRY_US{"US",1,11,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIG_ESP_PHY_MAX_TX_POWER
C:\Users\Carlos\Documents\Arduino\libraries\WiFiManager/strings_en.h:349:46: error: 'CONFIG_ESP32_PHY_MAX_TX_POWER' was not declared in this scope
const wifi_country_t WM_COUNTRY_CN{"CN",1,13,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Carlos\Documents\Arduino\libraries\WiFiManager/strings_en.h:349:46: note: suggested alternative: 'CONFIG_ESP_PHY_MAX_TX_POWER'
const wifi_country_t WM_COUNTRY_CN{"CN",1,13,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIG_ESP_PHY_MAX_TX_POWER
C:\Users\Carlos\Documents\Arduino\libraries\WiFiManager/strings_en.h:350:46: error: 'CONFIG_ESP32_PHY_MAX_TX_POWER' was not declared in this scope
const wifi_country_t WM_COUNTRY_JP{"JP",1,14,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Carlos\Documents\Arduino\libraries\WiFiManager/strings_en.h:350:46: note: suggested alternative: 'CONFIG_ESP_PHY_MAX_TX_POWER'
const wifi_country_t WM_COUNTRY_JP{"JP",1,14,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIG_ESP_PHY_MAX_TX_POWER
#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
void setup() {
WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP
// put your setup code here, to run once:
Serial.begin(115200);
// WiFi.mode(WiFi_STA); // it is a good practice to make sure your code sets wifi mode how you want it.
//WiFiManager, Local intialization. Once its business is done, there is no need to keep it around
WiFiManager wm;
//reset settings - wipe credentials for testing
//wm.resetSettings();
// Automatically connect using saved credentials,
// if connection fails, it starts an access point with the specified name ( "AutoConnectAP"),
// if empty will auto generate SSID, if password is blank it will be anonymous AP (wm.autoConnect())
// then goes into a blocking loop awaiting configuration and will return success result
bool res;
res = wm.autoConnect(); // auto generated AP name from chipid
// res = wm.autoConnect("AutoConnectAP"); // anonymous ap
// res = wm.autoConnect("AutoConnectAP","password"); // password protected ap
if(!res) {
Serial.println("Failed to connect");
// ESP.restart();
}
else {
//if you get here you have connected to the WiFi
Serial.println("connected...yeey :)");
}
}
void loop() {
// put your main code here, to run repeatedly:
}