[GH-ISSUE #513] Esp32 testing #432

Open
opened 2026-02-28 01:25:15 +03:00 by kerem · 23 comments
Owner

Originally created by @tablatronix on GitHub (Feb 11, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/513

This has been merged into development

The Development branch implements support for esp8266 and esp32

The espressif esp32 platform does not include webserver
Tested with https://github.com/bbx10/WebServer_tng

Known Isssues

NVS corruption

W (84) wifi: wifi nvs_open fail ret=4353
or wifi wont connect with ap not found error

There seems to be some kind of corruption of NVS in some version of core lib, or the partition was changed at some point. Reformatting NVS might help.
how to fix
https://desire.giesecke.tk/index.php/2018/02/26/wifi-connection-problem-nvs-corrupted/
I also added some capability in wifimanager to do this with special define

Originally created by @tablatronix on GitHub (Feb 11, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/513 ## This has been merged into development The Development branch implements support for esp8266 and esp32 The espressif esp32 platform does not include webserver Tested with https://github.com/bbx10/WebServer_tng ## Known Isssues ### NVS corruption `W (84) wifi: wifi nvs_open fail ret=4353` or wifi wont connect with `ap not found` error There seems to be some kind of corruption of NVS in some version of core lib, or the partition was changed at some point. Reformatting NVS might help. how to fix https://desire.giesecke.tk/index.php/2018/02/26/wifi-connection-problem-nvs-corrupted/ I also added some capability in wifimanager to do this with special define
Author
Owner

@tablatronix commented on GitHub (Feb 11, 2018):

#241
#500

<!-- gh-comment-id:364794326 --> @tablatronix commented on GitHub (Feb 11, 2018): #241 #500
Author
Owner

@gepd commented on GitHub (Feb 13, 2018):

I'll let here a funtional example to compile the esp32 branch with PlatformIO, it includes the patched libraries webserver and dnsserver. The WiFiManager library will be downloaded automatically. (needs git installed)

I hope this can save time to anyone who like to test the branch.

WiFiManager_esp32.zip

<!-- gh-comment-id:365150211 --> @gepd commented on GitHub (Feb 13, 2018): I'll let here a funtional example to compile the esp32 branch with PlatformIO, it includes the patched libraries `webserver` and `dnsserver`. The `WiFiManager` library will be downloaded automatically. (needs git installed) I hope this can save time to anyone who like to test the branch. [WiFiManager_esp32.zip](https://github.com/tzapu/WiFiManager/files/1718682/WiFiManager_esp32.zip)
Author
Owner

@tablatronix commented on GitHub (Feb 15, 2018):

merged into development!

<!-- gh-comment-id:365937265 --> @tablatronix commented on GitHub (Feb 15, 2018): merged into development!
Author
Owner

@gepd commented on GitHub (Feb 17, 2018):

I've been testing the library so far it's very stable.

I've just missing an option to configure the hostname. I've manually solve this with:

void WiFiEvent(WiFiEvent_t event){
    switch(event) {
        case SYSTEM_EVENT_AP_START:
            WiFi.softAPsetHostname(HOSTNAME);
            break;
        case SYSTEM_EVENT_STA_START:
            WiFi.setHostname(HOSTNAME);
            break;
        default:
            break;
    }
}

void setup(){
    WiFi.disconnect(true);
    WiFi.onEvent(WiFiEvent);
    WiFi.begin();

// checks connection and perform a call to the config portal if it's neccessary
}

I've update handleWifi to get the list of available networks asynchronously, that way the UI loads within a second and then shows the list, I'll send a PR if you are interested

The last thing I'm missing is an option to display the reason why the connection wasn't able to be perform in the last try (STA mode). You will no always have access to read the debug output.

What could be the best way to implement this?
EEPROM, SPIFFS?

<!-- gh-comment-id:366477782 --> @gepd commented on GitHub (Feb 17, 2018): I've been testing the library so far it's very stable. I've just missing an option to configure the hostname. I've manually solve this with: ```cpp void WiFiEvent(WiFiEvent_t event){ switch(event) { case SYSTEM_EVENT_AP_START: WiFi.softAPsetHostname(HOSTNAME); break; case SYSTEM_EVENT_STA_START: WiFi.setHostname(HOSTNAME); break; default: break; } } void setup(){ WiFi.disconnect(true); WiFi.onEvent(WiFiEvent); WiFi.begin(); // checks connection and perform a call to the config portal if it's neccessary } ``` I've update `handleWifi` to get the list of available networks asynchronously, that way the UI loads within a second and then shows the list, I'll send a PR if you are interested The last thing I'm missing is an option to display the reason why the connection wasn't able to be perform in the last try (STA mode). You will no always have access to read the debug output. What could be the best way to implement this? EEPROM, SPIFFS?
Author
Owner

@tablatronix commented on GitHub (Feb 17, 2018):

Yeah that was on my list of todos

<!-- gh-comment-id:366478414 --> @tablatronix commented on GitHub (Feb 17, 2018): Yeah that was on my list of todos
Author
Owner

@tablatronix commented on GitHub (Feb 17, 2018):

Do you need to store it, or can it be a lifetime variable with a getter?

<!-- gh-comment-id:366478489 --> @tablatronix commented on GitHub (Feb 17, 2018): Do you need to store it, or can it be a lifetime variable with a getter?
Author
Owner

@tablatronix commented on GitHub (Feb 17, 2018):

The goal was to get esp32 working, then add additional features as needed and add special support for esp32 stuff that is not supported in esp8266 and also polyfill some stuff that is

<!-- gh-comment-id:366478600 --> @tablatronix commented on GitHub (Feb 17, 2018): The goal was to get esp32 working, then add additional features as needed and add special support for esp32 stuff that is not supported in esp8266 and also polyfill some stuff that is
Author
Owner

@tablatronix commented on GitHub (Feb 17, 2018):

Feel free to create issues for that because I have not had a chance to work much with it.

<!-- gh-comment-id:366478657 --> @tablatronix commented on GitHub (Feb 17, 2018): Feel free to create issues for that because I have not had a chance to work much with it.
Author
Owner

@gepd commented on GitHub (Feb 18, 2018):

I've create two issues, and will send a PR for the asynchronous fix

<!-- gh-comment-id:366482799 --> @gepd commented on GitHub (Feb 18, 2018): I've create two issues, and will send a PR for the asynchronous fix
Author
Owner

@tablatronix commented on GitHub (Mar 5, 2018):

✔️ DNS Server has been fixed in esp32 core

<!-- gh-comment-id:370543424 --> @tablatronix commented on GitHub (Mar 5, 2018): ✔️ DNS Server has been fixed in esp32 core
Author
Owner

@twinotter commented on GitHub (Apr 9, 2018):

I'd like to try this, but I'm a bit confused by the mulitple webserver approaches I've found online. Tablatronix, can you tell me how you set up your webserver library? Thanks!

<!-- gh-comment-id:379597804 --> @twinotter commented on GitHub (Apr 9, 2018): I'd like to try this, but I'm a bit confused by the mulitple webserver approaches I've found online. Tablatronix, can you tell me how you set up your webserver library? Thanks!
Author
Owner

@tablatronix commented on GitHub (Apr 9, 2018):

You need https://github.com/bbx10/WebServer_tng
Stick in esp32 libraries

I have not updated my fork , so do not suggest using it

<!-- gh-comment-id:379598545 --> @tablatronix commented on GitHub (Apr 9, 2018): You need https://github.com/bbx10/WebServer_tng Stick in esp32 libraries I have not updated my fork , so do not suggest using it
Author
Owner

@twinotter commented on GitHub (Apr 9, 2018):

thanks for the fast response! I got a little further using bbx10's WifiManager and WebServer_tng. But I'm still getting this error in compiling: user_interface.h: No such file or directory

Any ideas? I can't find user_interface.h in any of the Arduino libraries...

<!-- gh-comment-id:379601183 --> @twinotter commented on GitHub (Apr 9, 2018): thanks for the fast response! I got a little further using bbx10's WifiManager and WebServer_tng. But I'm still getting this error in compiling: user_interface.h: No such file or directory Any ideas? I can't find user_interface.h in any of the Arduino libraries...
Author
Owner

@tablatronix commented on GitHub (Apr 9, 2018):

No idea, you need to use development branch of wifimanager...

<!-- gh-comment-id:379604549 --> @tablatronix commented on GitHub (Apr 9, 2018): No idea, you need to use development branch of wifimanager...
Author
Owner

@tablatronix commented on GitHub (Apr 9, 2018):

Shit i posted the wrong link, so sorry for wasting your time.

Doh
Use this repo/development
And
https://github.com/bbx10/WebServer_tng

Sorry for the confusion

<!-- gh-comment-id:379605539 --> @tablatronix commented on GitHub (Apr 9, 2018): Shit i posted the wrong link, so sorry for wasting your time. Doh Use this repo/development And https://github.com/bbx10/WebServer_tng Sorry for the confusion
Author
Owner

@tablatronix commented on GitHub (Apr 9, 2018):

I updated first post for clarity

<!-- gh-comment-id:379607711 --> @tablatronix commented on GitHub (Apr 9, 2018): I updated first post for clarity
Author
Owner

@twinotter commented on GitHub (Apr 9, 2018):

It looks like the missing user_interface.h is related to a fairly different structure of the esp32 library from the esp8266 library. I installed the 8266 library and found the file in the tools/sdk folder. The equivalent folder in the esp32 folder structure doesn't have user_interface.h, os_types.h, and many others...

Perhaps this is a fundamentally different way that the esp32 libraries were installed? I used the Windows install path and everything seem to be updated... and I've compiled and run code on an ESP32 dev kit C... Is there a step I'm missing?

<!-- gh-comment-id:379610710 --> @twinotter commented on GitHub (Apr 9, 2018): It looks like the missing user_interface.h is related to a fairly different structure of the esp32 library from the esp8266 library. I installed the 8266 library and found the file in the tools/sdk folder. The equivalent folder in the esp32 folder structure doesn't have user_interface.h, os_types.h, and many others... Perhaps this is a fundamentally different way that the esp32 libraries were installed? I used the Windows install path and everything seem to be updated... and I've compiled and run code on an ESP32 dev kit C... Is there a step I'm missing?
Author
Owner

@tablatronix commented on GitHub (Apr 9, 2018):

Are you using development branch? Esp32 doesnt use this file that I know of, what is including it?

<!-- gh-comment-id:379728103 --> @tablatronix commented on GitHub (Apr 9, 2018): Are you using development branch? Esp32 doesnt use this file that I know of, what is including it?
Author
Owner

@twinotter commented on GitHub (Apr 9, 2018):

!! Okay, so my understanding of git is clearly very limited. Not sure how to use the gui to checkout a branch. But I found a command-line that would do it and used that, so now I'm at least looking at the same files. :)

git clone https://github.com/tzapu/WiFiManager.git --branch development --single-branch WiFiManager

btw, the way NOT to do it: don't select the branch from the main git page and then expect that the clone link has been updated. :)

That portion of the code compiled and I'm off working on other bugs now. Thank you!

<!-- gh-comment-id:379747282 --> @twinotter commented on GitHub (Apr 9, 2018): !! Okay, so my understanding of git is clearly very limited. Not sure how to use the gui to checkout a branch. But I found a command-line that would do it and used that, so now I'm at least looking at the same files. :) `git clone https://github.com/tzapu/WiFiManager.git --branch development --single-branch WiFiManager` btw, the way NOT to do it: don't select the branch from the main git page and then expect that the clone link has been updated. :) That portion of the code compiled and I'm off working on other bugs now. Thank you!
Author
Owner

@tablatronix commented on GitHub (Apr 9, 2018):

Yeah the clone does the repo not a branch, to do a branch select development from be branch dropdown and download the zip. Or use girhub desktop and just change branch.

<!-- gh-comment-id:379775895 --> @tablatronix commented on GitHub (Apr 9, 2018): Yeah the clone does the repo not a branch, to do a branch select development from be branch dropdown and download the zip. Or use girhub desktop and just change branch.
Author
Owner

@bkrajendra commented on GitHub (Jun 10, 2018):

What's the issue if we use https://github.com/me-no-dev/ESPAsyncWebServer for both eso8266 and esp32? Its more stable and working library.

<!-- gh-comment-id:396083360 --> @bkrajendra commented on GitHub (Jun 10, 2018): What's the issue if we use https://github.com/me-no-dev/ESPAsyncWebServer for both eso8266 and esp32? Its more stable and working library.
Author
Owner

@tablatronix commented on GitHub (Jun 11, 2018):

Its larger... and not official either

<!-- gh-comment-id:396097193 --> @tablatronix commented on GitHub (Jun 11, 2018): Its larger... and not official either
Author
Owner

@naveenneog commented on GitHub (Jul 10, 2018):

ESP32 WebServer is now available in the core PR#430 is closed

<!-- gh-comment-id:403764552 --> @naveenneog commented on GitHub (Jul 10, 2018): ESP32 WebServer is now available in the core PR#430 is closed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#432
No description provided.