mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #241] ESP32 Compatability #201
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#201
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @forthlightning on GitHub (Nov 3, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/241
Thinking of porting this wonderful library over to the new ESP32 module?
I'd be willing to contribute if you can point me in the right direction.
@kentaylor commented on GitHub (Nov 3, 2016):
I'm wondering how much pointing is required. The code is all here, just go for it. I'm fond of this derivation for the reasons given there but you may not like it or prefer to roll your own.
@tzapu commented on GitHub (Nov 3, 2016):
as far as i can see webserver is not working yet on esp32 so this won't work either i'm afraid
https://github.com/espressif/arduino-esp32
got an esp32 in front of me that i didn t have a chance to play with yet, I do hope there will be some more progress on the arduino port as well
good luck and let us know if you get anywhere with it
@forthlightning commented on GitHub (Nov 3, 2016):
@kentaylor nice fork! Some of these are features I have been hoping for.
@tzapu thanks for the heads up about webserver, I'll poke around and see what there is to see.
@Jorgen-VikingGod commented on GitHub (Jan 5, 2017):
@tzapu webserver is working on current master. There are not all libs in yet - but I just try to use the webserver yesterday - it worked good.
@seopyoon commented on GitHub (Feb 3, 2017):
Does this work without the DNSServer.h? Where can I find DNSServer.h for esp32?
@tzapu commented on GitHub (Feb 3, 2017):
it would work without dns server, code would need to be remove in the lib
cheers
@seopyoon commented on GitHub (Feb 3, 2017):
The WiFiServer.h provided by the arduino-esp32 repo, does not support
void on(args)functions, so I failed to port it over =(@xinort commented on GitHub (Feb 14, 2017):
=(
@Curclamas commented on GitHub (Feb 22, 2017):
So if I understand correctly we would need an arduino-esp32 equivalent of "ESP8266WebServer" https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WebServer since "WiFiServer" ist not a full blown HTTP/Webserver.
Does anybody of you know of any developments here?
@Curclamas commented on GitHub (Mar 10, 2017):
It looks like the issue I've referenced above has been resolved. So from what I understand it should now be possible to port (just copy it into the arduino esp32 libs folder) the webserver lib and cosequently the WiFiManager should work.
@xinort commented on GitHub (Mar 14, 2017):
has anyone tried this?
@zarya commented on GitHub (May 2, 2017):
After patching some of the includes to the ESP32 includes i was not able to get the ESP8266Webserver to be happy to much compile errors for me.
In file included from lib/ESP8266WebServer/src/ESP8266WebServer.cpp:30:0: lib/ESP8266WebServer/src/detail/RequestHandlersImpl.h: In constructor 'StaticRequestHandler::StaticRequestHandler(fs::FS&, const char*, const char*, const char*)': lib/ESP8266WebServer/src/detail/RequestHandlersImpl.h:62:119: error: 'DEBUGV' was not declared in this scope DEBUGV("StaticRequestHandler: path=%s uri=%s isFile=%d, cache_header=%s\r\n", path, uri, _isFile, cache_header); ^ lib/ESP8266WebServer/src/detail/RequestHandlersImpl.h: In member function 'virtual bool StaticRequestHandler::handle(ESP8266WebServer&, HTTPMethod, String)': lib/ESP8266WebServer/src/detail/RequestHandlersImpl.h:80:104: error: 'DEBUGV' was not declared in this scope DEBUGV("StaticRequestHandler::handle: request=%s _uri=%s\r\n", requestUri.c_str(), _uri.c_str()); ^ lib/ESP8266WebServer/src/ESP8266WebServer.cpp: In member function 'void ESP8266WebServer::close()': lib/ESP8266WebServer/src/ESP8266WebServer.cpp:223:11: error: 'class WiFiServer' has no member named 'close' _server.close(); ^ In file included from lib/ESP8266WebServer/src/ESP8266WebServer.cpp:28:0: lib/ESP8266WebServer/src/ESP8266WebServer.h: In instantiation of 'size_t ESP8266WebServer::streamFile(T&, const String&) [with T = fs::File; size_t = unsigned int]': lib/ESP8266WebServer/src/detail/RequestHandlersImpl.h:111:41: required from here lib/ESP8266WebServer/src/ESP8266WebServer.h:132:60: error: no matching function for call to 'WiFiClient::write(fs::File&, int)' return _currentClient.write(file, HTTP_DOWNLOAD_UNIT_SIZE); ^ In file included from /home/zarya/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiServer.h:24:0, from lib/ESP8266WebServer/src/ESP8266WebServer.cpp:26: /home/zarya/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiClient.h:43:12: note: candidate: virtual size_t WiFiClient::write(uint8_t) size_t write(uint8_t data); ^ /home/zarya/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiClient.h:43:12: note: candidate expects 1 argument, 2 provided /home/zarya/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiClient.h:44:12: note: candidate: virtual size_t WiFiClient::write(const uint8_t*, size_t) size_t write(const uint8_t *buf, size_t size); ^ /home/zarya/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiClient.h:44:12: note: no known conversion for argument 1 from 'fs::File' to 'const uint8_t* {aka const unsigned char*}' In file included from /home/zarya/.platformio/packages/framework-arduinoespressif32/cores/esp32/Stream.h:26:0, from /home/zarya/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:150, from lib/ESP8266WebServer/src/ESP8266WebServer.cpp:24: /home/zarya/.platformio/packages/framework-arduinoespressif32/cores/esp32/Print.h:69:12: note: candidate: size_t Print::write(const char*, size_t) size_t write(const char *buffer, size_t size) ^ /home/zarya/.platformio/packages/framework-arduinoespressif32/cores/esp32/Print.h:69:12: note: no known conversion for argument 1 from 'fs::File' to 'const char*' /home/zarya/.platformio/packages/framework-arduinoespressif32/cores/esp32/Print.h:61:12: note: candidate: size_t Print::write(const char*) size_t write(const char *str) ^ /home/zarya/.platformio/packages/framework-arduinoespressif32/cores/esp32/Print.h:61:12: note: candidate expects 1 argument, 2 provided *** [.pioenvs/esp32/lib/ESP8266WebServer/ESP8266WebServer.o] Error 1@davidwallis commented on GitHub (May 17, 2017):
Has anyone got this working with the esp32?
@bbx10 commented on GitHub (May 27, 2017):
@tzapu There is discussion at espressif/arduino-esp32 on how best to merge WebServer and DNSServer libraries. Once that happens, it should be easier to port other libraries such as WiFiManager.
https://github.com/espressif/arduino-esp32/issues/395
@bbx10 commented on GitHub (Jun 10, 2017):
Libraries for the adventurous. They are good enough for me to port my personal projects to ESP32 but there are TODOs, a patch, and an issue.
Be sure to use the esp32 branch.
https://github.com/bbx10/WiFiManager/tree/esp32
Patch required but not merged. Patch your local fork. UPDATE: Patch merged so git pull.
https://github.com/espressif/arduino-esp32/pull/428
Still a problem but the issue is currently closed.
https://github.com/espressif/arduino-esp32/issues/400
My personal projects are working on ESP32 with these libraries but your mileage may vary. The following are NOT supported by Espressif.
https://github.com/bbx10/WebServer_tng
https://github.com/bbx10/DNSServer_tng
@yurykk commented on GitHub (Jun 21, 2017):
Hi
I'm getting an error message when I'm trying to compile the example :
Multiple libraries were found for "WiFi.h"
Used: ..[censored]../Arduino/hardware/espressif/esp32/libraries/WiFi
Not used: /Applications/Arduino.app/Contents/Java/libraries/WiFi
Please advise...
@bbx10 commented on GitHub (Jun 21, 2017):
This is expected and not a problem. When there are include files with the same name in different directories the IDE reports which include it used to build the program. The correct one in this case is the ESP32 version.
@yurykk commented on GitHub (Jun 21, 2017):
but sketch will not compile because of this conflict.... Interesting, but I don't have this issue compiling ESP32 sample Web server sketch...
@bbx10 commented on GitHub (Jun 21, 2017):
The compile is probably failing for some other reason. The following a successful compile which includes the multiple libraries warning but goes on to build the bin file.
@TheChapu commented on GitHub (Jun 22, 2017):
WARNING: library DNSServer claims to run on [esp8266] architecture(s) and may be incompatible with your current board which runs on [esp32] architecture(s).
In file included from /tmp/arduino_modified_sketch_96123/sketch_jun22a.ino:12:0:
/opt/arduino-1.8.1/libraries/webserver/WebServer.h:131:37: error: conflicting declaration of C function 'long unsigned int millis()'
extern "C" unsigned long millis(void);
^
In file included from /home/yo/Arduino/hardware/espressif/esp32/cores/esp32/Arduino.h:35:0,
from sketch/sketch_jun22a.ino.cpp:1:
/home/yo/Arduino/hardware/espressif/esp32/cores/esp32/esp32-hal.h:65:10: note: previous declaration 'uint32_t millis()'
uint32_t millis();
^
In file included from /tmp/arduino_modified_sketch_96123/sketch_jun22a.ino:12:0:
/opt/arduino-1.8.1/libraries/webserver/WebServer.h: In member function 'int WebServer::read()':
/opt/arduino-1.8.1/libraries/webserver/WebServer.h:793:40: error: call of overloaded 'millis()' is ambiguous
unsigned long timeoutTime = millis() + WEBDUINO_READ_TIMEOUT_IN_MS;
^
In file included from /home/yo/Arduino/hardware/espressif/esp32/cores/esp32/Arduino.h:35:0,
from sketch/sketch_jun22a.ino.cpp:1:
/home/yo/Arduino/hardware/espressif/esp32/cores/esp32/esp32-hal.h:65:10: note: candidate: uint32_t millis()
uint32_t millis();
^
In file included from /tmp/arduino_modified_sketch_96123/sketch_jun22a.ino:12:0:
/opt/arduino-1.8.1/libraries/webserver/WebServer.h:131:26: note: candidate: long unsigned int millis()
extern "C" unsigned long millis(void);
^
/opt/arduino-1.8.1/libraries/webserver/WebServer.h:835:36: error: call of overloaded 'millis()' is ambiguous
unsigned long now = millis();
^
In file included from /home/yo/Arduino/hardware/espressif/esp32/cores/esp32/Arduino.h:35:0,
from sketch/sketch_jun22a.ino.cpp:1:
/home/yo/Arduino/hardware/espressif/esp32/cores/esp32/esp32-hal.h:65:10: note: candidate: uint32_t millis()
uint32_t millis();
^
In file included from /tmp/arduino_modified_sketch_96123/sketch_jun22a.ino:12:0:
/opt/arduino-1.8.1/libraries/webserver/WebServer.h:131:26: note: candidate: long unsigned int millis()
extern "C" unsigned long millis(void);
^
In file included from /opt/arduino-1.8.1/libraries/Ethernet/src/Ethernet.h:9:0,
from /opt/arduino-1.8.1/libraries/webserver/WebServer.h:32,
from /tmp/arduino_modified_sketch_96123/sketch_jun22a.ino:12:
/home/yo/Arduino/hardware/espressif/esp32/tools/sdk/include/lwip/apps/dhcpserver.h: At global scope:
/opt/arduino-1.8.1/libraries/Ethernet/src/Dhcp.h:47:19: error: expected identifier before string constant
#define HOST_NAME "WIZnet"
/home/yo/Arduino/hardware/espressif/esp32/tools/sdk/include/lwip/apps/dhcpserver.h:58:5: note: in expansion of macro 'HOST_NAME'
HOST_NAME = 12,
^
/opt/arduino-1.8.1/libraries/Ethernet/src/Dhcp.h:47:19: error: expected '}' before string constant
#define HOST_NAME "WIZnet"
/home/yo/Arduino/hardware/espressif/esp32/tools/sdk/include/lwip/apps/dhcpserver.h:58:5: note: in expansion of macro 'HOST_NAME'
HOST_NAME = 12,
^
/opt/arduino-1.8.1/libraries/Ethernet/src/Dhcp.h:47:19: error: expected unqualified-id before string constant
#define HOST_NAME "WIZnet"
/home/yo/Arduino/hardware/espressif/esp32/tools/sdk/include/lwip/apps/dhcpserver.h:58:5: note: in expansion of macro 'HOST_NAME'
HOST_NAME = 12,
^
In file included from /home/yo/Arduino/hardware/espressif/esp32/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:48:0,
from /home/yo/Arduino/hardware/espressif/esp32/tools/sdk/include/esp32/esp_event.h:23,
from /home/yo/Arduino/hardware/espressif/esp32/tools/sdk/include/esp32/esp_wifi.h:68,
from /opt/arduino-1.8.1/libraries/WiFiManager-esp32/WiFiManager.h:32,
from /tmp/arduino_modified_sketch_96123/sketch_jun22a.ino:14:
/home/yo/Arduino/hardware/espressif/esp32/tools/sdk/include/lwip/apps/dhcpserver.h:154:1: error: expected declaration before '}' token
} dhcp_msg_option;
^
exit status 1
Error compiling for board ESP32 Dev Module.
@bbx10 commented on GitHub (Jun 23, 2017):
Looks like you manually installed libraries in the wrong directory. The libraries may not be designed for ESP32. In arduino-1.8.1-linux64.tar.xz, I do not see a webserver library yet your log shows such a library.
/opt/arduino-1.8.1/libraries/webserver/WebServer.h:I suggest removing arduino1.8.1 directory and reinstall or upgrade to the latest. Install libraries in [sketch directory]/libraries/, not in the IDE libraries directory.@sglvladi commented on GitHub (Jun 29, 2017):
@bbx10 You are amazing! Been waiting for this for months and you've done it all!
A BIG shout out to everyone, @bbx10's solution {https://github.com/bbx10/WiFiManager/tree/esp32} works pretty much out of the box! All that is needed is to download and install his custom WebServer {https://github.com/bbx10/WebServer_tng} and DNSServer {https://github.com/bbx10/DNSServer_tng} libs.
Pretty much identical functionality (as far as I have tested) with the original ESP8266 WiFiManager, but on the ESP32!!
Personally I think this should be shared as much as possible. I am sure there are loads of people interested.
@bbx10 Why not turn the esp32 branch into a separate repo? Give it the attention it deserves :) It's certainly worth it and would be great to also have some more details on the work you did to make it compatible.
@bbx10 commented on GitHub (Jun 29, 2017):
@sglvladi Thanks, for the kind words! Ideally, my ESP32 code would be merged into this repo via PR so I am keeping it on a separate branch for now. There is activity to create official Espressif repos for WebServer and, I hope, DNSServer and Hash libraries. This should make it easier for ESP8266 library maintainers to add support for ESP32.
@yurykk commented on GitHub (Jun 30, 2017):
@bbx10, I have some strange issue with WiFiManager on ESP32.
Many times it doesn't save configuration - it takes 3-4 times entering the password..
also, wifiManager.resetSettings(); doesn't work as expected. After reboot device still "remember" old settings...
Please advise...
Thanks
@bbx10 commented on GitHub (Jun 30, 2017):
I have not had problems saving SSID/password.
wifiManager.resetSettings() does not work because of problem with WiFi.disconnect(true) not working. Still waiting for a fix for this. I found if WiFi.disconnect(true) is called after successfully connecting, it does erase the saved SSID/password.
@miknuc commented on GitHub (Jul 2, 2017):
@bbx10
I tried your fork. Seems to compile :)
I am just wondering how to use it. I was about to move a project from esp8266 to esp32 and ran into an issue with persisting the wifi configuration:
The examples look quite like the esp8266 counterparts and make of use of SPIFFS which is still WIP for esp32 to my knowledge. I do not understand how they could work with esp32.
Am I missing something?
Michael
@bbx10 commented on GitHub (Jul 2, 2017):
@miknuc SPIFFS is not available on ESP32. For configuration information, I use the ESP32 Preferences library. Similary, if an app uses the ESP8266 EEPROM library, it can be converted to use Preferences.
@programmer131 commented on GitHub (Jul 4, 2017):
i've removed FS related functions from library and esp8266webserver works fine with esp32. will update wifimanager library to see if it works.
@miknuc commented on GitHub (Jul 4, 2017):
Thank you for the suggestion. It's even simpler to persist these values using Preferences instead of SPIFFS/JSON.
@elecherf commented on GitHub (Jul 10, 2017):
Hi, looks the @bbx10 links https://github.com/bbx10/WiFiManager/tree/esp32 have disapeared. Plz share. Thank you
@bbx10 commented on GitHub (Jul 10, 2017):
@elecherf The link and repo are working fine.
@LongmontRobotics commented on GitHub (Jul 13, 2017):
I have installed the three zip files into Arduino IDE 1.8.2:
https://github.com/bbx10/WiFiManager/tree/esp32
https://github.com/bbx10/WebServer_tng
https://github.com/bbx10/DNSServer_tng
I get this error:
C:\Users\Donald\Documents\Arduino\libraries\WiFiManager-esp32\WiFiManager.cpp:746:84: error: 'class WiFiClient' has no member named 'localIP'
Please help locate this missing member.
@miknuc commented on GitHub (Jul 13, 2017):
This function is not yet part of the expressif libraries. You need to apply the patch mentioned by bbx10 on Jun 10 somewhere in the expressif libs, see patch file for details.
Btw: I am new to git and do not know how to takeover the patch with a simple git command, so I applied the small change manually. There is probably a better way to do this. Any hint how the standard procedures look like is appreciated.
Michael
@LongmontRobotics commented on GitHub (Jul 13, 2017):
I don't understand what this all means.
What patch are you referring to ?
@LongmontRobotics commented on GitHub (Jul 13, 2017):
OK, figured it out.
Thanks
@bbx10 commented on GitHub (Jul 13, 2017):
@LongmontRobotics @miknuc The patch is no longer required because the fix was merged with the latest version from https://github.com/espressif/arduino-esp32. Just get the latest files.
@LongmontRobotics commented on GitHub (Jul 13, 2017):
If I Add .ZIP library from the Sketch-> Include Library, will that over right the existing arduino-esp32 directories ?
@bbx10 commented on GitHub (Jul 13, 2017):
arduino-esp32 is not a library so I do not think that will work.
Depending on your OS, find the step that does
git clone https://github.com/espressif/arduino-esp32.git esp32. Change to the same directory then dogit pullto get the latest updates.git cloneis only needed on the initial installation.https://github.com/espressif/arduino-esp32#installation-instructions
@LongmontRobotics commented on GitHub (Jul 13, 2017):
I just figured that out.
Thanks for your help.
@amattice commented on GitHub (Aug 1, 2017):
@elecherf, the code is there, but you are probably tying to use the click shortcuts which incorrectly place a trailing parentheses. Try these...
https://github.com/bbx10/WiFiManager/tree/esp32
https://github.com/bbx10/WebServer_tng
https://github.com/bbx10/DNSServer_tng
@unixb0y commented on GitHub (Aug 3, 2017):
Is there a good "ESP8266WebServer" alternative yet?
I'm new to ESP32 development and that WiFiServer lacks a whole lot of stuff. Today I tried to get URL parameters like you could with the old board using server.args() but no chance here.
@gjt211 commented on GitHub (Aug 23, 2017):
Hi,
Is there a way to include both the original wifimanager (that I use for my ESP8266 projects) and this one for my ESP32 projects on a single computer/arduino install?
It would require a different name for this library I guess. Is there a simple way to change that?
Update:
I was not sure how to add the ESP32 version from bbx10 for ESP32, I ended up copying it to the following location and it seems to be ok. (The items in [brackets] are specific to my installation).
[C]:\Users[username][Arduino projects folder]\hardware\espressif\esp32\libraries\WiFiManager-esp32
@sukeshak commented on GitHub (Aug 24, 2017):
I found a port here for ESP32... anyone tested yet?
https://github.com/zhouhan0126/WIFIMANAGER-ESP32
Also changes done for these two as well.
WebServer https://github.com/zhouhan0126/WebServer-esp32
DNSServer https://github.com/zhouhan0126/DNSServer---esp32
@gjt211 commented on GitHub (Sep 25, 2017):
@bbx10
I have been trying to work out a way to get
wifiManager.resetSettings()working.I seen a comment about using
makefrom the command line to erase settings, but this is not practical for boards that I don't physically have access to.It seems the settings are stored using preferences, and there are commands available in the ESP32 Arduino core to modify the preferences. I was wondering where to look in your code to find where preferences is done?
I have a quick look but can't find anything. I was hoping I could add some code to fix/add this as I really need to be able to have
wifiManager.resetSettings()working.@bbx10 commented on GitHub (Sep 25, 2017):
The problem is in an ESP32 core function so you found the correct place.
https://github.com/espressif/arduino-esp32/issues/400
@Scott--R commented on GitHub (Sep 26, 2017):
@sukeshak I tried the ESP32 ported version and it seems to work but apparently the wifi persist is not yet implemented on the ESP32, so every time I power cycle the device it forgets the SSID and PWD. Looks like we need to implement a workaround using the preferences library until the wifi persist function / feature is done.
@sukeshak commented on GitHub (Sep 26, 2017):
@Scott--R I think the preferences API is for Arduino side and not for ESP-IDF.
I need something under ESP-IDF
@sukeshak commented on GitHub (Sep 26, 2017):
I think it would be SPIFF?
https://github.com/espressif/esp-idf/tree/master/examples/storage/spiffs
@Testato commented on GitHub (Sep 26, 2017):
Also in arduino-esp32 now there is the SPIFF library
https://github.com/espressif/arduino-esp32/tree/master/libraries/SPIFFS
@sukeshak commented on GitHub (Sep 26, 2017):
I just kicked off a discussion to understand what is the best option
https://esp32.com/viewtopic.php?f=13&t=3146&p=14743#p14743
@Testato commented on GitHub (Sep 26, 2017):
we have also EEPROM library for value storing
@sukeshak commented on GitHub (Sep 27, 2017):
What about the version from @bbx10 above?
I haven't tried it... I need something for ESP-IDF side.
@eirikso commented on GitHub (Jan 3, 2018):
I am currently setting up several ESP32 where I need a WiFiManager. So I have started testing this port: https://github.com/zhouhan0126/WIFIMANAGER-ESP32
It works pretty OK. I have done two edits to make it work properly:
1. A change in WiFiAP.cpp so that the captive portal pops up automatically (it is not very user friendly to have people entering 192.168.4.1 in their browser). This edit fixed it on all the devices I have tested. The problem is described here: https://github.com/zhouhan0126/WIFIMANAGER-ESP32/issues/2
You simply paste these three lines from line 95 in WiFiAP.cpp:
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);
2. A change in WiFiManager.cpp to make sure that the ESP32 connects automatically after the user have entered SSID and PWD. Before this change I had to reset the ESP32 after entering the credentials.
Add this at line 216:
ESP.restart();
delay(1000);
This problem is described here: https://github.com/zhouhan0126/WIFIMANAGER-ESP32/issues/1
With these two edits it seems like WIFIMANAGER-ESP32 works good. My only problem is the fact that it is impossible to delete the credentials before a connection is OK. I would very much like to be able to set up the ESP32 so that there is a "factory reset" option at startup.
Does anyone here know if there is a fix for that now?
@eirikso commented on GitHub (Jan 3, 2018):
I don't know if this helps anyone, but it is the same for these:
Serial.println( WiFi.SSID() );
Serial.println( WiFi.psk() );
They return rubbish if called before a connection is made and return what they are supposed to do if called after the connection is made.
@Testato commented on GitHub (Jan 3, 2018):
Yhanks for your tips, may you create a pull request ?
For the connection problem there is many thinks that work only after a connection, often is enought start a connection to a fake user+password value and after you can continue
@eirikso commented on GitHub (Jan 3, 2018):
Unfortunately, after more testing I am still not satisfied with the stability of this solution. The ESP32 fails to connect way too often. So I guess I'll just have to wait until someone that is much better than me at programming solves this properly. :-)
Until then I'll use my old trusted ESP8266 for this.
@tablatronix commented on GitHub (Jan 3, 2018):
These problems sound like esp32 lib bugs
@eirikso commented on GitHub (Jan 4, 2018):
Yes. It probably is. The main problem is that it way too often starts the config portal even if I know that it had stored the credentials for my wifi that has a 100% signal. And I can not find a reliable source of the error. When I disconnect and connect power again it is completely random if it connects or not.
@tzapu commented on GitHub (Jan 4, 2018):
as a debug, when it fails to connect you could force a scans of the APs to see if it sees them
also, you could put the begin in a loop before wifimanager and only start wifimanager if it doesn't connect in 3 attempts for instance
@jwktje commented on GitHub (Jan 22, 2018):
@eirikso What would be your best advice at this point? I've been developing an ESP32 based solution that needs WifiManager and found this Github issue after looking around for a solution. Just stick with ESP8266 for now?
@tablatronix commented on GitHub (Jan 22, 2018):
I might start working on this, i think i saw a pr but i do not see a working fork, i might start from scratch. If anyone can gather the changes needed
@Testato commented on GitHub (Jan 23, 2018):
thank you,
the necessary changes are few then the work I do not think will be long, but it is important to work directly with the last commit of the core esp32 because the update to the last sdk esp has caused the fork of wifimanager to have sensitivity problems and no automatic reconnection
@jwktje commented on GitHub (Jan 23, 2018):
Would love to get a stable version of this lib. Anything I can do to help like maybe testing? Not a hardcore lib developer so I won't be much help there.
@tablatronix commented on GitHub (Jan 23, 2018):
Dependancies
core esp32 webserver
https://github.com/esp8266/ESPWebServer
Notes
https://github.com/espressif/arduino-esp32/pull/430
PR not going to be merged
ancillary
https://github.com/bbx10/WebServer_tng
https://github.com/zhouhan0126/WebServer-esp32
https://github.com/bbx10/ESPWebServer/tree/esp32
https://github.com/emelianov/ESPWebServer
DNSServer
github.com/espressif/arduino-esp32@615c9279f7Abstractions
Conditions
It appears that WiFi.mode() is not persistent, at a glance , i have not used this at all yet.
@Testato commented on GitHub (Jan 23, 2018):
Here is there the official Esp roadmap, for some lib, included dnsserver and webserver.
Maybe should be better collaborate directly on the official implementation ?
https://github.com/espressif/arduino-esp32/projects/1
@tablatronix commented on GitHub (Jan 23, 2018):
It might be official but it is not correct, makes multiple references to unofficial libraries even though these are not going to be PRed, as mentioned in several issues. So not sure what the deal is there.
I do plan on supporting official, but will start abstracting some stuff so ancillary is also supported.
@tablatronix commented on GitHub (Jan 23, 2018):
⚠️ WARNING
Merged development into esp32, so do not merge unless you want to break your esp32 forks!
@tablatronix commented on GitHub (Jan 23, 2018):
Do I need to add ESP31B support in ifdefs?
@tablatronix commented on GitHub (Jan 23, 2018):
I am just gonna add defs for everything and no else fallbacks, maybe someone can hack in more wifi module support #131 #439 etc.
@tablatronix commented on GitHub (Jan 23, 2018):
PR for tracking, https://github.com/tzapu/WiFiManager/pull/490
code commits are live in branch and unstable!
@tablatronix commented on GitHub (Jan 23, 2018):
ToDos, Known Issues
softAPgetStationNum@xinort commented on GitHub (Jan 24, 2018):
I'm curious, why not just use the espAsyncWebserver?
@tablatronix commented on GitHub (Jan 24, 2018):
Ref
Autoreconnect bugged
https://github.com/espressif/arduino-esp32/issues/653
added
setWiFiAutoReconnect(bool enabled)will toggle esp8266 WiFi.setAutoReconnect, and enable a event watcher for esp32 that will auto reconnect on disconnect events.
optionally we could just use the native autoreconnect flag
getAutoReconnect, but since we are using an external timer and kludge, I think its better to allow users to control it separately from native (albeit non working ) implementation ( sidenote: it seems to only work on auth failure in core form looking at the code )@tablatronix commented on GitHub (Jan 24, 2018):
Espasync is enormous, not lightweight, and requires cutting edge from what i understand
@tablatronix commented on GitHub (Jan 24, 2018):
ok branch is fairly stable, I think
I am going to be doing minor stuff to clean it up , work on the info page etc.
@Testato commented on GitHub (Jan 24, 2018):
beautiful :-)
so you mean the esp32 branch ?
I will have a full weekend of test ;-)
@tablatronix commented on GitHub (Jan 24, 2018):
Yes, it was stable but now the captive portal wont come up, not sure if I broke something or not, gonna erase flash and see if something is borked.
@tablatronix commented on GitHub (Jan 25, 2018):
ok working, for some reason captive portal never pulls up on one of my devices, and the sta gets disconnected soon after, I wonder if this is a dnsserver error or some sort.
EDIT: rebooted iphone , works now, ios seems to not like ssids changing and it caches hardware macs, can corrupt something.
@tablatronix commented on GitHub (Jan 25, 2018):
basic instructions
(someone can write full arduino instructions for laymen)
platformio
install esp32 staging
http://docs.platformio.org/en/latest/platforms/espressif32.html#using-arduino-framework-with-staging-version
/Users/user/.platformio/packages/framework-arduinoespressif32@src-537c58760dafe7fcc8a1d9bbcf00b6f6/libraries/git clone https://github.com/bbx10/WebServer_tng.git@tablatronix commented on GitHub (Jan 25, 2018):
pushed some updates, did some more testing, mostly flawless now, probably gonna move any further notes to the PR.
Would like to hear input and example ideas here.
@jwktje commented on GitHub (Jan 25, 2018):
I can test this weekend. Which branch can I use to test stability on ESP32?
@Testato commented on GitHub (Jan 25, 2018):
The esp32 branch and the bbx10 webserver library.
The Dnsserver library is integrated in the esp32 core itself
@Testato commented on GitHub (Jan 27, 2018):
as promised I'm testing the branch esp32
Can you share your example sketch so we can test all with the same sketch?
Captive portal tested on:
Android7 on LG-G5se
Android4 on Samsung 3
Ubuntu17 on Netbook
Win10 on Desktop
@tablatronix commented on GitHub (Jan 27, 2018):
ESP branch is based on development branch
It will take me some time to create docs
hmm, works for me on ios and osx, windows will test some more in a bit.
I test with
ondemandconfigportal, it contains autoconnect and ondemand functionality and its the only one updated for esp32 for now.Should be able to use all examples
add
You can add the percentage back in the token is
{r}for string percent{r}rssi percentage 0-100{R}rssi db{q}quality icon 1-4( quality is set as alt text and title, so you can mouseover icons also, maybe I will add a popup also for mobile, or a toggle details button later on , shrug , typical end users do not need RSSI )
I will be around
I just pushed some fixes for erase config
@Testato commented on GitHub (Jan 27, 2018):
I can confirm that also by the sketch https://github.com/tzapu/WiFiManager/blob/master/examples/OnDemandConfigPortal/OnDemandConfigPortal.ino the Captive portal do not work on Android/Linux/Windows
Another point is that in the info page there is write that the /r command delete the wifi configuration and reboot. Instead it ONLY reboot, the old user+psw remain , so it automatically reconnect
tested with your last commit
@tablatronix commented on GitHub (Jan 27, 2018):
Thanks
@tablatronix commented on GitHub (Jan 27, 2018):
I updated the info docs, thanks for that, /r only reboots, /erase erases
@tablatronix commented on GitHub (Jan 27, 2018):
hmm
any ideas why captive portal is failing on these?
I do not see that a captive portal request is received, so it has something to do with the network layer I think.
@tablatronix commented on GitHub (Jan 27, 2018):
esp32/captive portal example also fails for windows, I am going to guess this is a dnsserver issue.
@tablatronix commented on GitHub (Jan 27, 2018):
https://github.com/espressif/arduino-esp32/issues/1037
@Testato commented on GitHub (Jan 27, 2018):
Yes probably it is correlated, becsuse not only the captive portal is not elevated (android do not receive the auto notification of the portal) but also if you manually connect to the AP and after try to go to a http address, it not autosend you to 192.168.4.1
So it is sure that the Dnsserver do not work, if it is only one problem or two separated I do not know.
@tablatronix commented on GitHub (Jan 27, 2018):
hmm I cannot get the esp8266 captive portal example to work either...
@Testato commented on GitHub (Jan 27, 2018):
Do you mean on 8266 or on esp32 ?
@tablatronix commented on GitHub (Jan 27, 2018):
Both with windows
@Testato commented on GitHub (Jan 27, 2018):
Yes I also remember that on windows the 8266 captive portal have problem (maybe also in conjunction with some antivirus, but on Android 8266 Captive was ok.
I think repair the android functionaloty is a priority
@tablatronix commented on GitHub (Jan 27, 2018):
I will have to do some rollbacks and check against versions, its possible an update broke something. Either way this is probably gonna be a platform bug maybe we can workaround it. But i am testing with captiveportal examples not wifimanager at this point
@Testato commented on GitHub (Jan 27, 2018):
So you mean by this sketch
https://github.com/espressif/arduino-esp32/blob/master/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino
Tomorrow i will start to test it too.
Good night :-)
@Testato commented on GitHub (Jan 28, 2018):
yes confirmed, also the official Captive POrtal for Esp32 do not work.
Same behaviour, unrecognaized portal and no autoredirection to apIP
@jwktje commented on GitHub (Jan 28, 2018):
Tested the ESP32 branch just now with an iPhone and Lolin32 and the whole experience is way better. Connection successrate is almost 100% now where it was 20% before (on longer distances from the router). The portal opens no problem automatically for me too.
So all round great improvements. I will report back if I find weird stuff happening, but for now everything seems cool!
@tablatronix commented on GitHub (Jan 28, 2018):
please report which devices and os you tested captive portal on, we are having issues with that, if you have other devices available to you.
@jwktje commented on GitHub (Jan 28, 2018):
Wemos Lolin32.
ESP32 Branch of this library and the bbx10 webserver.
Connected with an iPhone 6 on latest iOS.
Everything worked fine on my end
@Testato commented on GitHub (Jan 28, 2018):
@jwktje
Thanks for the report on iOS, but the problem is present on Android, on Linux and on Windows.
If you have one of this device please made some test on it.
Thanks
@tablatronix commented on GitHub (Jan 28, 2018):
Nm my esp8266 report, turns out windiws firewall is blocking captive portal, i have no idea why, its idiotic.
@tablatronix commented on GitHub (Jan 28, 2018):
Wireshark shows a bunch of malformed dns packets to the sta, bad checksums, not sure if this is an acceptable failure or the cause.
@Testato commented on GitHub (Jan 29, 2018):
On my eindows I have the integrated firrwall disabled, so it's not the priblem.
Today i will use wireshark too
@tablatronix commented on GitHub (Jan 29, 2018):
That was about esp8266, i thought it was broken too but its not. It was windows firewall blocking.
@tablatronix commented on GitHub (Jan 29, 2018):
DNSServer.cpp is missing the question in the response.
see the esp32 bug issue for the solution.
https://github.com/espressif/arduino-esp32/issues/1037
Please test on android,linux etc if you want
@tablatronix commented on GitHub (Jan 29, 2018):
I made a fork of esp32 with bbx10 webserver and captiveportal fix
https://github.com/tablatronix/arduino-esp32
if it helps anyone
@Testato commented on GitHub (Jan 29, 2018):
I tested the corrected dnsserver.cpp
Yes it work on Android, Ubuntu, Win7, Win10
But I see a strange behavior, if i disconnect and reconnect 3 or 4 times, the webserver do not respond.
I can ping the ESP32, so it work, but i must reset it for receive the webserver page
@tablatronix commented on GitHub (Jan 29, 2018):
hmm, I will try to reproduce,
Are you sure its not timing out ?
wifiManager.setConfigPortalTimeout(180);is in the example.I can't reproduce, are you doing something, or just joining and disconnecting ?
What do logs show?
@tablatronix commented on GitHub (Jan 31, 2018):
This pr has some nice dns fixes.
https://github.com/espressif/arduino-esp32/pull/1011
Wish I saw it before spending all weekend messing with wireshark. At least i learned some dns...
@Testato commented on GitHub (Jan 31, 2018):
I know this PR but seems that @me-no-dev seems not agree with it ?
Are you tried it ?
For now do you think is better remain on your corrected dnsserver.cpp or switch to this PR ?
@tablatronix commented on GitHub (Jan 31, 2018):
Yeah i am still unsure what he disagrees with, i did not fully understand why it was wrong since that is exactly how esp8266 does it
@me-no-dev commented on GitHub (Jan 31, 2018):
what I disagree with is that the way it works in esp8266 does not work in my network and my devices. On further note, the code is really hacky and should be rewritten to construct the whole response properly. There is no reason for "dns compression" because you are sending one response and there is nothing to compress.
@tablatronix commented on GitHub (Jan 31, 2018):
Is that what you mean by copy paste, the packet should be constructed properly from scratch?
What part does not work? I see valid packets in wireshark, this pr also seems to add proper handling of other records like ptr etc.
Also captive portal does not work at all with current master dnsserver.
@me-no-dev commented on GitHub (Jan 31, 2018):
and I see the total opposite of that, so something somewhere is wrong. Maybe some devices send different query packets or something else, but the result is that with 8266 type of code I get bad packets and DNS is not working. Notice! I am not arguing that it works for you, I am arguing that it does not work for all ;) Packet should be constructed from scratch.
@tablatronix commented on GitHub (Jan 31, 2018):
hmm, I can gather my wireshark logs, and work on getting some from linux as well.
It seems that with regards to captive portals, although the packets may be valid but they are missing the question in the response, the captive portal query process does nothing after receiving these.
I don't know what the protocol says about this, I will read today, but from our testing on all platforms, ios, osx is the only one that works without the question present in response ( not sure if this is the only difference but it appears to be from the code diff from esp8266 )
@tablatronix commented on GitHub (Jan 31, 2018):
windows 10 dns packets
sorry i did not use matched ids.
query
Working patched(8266)
master not working
@me-no-dev commented on GitHub (Jan 31, 2018):
I get this very well :) I actually tried the 8266 code first, but that yielded "malformed packet" on my mac. What does RFC says about this?
@tablatronix commented on GitHub (Jan 31, 2018):
page 46 responses
and
from "best practices"
Also , If the question is missing, this is usually a inverse dns query response.
I will gather ios, osx logs later
@tablatronix commented on GitHub (Feb 1, 2018):
I have no DNS issue with osx at all, no malformed packets, with my PR ( esp8266 code ), I have not tested the other PR.
dig google.com +noednsreturns packets as expected.I do however get some malformed now and then, but only when there is a bunch of traffic, seems like a buffer or traffic problem maybe.
Very few and they have 802.11 failures in them
Frame check sequence: 0x0959b92e incorrect, should be 0x137ffcaf@LaurentLouf commented on GitHub (Feb 2, 2018):
So, you'd like me to delete the copy-paste part for the question and just construct the question again when sending the response ? You should have said so 10 days ago, that's a matter of minutes of coding. I could also add an option to enable/disable message compression, but since it is explained in my PR, I don't see why we shouldn't use it (as it won't confuse anyone getting in the code)
P.S. : commit added, without option to enable/disable the compression
@tablatronix commented on GitHub (Feb 7, 2018):
@tablatronix commented on GitHub (Feb 8, 2018):
FYI
esp32 is branched off of development , I am starting to document that here https://github.com/tzapu/WiFiManager/issues/500
, since there are significant changes from master and release ( it should be entirely backward compatible however ) With the exception of customized html etc.
@tablatronix commented on GitHub (Feb 15, 2018):
esp32 merged into development!
@tablatronix commented on GitHub (Mar 5, 2018):
DNS Server fixed in ESP32 core!
@larissa-n commented on GitHub (Mar 28, 2018):
@tablatronix what's a stable combination of libraries? I tried a bunch and I'm getting the same errors as @eirikso reported Jan 3 (ESP32 doesn't connect although saved wifi is close-by; only if I hit reset a few times in close succession and get lucky), which you said might be ESP32 lib errors. I get
*WM: [ERROR] wifi config failed(and after that it either connects or doesn't), but that probably means something's wrong.@tablatronix commented on GitHub (Mar 28, 2018):
There seems to be some instability in esp32, I had issues until I reinit NVS flash.
Are you setting a config ? What are you setting?
do you have issues with dhcp instead of static ( the config code was recently updated, could be a bug )
eirikso issue is related to dns server, which has since been updated in esp32 core, and is no longer an issue afaik.
Create a new issue and provide the issue information requested
@tablatronix commented on GitHub (Mar 28, 2018):
ok that error was a bug, I fixed it, just the debug error itself, also see known issues in #513
@tablatronix commented on GitHub (Mar 29, 2018):
This issue is about the official development branch with es32 support.
@axwell commented on GitHub (Jun 4, 2018):
When this will be available in master branch ? thx
@tablatronix commented on GitHub (Jun 4, 2018):
No idea, when I feel development is done and tested enough
@tablatronix commented on GitHub (Jun 18, 2018):
https://github.com/espressif/arduino-esp32/issues/1393 introduces bugs to esp32 functionality.
The symptom is SAVES DO NOT WORK EVER!
I have removed persistent disabling for now, which will possibly cause problems with softap staying on after reboots, you might want to make sure you set mode in your user code to prevent this.
At this time there is no way to toggle persistent during runtime unless I find a workaround or PR a fix to esp32 if I have time.
@Curclamas commented on GitHub (Jun 27, 2018):
@tablatronix it seams there was a big update today, with regards to WiFi, ESP-IDF and I think they added also WebServer functionality, so that should be a big step forward for general ESP32 support on WiFiManager.
@mikekgr commented on GitHub (Jun 27, 2018):
@Curclamas @tablatronix in this case please instruct me/us what to do, I mean now we are using a webserver unofficial library...
Thanks!
@tablatronix commented on GitHub (Jun 27, 2018):
I will take a look thanks!
@Curclamas commented on GitHub (Jun 27, 2018):
@tablatronix love to hear that!
@mikekgr I did not test it yet but in theory you could try to remove the unofficial library, pull the latest arduino-esp32 and try if WiFiManager still works :)
@tablatronix commented on GitHub (Jun 27, 2018):
Good news the webserver seems to work fine.
Bad news saving is broken again, ill see what changed
@tablatronix commented on GitHub (Jun 27, 2018):
Fixed saving and erasing again
@doit4fun commented on GitHub (Nov 28, 2018):
hi... is there another github address for tzapu_ESP32 or we can use this one?
@doit4fun commented on GitHub (Nov 28, 2018):
when compiling ESP32 is looking for esp8266.h lib and is not finding it so probably it doesn't work
@tablatronix commented on GitHub (Nov 28, 2018):
Develoment branch
@nikeee commented on GitHub (Aug 17, 2020):
Is this issue still valid? I'm looking into using this for my ESP32.
@miknuc commented on GitHub (Aug 17, 2020):
I am using the version from the development branch. Works for me.
Niklas Mollenhauer notifications@github.com schrieb am Mo., 17. Aug.
2020, 18:23: