Git Product home page Git Product logo

wifimanager-esp32's Introduction

WiFiManager

ESP32&&ESP8266 WiFi Connection manager with fallback web configuration portal

The configuration portal is of the captive variety, so on various devices it will present the configuration dialogue as soon as you connect to the created access point.

First attempt at a library. Lots more changes and fixes to do. Contributions are welcome.

Libray

WebServer https://github.com/zhouhan0126/WebServer-esp32

DNSServer https://github.com/zhouhan0126/DNSServer---esp32

How It Looks

ESP8266 WiFi Captive Portal Homepage ESP8266 WiFi Captive Portal Configuration

Using

  • Include in your sketch
#if defined(ESP8266)
#include <ESP8266WiFi.h>          
#else
#include <WiFi.h>          
#endif

//needed for library
#include <DNSServer.h>
#if defined(ESP8266)
#include <ESP8266WebServer.h>
#else
#include <WebServer.h>
#endif
#include <WiFiManager.h>         
  • Initialize library, in your setup function add
WiFiManager wifiManager;
  • Also in the setup function add
//first parameter is name of access point, second is the password
wifiManager.autoConnect("AP-NAME", "AP-PASSWORD");

if you just want an unsecured access point

wifiManager.autoConnect("AP-NAME");

or if you want to use and auto generated name from 'ESP' and the esp's Chip ID use

wifiManager.autoConnect();

After you write your sketch and start the ESP, it will try to connect to WiFi. If it fails it starts in Access Point mode. While in AP mode, connect to it then open a browser to the gateway IP, default 192.168.4.1, configure wifi, save and it should reboot and connect.

Also see examples.

Documentation

Password protect the configuration Access Point

You can and should password protect the configuration access point. Simply add the password as a second parameter to autoConnect. A short password seems to have unpredictable results so use one that's around 8 characters or more in length. The guidelines are that a wifi password must consist of 8 to 63 ASCII-encoded characters in the range of 32 to 126 (decimal)

wifiManager.autoConnect("AutoConnectAP", "password")

Callbacks

Enter Config mode

Use this if you need to do something when your device enters configuration mode on failed WiFi connection attempt. Before autoConnect()

wifiManager.setAPCallback(configModeCallback);

configModeCallback declaration and example

void configModeCallback (WiFiManager *myWiFiManager) {
  Serial.println("Entered config mode");
  Serial.println(WiFi.softAPIP());

  Serial.println(myWiFiManager->getConfigPortalSSID());
}
Save settings

This gets called when custom parameters have been set AND a connection has been established. Use it to set a flag, so when all the configuration finishes, you can save the extra parameters somewhere.

See AutoConnectWithFSParameters Example.

wifiManager.setSaveConfigCallback(saveConfigCallback);

saveConfigCallback declaration and example

//flag for saving data
bool shouldSaveConfig = false;

//callback notifying us of the need to save config
void saveConfigCallback () {
  Serial.println("Should save config");
  shouldSaveConfig = true;
}

Configuration Portal Timeout

If you need to set a timeout so the ESP doesn't hang waiting to be configured, for instance after a power failure, you can add

wifiManager.setConfigPortalTimeout(180);

which will wait 3 minutes (180 seconds). When the time passes, the autoConnect function will return, no matter the outcome. Check for connection and if it's still not established do whatever is needed (on some modules I restart them to retry, on others I enter deep sleep)

On Demand Configuration Portal

If you would rather start the configuration portal on demand rather than automatically on a failed connection attempt, then this is for you.

Instead of calling autoConnect() which does all the connecting and failover configuration portal setup for you, you need to use startConfigPortal(). Do not use BOTH.

Example usage

void loop() {
  // is configuration portal requested?
  if ( digitalRead(TRIGGER_PIN) == LOW ) {
    WiFiManager wifiManager;
    wifiManager.startConfigPortal("OnDemandAP");
    Serial.println("connected...yeey :)");
  }
}

See example for a more complex version. OnDemandConfigPortal

Custom Parameters

You can use WiFiManager to collect more parameters than just SSID and password. This could be helpful for configuring stuff like MQTT host and port, blynk or emoncms tokens, just to name a few. You are responsible for saving and loading these custom values. The library just collects and displays the data for you as a convenience. Usage scenario would be:

  • load values from somewhere (EEPROM/FS) or generate some defaults
  • add the custom parameters to WiFiManager using
// id/name, placeholder/prompt, default, length
WiFiManagerParameter custom_mqtt_server("server", "mqtt server", mqtt_server, 40);
wifiManager.addParameter(&custom_mqtt_server);
  • if connection to AP fails, configuration portal starts and you can set /change the values (or use on demand configuration portal)
  • once configuration is done and connection is established save config callback is called
  • once WiFiManager returns control to your application, read and save the new values using the WiFiManagerParameter object.
mqtt_server = custom_mqtt_server.getValue();

This feature is a lot more involved than all the others, so here are some examples to fully show how it is done. You should also take a look at adding custom HTML to your form.

  • Save and load custom parameters to file system in json form AutoConnectWithFSParameters
  • Save and load custom parameters to EEPROM (not done yet)

Custom IP Configuration

You can set a custom IP for both AP (access point, config mode) and STA (station mode, client mode, normal project state)

Custom Access Point IP Configuration

This will set your captive portal to a specific IP should you need/want such a feature. Add the following snippet before autoConnect()

//set custom ip for portal
wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));
Custom Station (client) Static IP Configuration

This will make use the specified IP configuration instead of using DHCP in station mode.

wifiManager.setSTAStaticIPConfig(IPAddress(192,168,0,99), IPAddress(192,168,0,1), IPAddress(255,255,255,0));

There are a couple of examples in the examples folder that show you how to set a static IP and even how to configure it through the web configuration portal.

Custom HTML, CSS, Javascript

There are various ways in which you can inject custom HTML, CSS or Javascript into the configuration portal. The options are:

  • inject custom head element You can use this to any html bit to the head of the configuration portal. If you add a <style> element, bare in mind it overwrites the included css, not replaces.
wifiManager.setCustomHeadElement("<style>html{filter: invert(100%); -webkit-filter: invert(100%);}</style>");
  • inject a custom bit of html in the configuration form
WiFiManagerParameter custom_text("<p>This is just a text paragraph</p>");
wifiManager.addParameter(&custom_text);
  • inject a custom bit of html in a configuration form element Just add the bit you want added as the last parameter to the custom parameter constructor.
WiFiManagerParameter custom_mqtt_server("server", "mqtt server", "iot.eclipse", 40, " readonly");

Filter Networks

You can filter networks based on signal quality and show/hide duplicate networks.

  • If you would like to filter low signal quality networks you can tell WiFiManager to not show networks below an arbitrary quality %;
wifiManager.setMinimumSignalQuality(10);

will not show networks under 10% signal quality. If you omit the parameter it defaults to 8%;

  • You can also remove or show duplicate networks (default is remove). Use this function to show (or hide) all networks.
wifiManager.setRemoveDuplicateAPs(false);

Debug

Debug is enabled by default on Serial. To disable add before autoConnect

wifiManager.setDebugOutput(false);

Contributions and thanks

The support and help I got from the community has been nothing short of phenomenal. I can't thank you guys enough. This is my first real attept in developing open source stuff and I must say, now I understand why people are so dedicated to it, it is because of all the wonderful people involved.

THANK YOU

Shawn A

Maximiliano Duarte

alltheblinkythings

Niklas Wall

Jakub Piasecki

Peter Allan

John Little

markaswift

franklinvv

Alberto Ricci Bitti

SebiPanther

jonathanendersby

walthercarsten

Sorry if i have missed anyone.

Inspiration

wifimanager-esp32's People

Contributors

zhouhan0126 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wifimanager-esp32's Issues

How to get the saved AP SSID or the connected SSID ,to, reuse and reconnect?

Hello All,
I just started tinkering with the library and use it in my project where I would like to reconnect to the device in case it loses connection.
I am exploring the methods WiFi.begin(ssid, pass) and WiFi.reconnect() in loop.

But suppose it has been set freshly or started after timeout of config page without connecting. It wont reconnect.

I am not able to use wifiManager.getSSID() as it somehow gives error as" 'class WiFiManager' has no member named 'getSSID' ".
My code is as below:

`#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h> //copiedota
#include <ESPmDNS.h> //copiedota
#include <Update.h> //copiedota

//#if defined(ESP8266)//wifimanager
//#include <ESP8266WiFi.h>
//#else
//#include <WiFi.h>
//#endif

//needed for library
#include <DNSServer.h>
//#if defined(ESP8266)
//#include <ESP8266WebServer.h>
//#else
//#include <WebServer.h>
//#endif
#include <WiFiManager.h>
#include <ArduinoJson.h> // https://github.com/bblanchon/ArduinoJson
//wifimanager

#include <BlynkSimpleEsp32.h>
BlynkTimer timer;

#define DEBUG_SW 1
int MODE = 0;
bool connected_once = false;

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "**********";

// Your WiFi credentials.
const char* host = "shariqESP"; //copiedota
// Set password to "" for open networks.
char ssid[] = "rm7pro";
char pass[] = "******";//same all accross

void setup()
{
// put your setup code here, to run once:

Serial.begin(9600);

//WiFiManager
//Local intialization. Once its business is done, there is no need to keep it around
WiFiManager wifiManager;
//reset settings - for testing
//wifiManager.resetSettings();

//sets timeout until configuration portal gets turned off
//useful to make it all retry or go to sleep
//in seconds
wifiManager.setTimeout(60);

//fetches ssid and pass and tries to connect
//if it does not connect it starts an access point with the specified name
//here "AutoConnectAP"
//and goes into a blocking loop awaiting configuration
wifiManager.setDebugOutput(true);

//set custom ip for portal
//wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));

Serial.println("start");
// Serial.println( wifiManager.getSSID());
// Serial.println( WiFi.getSSID());
//Serial.println( wifiManager.getSSID() );

if(!wifiManager.autoConnect("AutoConnectAP")) {
Serial.println("failed to connect and hit timeout");
delay(3000);
//reset and try again, or maybe put it to deep sleep
//ESP.restart();
//delay(5000);
}
Serial.printf("SSID0: %s\n", WiFi.SSID().c_str());
Serial.println("SSID00: " + (String)wifiManager.getSSID());

String saved_ssid =WiFi.SSID().c_str();

// Length (with one extra character for the null terminator)
int str_len = saved_ssid.length() + 1;

// Prepare the character array (the buffer)
char char_array[str_len];

// Copy it over
saved_ssid.toCharArray(char_array, str_len);
Serial.println( ssid);
strcpy(ssid , char_array);
Serial.println( ssid);

WiFi.begin(ssid, pass);
if (WiFi.status() != WL_CONNECTED)
{
connected_once = true;
}

}

void loop()
{
Serial.println("Loop started");
if (WiFi.status() != WL_CONNECTED)
{
if (DEBUG_SW) Serial.println("Not Connected");

if( connected_once == true){
  Serial.println("Reconnecting");
WiFi.reconnect();
}
else{
  Serial.println("Re-attempting to connect");
  WiFi.begin(ssid, pass);
  }

}
else
{
if (DEBUG_SW) Serial.println(" Connected");
//Blynk.run();
}

delay(400); //custom

if (MODE == 0)
with_internet();
else
without_internet();
// put your main code here, to run repeatedly:
}

`

Text in Message after attempt to connect to WiFi

Hi,

I am trying to change the message that appears after wifimanager tries to connect. Currently there is a typo and I want to fix or even change the message. I have tried to search for the words but no luck. Can you advise which file to amend? Currently the message is:

Weread to network if it fails reconnect to AP to try again.

'SPIFFS' was not declared in this scope

Hello,

I tried compiling one of the example sketches but gets the following compiler error

WifiManager.ino: 178:21: error: 'SPIFFS' was not declared in this scope File configFile = SPIFFS.open("\config.json", "w") Error compiling project sources Build failed for project 'WifiManager'

I have the latest libraries and Arduino ESP32 core fram what I know

Any clue?

Compilation error: 'unique_ptr' in namespace 'std' does not name a template type

Here is my script (just trying to get this to work with esp32).

Error is below. I think that majority of it is traced back to an error which is something like 'function' in namespace 'std' does not name a template type where you can replace function with uniq_pointer or one or two other things. I saw that this is usually a problem when #include <memory> is not included, but I have checked and this is not the case for any of the libraries there error is occurring in.

Arduino: 1.6.7 (Windows 10), Board: "WEMOS LOLIN32, 80MHz, Default, 921600"

In file included from G:\Google Drive\Arduino\libraries\WiFiManager/memory:50:0,

                 from G:\Google Drive\Arduino\fthis\fthis.ino:1:

g:\google drive\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\tr1\shared_ptr.h:329:37: error: expected ')' before '<' token

         __shared_count(std::auto_ptr<_Tp>& __r)

                                     ^

g:\google drive\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\tr1\shared_ptr.h:591:35: error: expected ')' before '<' token

         __shared_ptr(std::auto_ptr<_Tp1>& __r)

                                   ^

g:\google drive\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\tr1\shared_ptr.h:636:19: error: 'auto_ptr' is not a member of 'std'

         operator=(std::auto_ptr<_Tp1>& __r)

                   ^

g:\google drive\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\tr1\shared_ptr.h:636:37: error: expected primary-expression before '>' token

         operator=(std::auto_ptr<_Tp1>& __r)

                                     ^

g:\google drive\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\tr1\shared_ptr.h:636:40: error: '__r' was not declared in this scope

         operator=(std::auto_ptr<_Tp1>& __r)

                                        ^

g:\google drive\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\tr1\shared_ptr.h:636:43: error: declaration of 'operator=' as non-function

         operator=(std::auto_ptr<_Tp1>& __r)

                                           ^

g:\google drive\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\tr1\shared_ptr.h:1013:33: error: expected ')' before '<' token

         shared_ptr(std::auto_ptr<_Tp1>& __r)

                                 ^

g:\google drive\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\tr1\shared_ptr.h:1040:19: error: 'auto_ptr' is not a member of 'std'

         operator=(std::auto_ptr<_Tp1>& __r)

                   ^

g:\google drive\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\tr1\shared_ptr.h:1040:37: error: expected primary-expression before '>' token

         operator=(std::auto_ptr<_Tp1>& __r)

                                     ^

g:\google drive\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\tr1\shared_ptr.h:1040:40: error: '__r' was not declared in this scope

         operator=(std::auto_ptr<_Tp1>& __r)

                                        ^

g:\google drive\arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\tr1\shared_ptr.h:1040:43: error: declaration of 'operator=' as non-function

         operator=(std::auto_ptr<_Tp1>& __r)

                                           ^

In file included from G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WiFi\src/WiFiSTA.h:28:0,

                 from G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WiFi\src/WiFi.h:32,

                 from G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WiFi\src/ETH.h:24,

                 from G:\Google Drive\Arduino\fthis\fthis.ino:2:

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WiFi\src/WiFiGeneric.h:32:14: error: 'function' in namespace 'std' does not name a template type

 typedef std::function<void(system_event_id_t event, system_event_info_t info)> WiFiEventFuncCb;

              ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WiFi\src/WiFiGeneric.h:74:29: error: 'WiFiEventFuncCb' has not been declared

     wifi_event_id_t onEvent(WiFiEventFuncCb cbEvent, system_event_id_t event = SYSTEM_EVENT_MAX);

                             ^

In file included from G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WiFi\src/WiFi.h:37:0,

                 from G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WiFi\src/ETH.h:24,

                 from G:\Google Drive\Arduino\fthis\fthis.ino:2:

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WiFi\src/WiFiClient.h:36:10: error: 'shared_ptr' in namespace 'std' does not name a template type

     std::shared_ptr<WiFiClientSocketHandle> clientSocketHandle;

          ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WiFi\src/WiFiClient.h:37:10: error: 'shared_ptr' in namespace 'std' does not name a template type

     std::shared_ptr<WiFiClientRxBuffer> _rxBuffer;

          ^

In file included from G:\Google Drive\Arduino\fthis\fthis.ino:15:0:

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:86:16: error: 'function' in namespace 'std' does not name a template type

   typedef std::function<void(void)> THandlerFunction;

                ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:87:30: error: 'THandlerFunction' has not been declared

   void on(const String &uri, THandlerFunction handler);

                              ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:88:49: error: 'THandlerFunction' has not been declared

   void on(const String &uri, HTTPMethod method, THandlerFunction fn);

                                                 ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:89:49: error: 'THandlerFunction' has not been declared

   void on(const String &uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);

                                                 ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:89:70: error: 'THandlerFunction' has not been declared

   void on(const String &uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);

                                                                      ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:92:19: error: 'THandlerFunction' has not been declared

   void onNotFound(THandlerFunction fn);  //called when handler is not assigned

                   ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:93:21: error: 'THandlerFunction' has not been declared

   void onFileUpload(THandlerFunction fn); //handle file uploads

                     ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:177:3: error: 'THandlerFunction' does not name a type

   THandlerFunction _notFoundHandler;

   ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:178:3: error: 'THandlerFunction' does not name a type

   THandlerFunction _fileUploadHandler;

   ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:185:8: error: 'unique_ptr' in namespace 'std' does not name a template type

   std::unique_ptr<HTTPUpload> _currentUpload;

        ^

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h: In member function 'HTTPUpload& WebServer::upload()':

G:\Google Drive\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:98:34: error: '_currentUpload' was not declared in this scope

   HTTPUpload& upload() { return *_currentUpload; }

                                  ^

In file included from G:\Google Drive\Arduino\fthis\fthis.ino:16:0:

G:\Google Drive\Arduino\libraries\WiFiManager/WiFiManager.h: At global scope:

G:\Google Drive\Arduino\libraries\WiFiManager/WiFiManager.h:127:10: error: 'unique_ptr' in namespace 'std' does not name a template type

     std::unique_ptr<DNSServer>        dnsServer;

          ^

G:\Google Drive\Arduino\libraries\WiFiManager/WiFiManager.h:131:10: error: 'unique_ptr' in namespace 'std' does not name a template type

     std::unique_ptr<WebServer>        server;

          ^

exit status 1
Error compiling.


#include <ETH.h>
#include <WiFi.h>
#include <WiFiAP.h>
#include <WiFiClient.h>
#include <WiFiGeneric.h>
#include <WiFiMulti.h>
#include <WiFiScan.h>
#include <WiFiServer.h>
#include <WiFiSTA.h>
#include <WiFiType.h>
#include <WiFiUdp.h>
#include <DNSServer.h>
#include <HTTP_Method.h>
#include <WebServer.h>
#include <WiFiManager.h>




void setup(){
  Serial.begin(9600);
}

void loop(){
  Serial.println("hello");
  delay(5000);
}

Security

Hi. This is a great project. In terms of security, what is the benefit of password protecting your access point? The reasons I ask:

  1. The data is still being exchanged in the clear, isn't it?
  2. To deploy this at scale, you would have to supply the password, so that layer of security is lost.
  3. Has anyone had a crack at adding a secure key exchange to this at all? I'm willing to have a go, but it's probably beyond me...

Do a task in the waiting for connect loop

Hi, i want to do some task (turn on/off leds) when im waiting for connection parameters loops:

*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 6
*WM: SET AP STA
*WM:
*WM: Configuring access point...
*WM: MYWIFI
*WM: 12345678
*WM: AP IP address:
*WM: 192.168.4.1
***WM: HTTP server started**

i tried in different places of the code but i couldnt get it.

Thank you for your time.

Auto connection without serial link

Hello,

First of all thanks for the development it works so well.

But I'm looking for a function that I can not find, once the authentication made the ESP32 reboot but it does not connect to my router directly it waits for me to connect to the serial port, is it possible to connect directly to the boot of the ESP if it detects the network ?

AutoConnect.ino "Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled."

Hi!
When I use your example (AutoConnect.ino) without any additional code, I get an error like this:

*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 1
*WM: SET AP STA
*WM:
*WM: Configuring access point...
*WM: AutoConnectAP
*WM: AP IP address:
*WM: 192.168.4.1
*WM: HTTP server started
dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Handle root
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400014fd PS : 0x00060230 A0 : 0x800da373 A1 : 0x3ffb1c80
A2 : 0x00000020 A3 : 0x0000001c A4 : 0x000000ff A5 : 0x0000ff00
A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x00000000 A9 : 0x3ffb1be0
A10 : 0x3ffb1ca0 A11 : 0x80000000 A12 : 0x3ffb1ca0 A13 : 0x0000ff00
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x0000000a EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000020 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff

Backtrace: 0x400014fd:0x3ffb1c80 0x400da370:0x3ffb1c90 0x400da397:0x3ffb1cb0 0x400d8b1a:0x3ffb1cd0 0x40146606:0x3ffb1d30 0x400d60f3:0x3ffb1d50 0x400d6199:0x3ffb1d70 0x400d6206:0x3ffb1da0 0x400d636f:0x3ffb1df0 0x400d9605:0x3ffb1e40 0x400d9796:0x3ffb1e80 0x400d10fa:0x3ffb1ed0 0x400daceb:0x3ffb1fb0 0x40088b7d:0x3ffb1fd0

Rebooting...
ets Jun 8 2016 00:22:57

How do I fix this error?

Guru Mediation Error

Hi, I was testing the library and I was not able to place portal , keeps sending
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled

I tested only the library, nothing else at all and error still remains, when I click to go to the portal in my Cellphone.
I wonder if anybody experienced that . All I did is copy/paste from example in ESP32 DEV KIT1 module.
thanks a lot for your help in advance

Compilation issue since ESP32 Core includes Webserver

Since I updated ESP32 core including Webserver library I am experiencing following compilation error:

home/pepito/Arduino/libraries/WIFIMANAGER-ESP32/WiFiManager.h:36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol

As a work around I have deleted Webserver library from /Arduino/hardware/espressif/esp32/libraries and it compiles well but I dont think this is the orthodox way at all.

Can somebody point me out in the right direction? Thanks!!

Cant set hostname

Hello, thanks for this great work!!
On my project i tried to set the hostname, but it wont work, on others issues opened about this same subject a user posted that he solved the problem by adding the setHostName after wifi.begin, but when we use the Wifimanager, we dont have this "wifi.begin()", of course this is behind the WifiManager, but maybe need to create a sethostname on this lib? i dont know....

Here is the link about what i said above:

espressif/arduino-esp32#806

Just to confirm, i change the WifiClient example to look like this
WiFi.begin(ssid, password);
WiFi.setHostname("test");

And upload the code, the setHostname is working right, so i guess is some conflict with this lib

How to disable Config portal's "sign into WiFi" pop-up?

Hi,
I want to know how to disable the "Sign-in to WiFi" popup when I use this library. I am creating a mobile app using which I wish to configure the Wifi SSID and Password. I am able to do it by passing the parameters to the URL.
I am unable to remove the "Pop Up". Thanks and regards.

Recommendation for querying connection status

Hello. I want to start by thanking you for this wonderful library. It has saved my research group an incredible amount of time, and was very quick and intuitive to get running. I wanted to ask your recommendation. I would like to check whether my device is connected to an AP and has an IP address before running several tasks in main. How do you recommend doing this? Viewing the json data, checking the WIFI_MANAGER_WIFI_CONNECTED_BIT, or an existing esp function I haven't seen, etc. I'd just like to set it up in the least intrusive way possible to your library. Thank you!

#if defined(ESP8266)

Hi all,

I am using an ESP32, do I remove this line? What does it do?
#if defined(ESP8266)

Thanks,

Zeb

send ssid pswd after connexion via tcp ip

Hello, when we connect to the wifi esp32, when he and the mode of the station is it possible to send him the SSID and pswd without using the web page?
Via the sending of the order via tcp ip?
And it possible to create an example on this functioning

Station mode => user pairring => opening a server tcp ip (ip 192.168.4.1 port 23)
Via the computer connection to this server and sending an order
SSID: TEST PSWD: 1234
Answer: SSID PSWD Done
Reboot the esp then connect the esp on the SSID saves
I thank you because this operation would help me enormously

WIfiManager on ESP32 is not working

Hi,

I am trying to run the Autoconnect example from the wifimanager esp32.

I am getting the following error:

In file included from /Users/Sid/Documents/Arduino/libraries/WIFIMANAGER-ESP32-master/examples/AutoConnect/AutoConnect.ino:14:0:
/Users/Sid/Documents/Arduino/libraries/WIFIMANAGER-ESP32-master/WiFiManager.h:36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol
const char HTTP_HEAD[] PROGMEM = "<title>{v}</title>";
^
In file included from /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WebServer/src/WebServer.h:30:0,
from /Users/Sid/Documents/Arduino/libraries/WIFIMANAGER-ESP32-master/examples/AutoConnect/AutoConnect.ino:12:
/Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WebServer/src/HTTP_Method.h:10:3: note: previous declaration 'HTTPMethod HTTP_HEAD'
HTTP_HEAD = 0b00100000,
^
Multiple libraries were found for "WiFi.h"
Used: /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WiFi
Not used: /Applications/Arduino.app/Contents/Java/libraries/WiFi
Multiple libraries were found for "DNSServer.h"
Used: /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/DNSServer
Not used: /Users/Sid/Documents/Arduino/libraries/DNSServer---esp32-master
Multiple libraries were found for "WebServer.h"
Used: /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WebServer
Not used: /Users/Sid/Documents/Arduino/libraries/WebServer-esp32-master
exit status 1
Error compiling for board Node32s.

Lib not working on new ESP32s2

The library doesn't work on the ESP32-S2, it compiles and download but after few seconds the device connected to the AP is diconnected and cannot reach the configuration webpage.

Wifimanager don't open dialog window automaticly when connect to ESP-32 AP

Normaly a popup window comes when PC or smartphone connect to WIFIMANAGER ESP-32 in access-point mode. At my devices this feature not work. If you connect on the IP-address with a webbrowser you are able to configure WIFI, but not automaticly. After analyse packets between my Macbook and ESP32 I found there is no valid DNS-Server entry in DHCP packet. The value is alway "0.0.0.0". After hours of work I found a solution to set the entry manualy. In WiFiAP.cpp at the end around line 140 in function WiFiAPClass::softAP paste the following code:

tcpip_adapter_dns_info_t dns_info;
dns_info.ip.u_addr.ip4.addr = IPAddress(192,168,4,1);
tcpip_adapter_set_dns_info(TCPIP_ADAPTER_IF_AP, TCPIP_ADAPTER_DNS_MAIN, &dns_info);

and if you set your IP-address manualy in WiFiAPClass::softAPConfig paste around line 180:

tcpip_adapter_dns_info_t dns_info;
dns_info.ip.u_addr.ip4.addr = info.ip.addr;
tcpip_adapter_set_dns_info(TCPIP_ADAPTER_IF_AP, TCPIP_ADAPTER_DNS_MAIN, &dns_info);

So the DNS-setting in DHCP-protocol is correct and the configuration window pops up when connecting to WiFIMANAGER

is this library working?

I just get it and add it to library
and import autoconnect example and compile it.

error says


아두이노:1.8.1 (Windows 10), 보드:"ESP32 Dev Module, Disabled, Default, QIO, 80MHz, 4MB (32Mb), 115200, None"

In file included from C:\Users\jpd\Documents\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:63:0,

                 from C:\Users\jpd\Documents\Arduino\libraries\WIFIMANAGER-ESP32-master\examples\AutoConnect\AutoConnect.ino:12:

C:\Users\jpd\Documents\Arduino\hardware\espressif\esp32\libraries\WebServer\src/detail/RequestHandler.h:9:25: error: 'ESP32WebServer' has not been declared

     virtual bool handle(ESP32WebServer& server, HTTPMethod requestMethod, String requestUri) { (void) server; (void) requestMethod; (void) requestUri; return false; }

                         ^

In file included from C:\Users\jpd\Documents\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:63:0,

                 from C:\Users\jpd\Documents\Arduino\libraries\WIFIMANAGER-ESP32-master\examples\AutoConnect\AutoConnect.ino:12:

C:\Users\jpd\Documents\Arduino\hardware\espressif\esp32\libraries\WebServer\src/detail/RequestHandler.h:10:25: error: 'ESP32WebServer' has not been declared

     virtual void upload(ESP32WebServer& server, String requestUri, HTTPUpload& upload) { (void) server; (void) requestUri; (void) upload; }

                         ^

In file included from C:\Users\jpd\Documents\Arduino\libraries\WIFIMANAGER-ESP32-master\examples\AutoConnect\AutoConnect.ino:14:0:

C:\Users\jpd\Documents\Arduino\libraries\WIFIMANAGER-ESP32-master/WiFiManager.h:36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol

 const char HTTP_HEAD[] PROGMEM            = "<!DOCTYPE html><html lang=\"en\"><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\"/><title>{v}</title>";

                      ^

In file included from C:\Users\jpd\Documents\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:30:0,

                 from C:\Users\jpd\Documents\Arduino\libraries\WIFIMANAGER-ESP32-master\examples\AutoConnect\AutoConnect.ino:12:

C:\Users\jpd\Documents\Arduino\hardware\espressif\esp32\libraries\WebServer\src/HTTP_Method.h:10:3: note: previous declaration 'HTTPMethod HTTP_HEAD'

   HTTP_HEAD    = 0b00100000,

   ^

exit status 1
보드 ESP32 Dev Module 컴파일 에러.

이 리포트는 파일 -> 환경설정에 "컴파일중 자세한 출력보이기"를
활성화하여 더 많은 정보를
보이게 할 수 있습니다.

How to check to which network you are connected ?

My ESP32 connects to a WiFi Network and I have no idea which one. How can I see which one ? I've read the documentation and looked inside the wifiManager.h and .cpp files and couldn't find a function to do that.

I've never seen the web configuration portal.

Also, how can I modify the web configuration portal using SPIFFS file?

Thank you !

ESP32-Solo watchdog resets the board while waiting for connections

When running autoConnect() on an ESP32-Solo, the access point gets created, but the watchdog resets the board while waiting for a connection on the access point. This is the output:

*WM: HTTP server started
E (16471) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (16471) task_wdt:  - IDLE0 (CPU 0)
E (16471) task_wdt: Tasks currently running:
E (16471) task_wdt: CPU 0: loopTask
E (16471) task_wdt: Aborting.
abort() was called at PC 0x400dc48b on core 0

Backtrace: 0x4008b4c0:0x3ffbe370 0x4008b6d1:0x3ffbe390 0x400dc48b:0x3ffbe3b0 0x4008420e:0x3ffbe3d0 0x4000bfed:0x3ffb1db0 0x40088f5d:0x3ffb1dc0 0x4008810f:0x3ffb1de0 0x4012ebb6:0x3ffb1e20 0x4011d079:0x3ffb1e40 0x40139703:0x3ffb1e60 0x400d3aae:0x3ffb1ea0 0x400d873a:0x3ffb1ef0 0x400d88c6:0x3ffb1f30 0x400d138f:0x3ffb1f80 0x400da6e7:0x3ffb1fb0 0x4008835d:0x3ffb1fd0

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)

This is because the yield() in startConfigPortal() line 237 does not work as intended. If I replace it with a vTaskDelay(10), it works.

esp32 arduino

this is the program the same autoconnect program
void setup() {
Serial.begin(115200);

WiFiManager wifiManager;
wifiManager.autoConnect("AutoConnectAP");
Serial.println("connected...yeey :)");

}

void loop() {
// put your main code here, to run repeatedly:

}

Getting error:
_In file included from C:\Users\HP\AppData\Local\Temp\arduino_modified_sketch_722435\AutoConnect.ino:14:0:

C:\Users\HP\Documents\Arduino\libraries\WIFIMANAGER-ESP32-master/WiFiManager.h:36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol

const char HTTP_HEAD[] PROGMEM = "<html lang="en"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/><title>{v}</title>";

                  ^

In file included from C:\Users\HP\Documents\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:30:0,

             from C:\Users\HP\Documents\Arduino\libraries\WIFIMANAGER-ESP32-master/WiFiManager.h:21,

             from C:\Users\HP\AppData\Local\Temp\arduino_modified_sketch_722435\AutoConnect.ino:14:

C:\Users\HP\Documents\Arduino\hardware\espressif\esp32\libraries\WebServer\src/HTTP_Method.h:10:3: note: previous declaration 'HTTPMethod HTTP_HEAD'

HTTP_HEAD = 0b00100000,

^

Multiple libraries were found for "WiFiManager.h"
Used: C:\Users\HP\Documents\Arduino\libraries\WIFIMANAGER-ESP32-master
Not used: C:\Users\HP\Documents\Arduino\libraries\WiFiManager-0.14.0_

plz help struggling for almost 3 days.

[HTTP HEAD] problem

Give me this error:

In file included from C:\Users\Gianni\Documents\Arduino\libraries\WiFiManager-ESP32\examples\AutoConnect\AutoConnect.ino:14:0:

C:\Users\Gianni\Documents\Arduino\libraries\WiFiManager-ESP32/WiFiManager.h:36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol

const char HTTP_HEAD[] PROGMEM = "<html lang="en"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/><title>{v}</title>";

                  ^

In file included from C:\Users\Gianni\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\WebServer\src/WebServer.h:30:0,

             from C:\Users\Gianni\Documents\Arduino\libraries\WiFiManager-ESP32\examples\AutoConnect\AutoConnect.ino:12:

C:\Users\Gianni\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\WebServer\src/HTTP_Method.h:10:3: note: previous declaration 'HTTPMethod HTTP_HEAD'

HTTP_HEAD = 0b00100000,

^

can not save wifi config on ESP32

I use example of thi libraryto compile and run. When I configged wifi parameters done,then click save button,but nothing was happened,why?

WIFIMANAGER-ESP32 and WEBSERVER-ESP32

How do I start a web server after Wifi Connect? I have rewritten several skits from the esp8266. But they do not work. Does anyone have an example for me?
Thanks

ESP32 WiFiManager AutoConnect

Hello, I am new to the ESP32. I know that there is a WiFiManager for ESP8266 that works allowing Wifi connectivity by first creating an access point that can be connected to for the selection of the SSID that you want to use. This avoids defining the SSID and Password withing the sketch.

I can find various ESP32 versions of the WiFiManager library but everytime I try to use these I end up with the following error "error: 'const char HTTP_HEAD []' redeclared as different kind of symbol"

I can see other people have experienced this problem and have raised the issue. Unfortunately I have been unable to Identify if anyone has found a reliable cure for the issue.

Apologies if This is in the wrong forum or area but I would be grateful if anyone could help or at least tell me if the issue has been resolved or is it still outstanding

Regards
Xeon

Can't get custom parameters to work

Code:

void initWifi( bool force ){
	
	WiFiManager wifiManager;

        wifiManager.setAPCallback(configModeCallback);
	wifiManager.setSaveConfigCallback(configModeSaveCallback);

	WiFiManagerParameter par("Device ID", "Your device ID", "", 64);
	wifiManager.addParameter(&par);


	String ssid = getssid();
	if( force ){
		if( !wifiManager.startConfigPortal(ssid.c_str()) ){
			Serial.println("failed to connect and hit timeout");
			//reset and try again, or maybe put it to deep sleep
			ESP.restart();
			delay(1000);
		}
	}
        else if( !wifiManager.autoConnect(ssid.c_str()) ){
		Serial.println("failed to connect and hit timeout");
		//reset and try again, or maybe put it to deep sleep
		ESP.restart();
		delay(1000);
        }

	Serial.println("New device ID: ");
	Serial.println(par.getValue());

}

Problem I'm facing is that par.getValue always prints a blank line, regardless of what I put in the box. Wifi settings are updated properly and it connects. Am I doing something wrong here?

Connection problem only on last esp32 Core

This library seems not compatible with the last esp32 arduino core Commit
https://github.com/espressif/arduino-esp32

The password is saved but the Connection Result return always 1 (Failed to connect)

*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Connection result: 
*WM: 1
*WM: Failed to connect.

If you reset manually the board the connection will established, so the password is correctly stored.
I tried with old Arduino core version and all functionality work correctly, so should be a problem whit some modification on new commit (is there also some IDF sdk update)

Does this manager tell station adress after accespoint config

Does this manager tell station adress after accespoint config

I treid tzapu but it doesnt tell station adress after config connect to station

Can see it on serial monitor
But serial is not always connected
Can look it up in router but that is not handy also

Apadress should stay connected for a while to tell station adress to user

Hope you understand me
I habe seen something like this in a german webmanager

My use sonoff tft touch control
https://youtu.be/3qviv5TOcVo
Sonoff Schedule
https://youtu.be/XeAUyQLMhbw

Attempt connection to configured Wi-Fi without launching AP on failure

Hello,
I'd like to use this in the following way:

  • Start the AP on demand by pressing a button (I know I can do this using startConfigPortal).
  • On every boot, try to connect to the configured Wi-Fi. If the connection fails, or there is not a saved Wi-Fi, do not start the AP; instead, proceed with the program without connecting to Wi-Fi.

I know I can do this with the Wifi.h library; however, is there a way to do it using only WifiManager? It doesn't seem like such an uncommon feature.

curent lib is not compiled

i got strange error while compiling:

WiFiManager.h: 36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol const char HTTP_HEAD[] PROGMEM = "<html lang="en"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"><title>{v}<\title>"

how to fix it who know?

Can WiFiManager Click an "ACCEPT" Button on WiFi Hotspot?

I want to connect an ESP32 (NodeMCU-32S board) to a specific WiFi network. There's no username or password required, but this particular WiFi network requires you to click on an "ACCEPT" button after you connect to the SSID to indicate that you have read the terms and conditions.

Here's what the portal page looks like for the WiFi network I want to have the ESP32 connect to:

Screen Shot 2019-10-04 at 1 55 05 PM

Can WiFiManager allow the ESP32 to "click" that "ACCEPT" button somehow?

Thanks!

--
Jim

Error compiling for board ESP32 Dev Module.

when i want to compile one of WIFIManager library named AutoConnect , have faced to the following error.

exit status 1
Error compiling for board ESP32 Dev Module.

i should mention that this error shown by this code. and other codes with esp32 are compiling completely
can any one help me by this error?

Cant build on ESP32

The bord I'm using is called DOIT ESP32 DEVKIT V1


/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp: In member function 'boolean WiFiManager::autoConnect()':
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:161:36: error: 'class EspClass' has no member named 'getChipId'; did you mean 'getChipModel'?
   String ssid = "ESP" + String(ESP.getChipId());
                                    ^~~~~~~~~
                                    getChipModel
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp: In member function 'boolean WiFiManager::configPortalHasTimeout()':
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:187:37: error: 'wifi_softap_get_station_num' was not declared in this scope
     if(_configPortalTimeout == 0 || wifi_softap_get_station_num() > 0){
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp: In member function 'boolean WiFiManager::startConfigPortal()':
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:195:36: error: 'class EspClass' has no member named 'getChipId'; did you mean 'getChipModel'?
   String ssid = "ESP" + String(ESP.getChipId());
                                    ^~~~~~~~~
                                    getChipModel
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp: In member function 'int WiFiManager::connectWifi(String, String)':
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:286:7: error: 'ETS_UART_INTR_DISABLE' was not declared in this scope
       ETS_UART_INTR_DISABLE();
       ^~~~~~~~~~~~~~~~~~~~~
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:286:7: note: suggested alternative: 'ESP_INTR_DISABLE'
       ETS_UART_INTR_DISABLE();
       ^~~~~~~~~~~~~~~~~~~~~
       ESP_INTR_DISABLE
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:287:7: error: 'wifi_station_disconnect' was not declared in this scope
       wifi_station_disconnect();
       ^~~~~~~~~~~~~~~~~~~~~~~
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:287:7: note: suggested alternative: 'wifi_action_rx_cb_t'
       wifi_station_disconnect();
       ^~~~~~~~~~~~~~~~~~~~~~~
       wifi_action_rx_cb_t
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:288:7: error: 'ETS_UART_INTR_ENABLE' was not declared in this scope
       ETS_UART_INTR_ENABLE();
       ^~~~~~~~~~~~~~~~~~~~
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:288:7: note: suggested alternative: 'ETS_UART1_INTR_SOURCE'
       ETS_UART_INTR_ENABLE();
       ^~~~~~~~~~~~~~~~~~~~
       ETS_UART1_INTR_SOURCE
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp: In member function 'void WiFiManager::startWPS()':
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:333:8: error: 'class WiFiClass' has no member named 'beginWPSConfig'; did you mean 'beginSmartConfig'?
   WiFi.beginWPSConfig();
        ^~~~~~~~~~~~~~
        beginSmartConfig
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp: In member function 'void WiFiManager::handleWifi(boolean)':
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:496:50: error: 'ENC_TYPE_NONE' was not declared in this scope
           if (WiFi.encryptionType(indices[i]) != ENC_TYPE_NONE) {
                                                  ^~~~~~~~~~~~~
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:496:50: note: suggested alternative: 'DNS_TYPE_DNAME'
           if (WiFi.encryptionType(indices[i]) != ENC_TYPE_NONE) {
                                                  ^~~~~~~~~~~~~
                                                  DNS_TYPE_DNAME
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp: In member function 'void WiFiManager::handleInfo()':
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:655:15: error: 'class EspClass' has no member named 'getChipId'; did you mean 'getChipModel'?
   page += ESP.getChipId();
               ^~~~~~~~~
               getChipModel
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:658:15: error: 'class EspClass' has no member named 'getFlashChipId'; did you mean 'getFlashChipMode'?
   page += ESP.getFlashChipId();
               ^~~~~~~~~~~~~~
               getFlashChipMode
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:664:15: error: 'class EspClass' has no member named 'getFlashChipRealSize'; did you mean 'getFlashChipSize'?
   page += ESP.getFlashChipRealSize();
               ^~~~~~~~~~~~~~~~~~~~
               getFlashChipSize
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp: In member function 'void WiFiManager::handleReset()':
/Users/macbook/Documents/Arduino/libraries/ESP32WiFiManager-master/WiFiManager.cpp:702:7: error: 'class EspClass' has no member named 'reset'; did you mean 'restart'?
   ESP.reset();
       ^~~~~
       restart

exit status 1


Compilation error: exit status 1


_handleRequest(): request handler not found

When running the following code:

#include <Arduino.h>
#include <WiFi.h>
#include <WebServer.h>
#include <DNSServer.h>
#include <WiFiManager.h>


void setup()
{
    Serial.begin(115200);

    WiFiManager wifiManager;
    wifiManager.startConfigPortal();

    Serial.println("Connected");
}

void loop()
{
    // put your main code here, to run repeatedly:
}

I get the following error immediately after connecting to the access point:

[E][WebServer.cpp:617] _handleRequest(): request handler not found
*WM: Request redirected to captive portal
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x400d5ae2  PS      : 0x00060430  A0      : 0x800d6ef9  A1      : 0x3ffb1bf0
A2      : 0x3ffb1c24  A3      : 0x3ffcbe8c  A4      : 0x00000009  A5      : 0x00000001
A6      : 0x00060e23  A7      : 0x00000000  A8      : 0x000009e3  A9      : 0x3ffb1bd0
A10     : 0x3ffb1c64  A11     : 0x3ffb1c4c  A12     : 0x3ffb1c4c  A13     : 0x0000ff00  
A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x00000004  EXCCAUSE: 0x0000001c
EXCVADDR: 0x000009e7  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffe

Backtrace: 0x400d5ae2:0x3ffb1bf0 0x400d6ef6:0x3ffb1c10 0x400d71ba:0x3ffb1ca0 0x40147112:0x3ffb1d60 0x400d2477:0x3ffb1d80 0x400d2663:0x3ffb1da0 0x400d271f:0x3ffb1df0 0x400d7b4a:0x3ffb1e40 0x400d7ca3:0x3ffb1e80 0x400d1230:0x3ffb1ed0 0x400d9b3f:0x3ffb1fb0 0x40088b7d:0x3ffb1fd0

Rebooting...

and this cycle continues for a little bit. Where have I gone wrong?

WPS - Example

Please include example how to enable the WPS mode

Can anyone create a simple sketch to share with me;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.