-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ESP32 support, changed layout of inline HTML, small fixes #26
Conversation
Changed Access Point IP address to 192.168.4.1 instead of 192.168.1.1, because that is what the ESP32 reported back even if I set it to 192.168.1.1. |
If no WiFi credentials are found (e.g. when the ESP has never connected to a WiFi network before or the credentials have been reset) do not wait for a timeout but start the AP inmediately |
Fixed a bug in starting the AP inmediately if no WiFi credentials are found. |
On an ESP32 it was more difficult to detect if no WiFi credentials are present. This feature is not tested yet on an ESP32 completely fresh out of the box, neither is it tested yet on an ESP8266. |
Changed the DNS server IP to 192.168.4.1 too, so all clients connecting in AP mode are redirected to the ESP webserver root. |
Tested on a 'fresh out of the box' ESP32 and works like a charm! |
…s, e.g. for testing
Added a method ::resetSettings() to clear WiFi credentials, e.g. for testing purposes. If ::resetSettings() is called before ::begin(), the ESP should start in AP mode, because it has no more a known SSID to connect to. |
Some more changes:
|
Very cool, thanks! |
Added ESP32 support for the main files PersWiFiManager.h and PersWiFiManager.cpp using #if defined(ESP8266) and defined(ESP32) to make the difference.
Added ESP32 support for the first example basic_rest_api.ino using the same #if defined's.
To make this example work you need to install the ESP32 port of the ESP8266SSDP library too. This port is called ESP32SSDP and can be found here.
The other two examples can be adapted easily, although spiffs_rest_api_nonblocking.ino requires adaptation of the EasySSDP and SPIFFSReadServer files too.
Other changes are, in basic_rest_api.ino:
and in PersWiFiManager.cpp: