First Stable Version
Pre-releaseFirst Stable Version with a lot of to-do.
Device Connects AP via information from HTTP server and when connection establishes, the device automatically saves the creds to the NVS and closes the HTTP Server. After any restart device first look nvs and accordingly the result from nvs re-opens HTTP server for new connection or doesn't open any task and establish connection using creds from nvs. It can connect any open-wifi network except whose have a captive portal to do it. Only you can do for it now giving any password info to device and clicks connect. ( Js side is already knows AP authmode but I don't update web side for a long time because of to-do list of project)
Whole infrastructure is event-driven and it should have minimal cpu time, also it uses only %30 percent of I/SRAM of ESP32-C3-DevKitM-1.If anyone wants to change any parameter of wifiManager, can use menuconfig every parameter of application is defined in KConfig file.
Usage
Due to its a first stable version; you should config some parameters of your menuconfig with your own, these parameters are:
- You should set Max HTTP URI Length to 1024.
- If you have 4 MB flash, you set Partition Table to "Single factory app (large), no OTA".
After that, anyone wants to use this project just copy and paste "components" folder to your project and add this set(EXTRA_COMPONENT_DIRS components/)
this to the main CMake project.
Your CMake is should looking like this ,after:
# For more information about build system see
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS components/) # Add the components directory to the project
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(ESP32_WifiManager) # This is unique to your project.
After this steps you can just call ´´´wifiManager.h´´´ from any file and call ´´´wifiManager_init();´´´ function, also you can look at main part of project to see.
Also you can just download whole version and send it to the device.
Minimum Requirements:
Any esp32 with 4 MB flash.
Cases:
- If NVS creds found when opening, only opens relevant tasks and not opens or initializes HTTP related tasks. When device disconnects, firstly saved creds cleared out and opens HTTP and related tasks.
- If NVS creds not found opens all tasks of device and waits for connection request from web server. When establishes, saves creds and closes HTTP server and related tasks and queues. If disconnects, deletes creds and restarts esp32.
Active To-do List :
- Dynamic AP name.
- Button Interrupt for deleting creds. ( I will do it choosable for your own need for to use max_retry number or button for deleting creds)
- mDNS.
Missing :
- HTTP User Experience is in pre-release version, not handling every command I sent from Esp32 with not good looking user interface. Maybe I won't update this for a long time due to long to-do list of this project.
- Manual Connect button is not working, it is now a test button for dynamically creates new buttons with NULL ssid and other infos. (It's not a bug, It's a feature)
LICENSE
License is not included with source code files below here but these are uses same license as project, don't forget it.