Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
I was wondering why this library has its own bespoke NVS functionality. The esp-idf's wifi API already optionally stores SSID and password in NVS. It seems that this library could be simplified by removing this code and relying on the built-in functionality. This also has the advantage of better interoperability with other code that wants to set or retrieve wifi credentials.
In this PR I've attempted this. Consider this a work-in-progress and request-for-comments. Surely there are edge cases that I have not considered.
For my purposes, I'm looking for ways to simplify this library, and give more control back to the calling application. I really like having an AP + captive portal to configure wifi credentials, but currently this library exerts too much control over all aspects of networking. My devices need the flexibility to try a default wifi network, use ethernet if equipped, or even disable networking altogether. If this goal doesn't align with yours, let me know and I can hack away and maintain my own fork and not waste your time. :)