tonyp7 / esp32-wifi-manager

Captive Portal for ESP32 that can connect to a saved wireless network or start an access point where you can connect to existing wifis.
MIT License
664 stars 217 forks source link

Need for RESET connections on Start index.html screen #29

Closed JanDebiec closed 4 years ago

JanDebiec commented 5 years ago

The following use case:

  1. Application is fresh loaded in ESP32
  2. Location A 2.1 Start: connection from client to 192.168.1.1 we see the list of networks, we can connect. The configured connection: "NetworkA"
  3. Location B, network "NetworkA" is not there. 3.1. connection from clien to 192.168.1.1. No list of available connections is shown. A Try to manual connect does not work. 3.2. From Postman request GET /status.json gives the name of "NetworkA"
  4. on host PC from Postman: request DELETE /connection.json
  5. 1 status is cleaned 4.2. 192.168.1.1. gives the list of available networks

Resume: it is not possible from HTML interface alone to reconfigure the settings. First the request DELETE /connect.json restarts the application. THe Button "RESET connections: with action request DELETE could fix the issue

I'm newbie in HTML and my own HTML experience are to small to fix it clean Jan

tonyp7 commented 5 years ago

I am not able to reproduce. If I connect to a wifi using my phone I can see the network correctly on my tablet. Not sure really what is causing this.

JanDebiec commented 5 years ago

To reproduce the issue, you should change the localisation from A to B. in localisation A, wifi-manager was configured and connected to WLAN-A. In B localisation, is no WLAN-A. wifi-manager has no access to configured WLAN (WLAN-A). then, it is not possibe to reconfigure, without DELETE /connections.json

tonyp7 commented 5 years ago

This seems to be a confirmed bug. The app must be in range to show the wifi it's connected to.

I'm unsure if it's worth fixing though. The purpose of the wifi manager is to be typically used in the context of a IoT device in a home wifi like a Chromecast.

I have marked it as such.

JanDebiec commented 5 years ago

Hi, Your app is one of the best I know, I really do appreciate your work. In this way, I have found that issue: i have prepared my app, extending your wifi-manager, tested at my home with my Wlan. Everything was perfect working. Then I've moved to my daughter home, with her Wifi installation. Then without using Postman (DELETE /connection.json) I was not able to configure the wifi-manager to work there. By Chromecast, you have the possibility to "Forget" actual WLAN, to reconfigure to another network Fixing that issue could be interesting, if more users will prepare the application in "development" environment and later use it in "real world" environment

tonyp7 commented 5 years ago

Hi Jan,

I'm convinced you're right. I'll have a look tomorrow. The bug is related to how the app lists and scan wifi. I think I have an idea on the fix.

Cheers

Vamshi253 commented 1 year ago

Hi tony,

Firstly, thank you for providing this wonderful wifi_manager app.

Is it possible to change the wifi network of esp32 to a different one that is already listed in the user interface of esp32-wifi-manager?

I have tried it, but I have been unsuccessful. I think whenever we try to change the wifi network, firstly it should raise the event WM_Order_Disconnect_STA followed by esp_wifi_disconnect(). There is already a function wifi_manager_disconnect_async() which triggers this event. This function is already in http_delete_handler() which won't trigger from any change.

Is there any workaround to this issue?