Page 1 of 1

A Disconnect button to annoy people?

Posted: 25 May 2019, 18:03
by pgielen
When trying to make my Wemos D1 mini (running on ESPEasy 20190511), connect to another Wifi network, I pushed the DISCONNECT button in the web-interface. As a result, the device disconnected, but did not connect to anything anymore after that.

Obviously, without a web-interface, you can't reconnect! I tried a soft reset, factory reset (D3 to GND), reflashing the blank and next the latest firmware image (20190523), but just couldn't get it to work anymore. It cost me an hour until I just tried re-installing firmware version 20190511. After that, I could re-enter all the settings.

The re-installation problems may or may not have something to do with firmware version 20190523, but why is the DISCONNECT button even there in the interface, when the only purpose it seems to have is to annoy people? I'd label it: 'Don't push this button!' (probably only to the effect that more people will give it a try ;) .

Re: A Disconnect button to annoy people?

Posted: 25 May 2019, 19:44
by grovkillen
You may want to use it to enter AP mode. If it didn't we might have a bug.

Re: A Disconnect button to annoy people?

Posted: 26 May 2019, 04:43
by ThomasB
I suspect this may be a bug. Please check the Command_Wifi_Disconnect() function in WiFi.h; There is a chance it will erase the SSID and password from WiFi STA.

Here is some info about preventing a disconnect's SSID erase: https://github.com/tzapu/WiFiManager/is ... -272458858

The Tools=>Disconnect feature is intended to *temporarily* disconnect STA mode and enable AP mode. But perhaps it can't do that as-is. Or maybe it can; I haven't tried it myself since I don't want to risk bricking one of my devices.

- Thomas

Re: A Disconnect button to annoy people?

Posted: 28 May 2019, 10:23
by TD-er
I have used that button myself a lot.
For example I use it myself to test disconnect events and trying to reproduce reported issues.
It is indeed a temporary disconnect, so it will be forced to try and reconnect.
If there is no known AP available, it should start AP mode for setup.

One of the first lines in ESPeasy setup function is about disabling the WiFi persistent mode.
Meaning it should not try to write the wifi connection parameters to flash every time (and thus killing the flash)
It is for sure not intended to lock out a user and I have not seen it do that.
If it would have happened here, I would for sure have fixed that (or removed it), since I also do not like to be annoyed :)

Re: A Disconnect button to annoy people?

Posted: 28 May 2019, 17:02
by ThomasB
@TD-er, thank you for calming my worries. @Everyone, ignore my remarks.

- Thomas