Skip to content
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

Esp32 testing #513

Open
tablatronix opened this issue Feb 11, 2018 · 23 comments
Open

Esp32 testing #513

tablatronix opened this issue Feb 11, 2018 · 23 comments
Labels
Documentation Flagged for docs ESP32 Esp 32 related issue QA Quality Assurance testing needed
Milestone

Comments

@tablatronix
Copy link
Collaborator

tablatronix commented Feb 11, 2018

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

@tablatronix tablatronix added DEV Help Wanted Developer Needs Help In Progress Needs Feeback Developer needs feedback Documentation Flagged for docs labels Feb 11, 2018
@tablatronix tablatronix added this to the dev milestone Feb 11, 2018
@tablatronix tablatronix added the Branch This applies to a branch label Feb 11, 2018
@tablatronix
Copy link
Collaborator Author

tablatronix commented Feb 11, 2018

#241
#500

@gepd
Copy link

gepd commented 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

@tablatronix
Copy link
Collaborator Author

merged into development!

@gepd
Copy link

gepd commented 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?

@tablatronix
Copy link
Collaborator Author

Yeah that was on my list of todos

@tablatronix
Copy link
Collaborator Author

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

@tablatronix
Copy link
Collaborator Author

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

@tablatronix
Copy link
Collaborator Author

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

@gepd
Copy link

gepd commented Feb 18, 2018

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

@tablatronix tablatronix added QA Quality Assurance testing needed and removed Branch This applies to a branch In Progress Needs Feeback Developer needs feedback DEV Help Wanted Developer Needs Help labels Feb 21, 2018
@tablatronix
Copy link
Collaborator Author

tablatronix commented Mar 5, 2018

✔️ DNS Server has been fixed in esp32 core

@tablatronix tablatronix added ESP32 Esp 32 related issue and removed ESP32 Esp 32 related issue labels Mar 14, 2018
@twinotter
Copy link

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!

@tablatronix
Copy link
Collaborator Author

tablatronix commented 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

@twinotter
Copy link

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...

@tablatronix
Copy link
Collaborator Author

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

@tablatronix
Copy link
Collaborator Author

tablatronix commented 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

@tablatronix
Copy link
Collaborator Author

I updated first post for clarity

@twinotter
Copy link

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?

@tablatronix
Copy link
Collaborator Author

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

@twinotter
Copy link

!! 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!

@tablatronix
Copy link
Collaborator Author

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.

@bkrajendra
Copy link

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.

@tablatronix
Copy link
Collaborator Author

Its larger... and not official either

@naveenneog
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Flagged for docs ESP32 Esp 32 related issue QA Quality Assurance testing needed
Projects
None yet
Development

No branches or pull requests

5 participants