zhouhan0126 / wifimanager-esp32 Goto Github PK
View Code? Open in Web Editor NEWwifimanager-esp32
License: MIT License
wifimanager-esp32
License: MIT License
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);
}
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 ?
Hello,
I'd like to use this in the following way:
startConfigPortal
).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.
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.
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.
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
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 !
It does not reset the settings can you check?
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!!
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:
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
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?
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.
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
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
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.
Hello,
could you please advise how to add field to captive portal to upload new firmware binary and flash the chip? esphome does that but I cannot use whole framework.
Thank you very much, Jan
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
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
i have some application that i want to configure an ESP with my WIFI then i want it always be in client mode even if it does not see any successful AP. Actually i put a button that will make my ESP go to AP mode (never comeback to AP mode automatically)and reset the module. so what can i do to achieve this?
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
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!
The library works fine and connects first time, but then if I turn off the router and turn It on again the esp32 doesnt reconnect, how can I fix that?
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?
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,
^
Hi all,
I am using an ESP32, do I remove this line? What does it do?
#if defined(ESP8266)
Thanks,
Zeb
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?
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.
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?
i need to execute a function when wifi connections disconnect..
I use example of thi libraryto compile and run. When I configged wifi parameters done,then click save button,but nothing was happened,why?
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:
}
`
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.
Please include example how to enable the WPS mode
Can anyone create a simple sketch to share with me;
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?
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:
Can WiFiManager allow the ESP32 to "click" that "ACCEPT" button somehow?
Thanks!
--
Jim
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
Hi. This is a great project. In terms of security, what is the benefit of password protecting your access point? The reasons I ask:
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.
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?
when the config portal starts it does not show any available WiFi stations. Why not?
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)
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 컴파일 에러.
이 리포트는 파일 -> 환경설정에 "컴파일중 자세한 출력보이기"를
활성화하여 더 많은 정보를
보이게 할 수 있습니다.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.