[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


This forum is read only and new users cannot register, please ask all new questions either using GitHub discussions, or in Arduino forum tagging @davetcc.

Bug in webserver Plugin RSS feed
Forum Index » tcMenu Arduinio library
Author Message
Blueforcer


Joined: Apr 14, 2022
Messages: 7
Offline
For my latest project i found your awesome lib, thank you for your huge work!

Maybe i found a small "bug" in the Webserver Plugin.

My device only has 4 Buttons, so it could be a bit hard to enter SSID and Password smilie
From a purely logical point of view, I would use the web server plugin, since there is currently no smartphone app.
So on fresh device, there is of course no wifi settings available, so the ESP need to open a hotspot where i can enter SSID and password in the webserver.

I found the example https://github.com/davetcc/tcMenuLib/blob/master/examples/esp8266WifiOled/esp8266WifiOled.ino. Wich opens a hotspot when there is no SSID.

For that i needed to remove line 78
"if(!WiFi.isConnected()) return false;"
in tcMenuEspAsyncWEbserver.cpp
because at this point the esp is of course not connected and the webserver will never be started.

Maybe this could be fixed in the next verion?


davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
"if(!WiFi.isConnected()) return false;"
in tcMenuEspAsyncWEbserver.cpp
because at this point the esp is of course not connected and the webserver will never be started.


attemptInitialisation is constantly called until it succeeds, to avoid freezing up the task queue.

This is the runLoop for remote connections:

void BaseRemoteServerConnection::runLoop() {
    if(!initialisation.isInitialised()) {
        initialisation.attemptInitialisation();
    }
    else if (!connected()) {
        initialisation.attemptNewConnection(this);
    } else {
        tick();
    }
}


From BaseRemoteServerConnection::runLoop. Is it not working as intended?
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
BTW - any other feedback you have on the webserver version would be really useful as it's still an experimental plugin at the moment. So I'm trying to determine stability and usefulness.
Blueforcer


Joined: Apr 14, 2022
Messages: 7
Offline
attemptInitialisation is called the whole time
but
WiFi.isConnected() can only be true in WIFI_STA Mode.
->"is STA interface connected?"

in WIFI_AP mode it will be always false, no matter if a device ist connected to the AP
Blueforcer


Joined: Apr 14, 2022
Messages: 7
Offline
davetcc wrote:BTW - any other feedback you have on the webserver version would be really useful as it's still an experimental plugin at the moment. So I'm trying to determine stability and usefulness.


Should i open a new post for every feedback?
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
Agreed I’ll change the example to work a different way

For any feedback - https://www.thecoderscorner.com/jforum/posts/list/0/196.page
 
Forum Index » tcMenu Arduinio library
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.