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

Change autoreconnect and persistent defaults to be disabled (BREAKING) #7303

Closed
6 tasks done
devyte opened this issue May 14, 2020 · 1 comment · Fixed by #7902
Closed
6 tasks done

Change autoreconnect and persistent defaults to be disabled (BREAKING) #7303

devyte opened this issue May 14, 2020 · 1 comment · Fixed by #7902

Comments

@devyte
Copy link
Collaborator

devyte commented May 14, 2020

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: All
  • Core Version: latest git

Settings in IDE

  • Module: all
  • Flash Mode: all
  • Flash Size: all

Problem Description

The SDK has a "feature" called persistence where the wifi credentials are "remembered" between connections. This is meant to ease setup, and reconnect faster on boot, but in practice the user sets up a connection with his own credentials.
There are reasons to use this feature, such as low power applications, but in the general use case there is a danger of switching between different wifi configs, such as with Multi, and every time a different connection is made, the new info is written to flash. It is quite easy for a new user to do the Wrong Thing and burn the flash sector due to this.
In addition, there is an autoreconnect feature that is related, which works under the hood. Given certain conditions, it will take a long time for the user to get a hint that the station has disconnected from the AP.

On the other hand, the typical use cases where these features would be most useful, such as low power applications, are generally advanced enough for the user to have Done His Homework about what they do, how they work, and what to do if something goes wrong.

This is proposal to change both defaults to disabled. The normal user should understand what is happening from looking at the code, and not have to guess about how some subsystem is trying to do things hidden away from view, especially when that logic is difficult to trace. If needed, both features can be enabled by calling the appropriate methods.

@ElToberino
Copy link

I really don't think that it is the right way to abandon this excellent feature as default setting - only because it seems to be a little complicate at first sight.

Yes - it is confusing for beginners that the device does something without an explicit call in the code. I remember my first attempts with an ESP - it took me a while to find out how the connection process and the storing of the credentials works. But on the other hand - everyone has to learn a lot when he starts programming an ESP and it's really not so hard to get this information.

Making autoconnect only optional you would actually abandon this excellent feature because the greatest part of the users would never activate this feature or even know that is is existing.

So please, leave it as default setting - which is, in my opinion, one of the coolest ESP8266 features.
By the way: On the ESP32 the autoconnect feature doesn't work properly and I really, really miss it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants