Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit c853431

Browse files
authored
Update
1 parent 4ae4f18 commit c853431

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

README.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ Thanks to this [ESPAsync_WiFiManager library](https://github.com/khoih-prog/ESPA
6868

6969
## Prerequisite
7070

71-
1. [`Arduino IDE 1.8.12+` for Arduino](https://www.arduino.cc/en/Main/Software)
72-
2. [`ESP8266 Core 2.7.3+`](https://github.com/esp8266/Arduino) for ESP8266-based boards.
71+
1. [`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software)
72+
2. [`ESP8266 Core 2.7.4+`](https://github.com/esp8266/Arduino) for ESP8266-based boards.
7373
3. [`ESP32 Core 1.0.4+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards
7474
4. [`ESPAsyncWebServer v1.2.3+`](https://github.com/me-no-dev/ESPAsyncWebServer) for all ESP32/ESP8266-based boards.
7575
5. [`ESPAsyncTCP v1.2.2+`](https://github.com/me-no-dev/ESPAsyncTCP) for ESP8266-based boards.
@@ -92,7 +92,7 @@ The best and easiest way is to use `Arduino Library Manager`. Search for `ESPAsy
9292
### VS Code & PlatformIO:
9393
1. Install [VS Code](https://code.visualstudio.com/)
9494
2. Install [PlatformIO](https://platformio.org/platformio-ide)
95-
3. Install **ESPAsync_WiFiManager** library by using [Library Manager](https://docs.platformio.org/en/latest/librarymanager/). Search for ***ESPAsync_WiFiManager*** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
95+
3. Install **ESPAsync_WiFiManager** library by using [Library Manager](https://docs.platformio.org/en/latest/librarymanager/). Search for **ESPAsync_WiFiManager** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
9696
4. Use included [platformio.ini](platformio/platformio.ini) file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples at [Project Configuration File](https://docs.platformio.org/page/projectconf.html)
9797

9898
---
@@ -107,11 +107,11 @@ The best and easiest way is to use `Arduino Library Manager`. Search for `ESPAsy
107107
// SSID and PW for Config Portal
108108
String ssid = "ESP_" + String(ESP_getChipId(), HEX);
109109
const char* password = "your_password";
110-
```
110+
```
111111
then connect WebBrowser to configurable ConfigPortal IP address, default is 192.168.4.1
112112

113-
- Choose one of the access points scanned, enter password, click ***Save***.
114-
- ESP will restart, then try to connect to the WiFi netwotk using STA-only mode, ***without running the ConfigPortal WebServer and WiFi AP***. See [Accessing manager after connection](https://github.com/khoih-prog/ESP_WiFiManager/issues/15).
113+
- Choose one of the access points scanned, enter password, click **Save**.
114+
- ESP will restart, then try to connect to the WiFi netwotk using STA-only mode, **without running the ConfigPortal WebServer and WiFi AP**. See [Accessing manager after connection](https://github.com/khoih-prog/ESP_WiFiManager/issues/15).
115115

116116
---
117117
---
@@ -121,6 +121,7 @@ then connect WebBrowser to configurable ConfigPortal IP address, default is 192.
121121
#### 1. Using default for every configurable parameter
122122

123123
- Include in your sketch
124+
124125
```cpp
125126
#ifdef ESP32
126127
#include <esp_wifi.h>
@@ -746,6 +747,7 @@ ESPAsync_wifiManager.setConfigPortalChannel(0);
746747

747748
Once WiFi network information is saved in the `ESP32 / ESP8266`, it will try to autoconnect to WiFi every time it is started, without requiring any function calls in the sketch.
748749

750+
---
749751
---
750752

751753
### Examples
@@ -773,6 +775,7 @@ Once WiFi network information is saved in the `ESP32 / ESP8266`, it will try to
773775
---
774776

775777
## So, how it works?
778+
776779
In `ConfigPortal Mode`, it starts an access point called `ESP_XXXXXX`. Connect to it using the `configurable password` you can define in the code. For example, `your_password` (see examples):
777780

778781
```cpp
@@ -804,21 +807,22 @@ Select `Configuration` to enter this page where you can select an AP and specify
804807
<img src="https://github.com/khoih-prog/ESPAsync_WiFiManager/blob/master/Images/Configuration_AIO_MQTT.png">
805808
</p>
806809

807-
Enter your credentials, then click ***Save***. The WiFi Credentials will be saved and the board reboots to connect to the selected WiFi AP.
810+
Enter your credentials, then click **Save**. The WiFi Credentials will be saved and the board reboots to connect to the selected WiFi AP.
808811

809812
<p align="center">
810813
<img src="https://github.com/khoih-prog/ESPAsync_WiFiManager/blob/master/Images/Saved.png">
811814
</p>
812815

813816

814-
If you're already connected to a listed WiFi AP and don't want to change anything, just select ***Exit Portal*** from the `Main` page to reboot the board and connect to the previously-stored AP. The WiFi Credentials are still intact.
817+
If you're already connected to a listed WiFi AP and don't want to change anything, just select **Exit Portal** from the `Main` page to reboot the board and connect to the previously-stored AP. The WiFi Credentials are still intact.
815818

816819
---
817820
---
818821

819822
## Documentation
820823

821824
#### Password protect the configuration Access Point
825+
822826
You can password protect the ConfigPortal AP. Simply add an SSID as the first parameter and the password as a second parameter to `startConfigPortal`. See the above examples.
823827

824828
A short password seems to have unpredictable results so use one that's around 8 characters or more in length.
@@ -831,6 +835,7 @@ ESPAsync_wifiManager.startConfigPortal( SSID , password )
831835
#### Callbacks
832836

833837
##### Save settings
838+
834839
This gets called when custom parameters have been set **AND** a connection has been established. Use it to set a flag, so when all the configuration finishes, you can save the extra parameters somewhere.
835840

836841
See [Async_ConfigOnSwitchFS Example](examples/Async_ConfigOnSwitchFS).
@@ -853,6 +858,7 @@ void saveConfigCallback ()
853858
```
854859

855860
#### ConfigPortal Timeout
861+
856862
If you need to set a timeout so the `ESP32 / ESP8266` doesn't hang waiting to be configured for ever.
857863

858864
```cpp
@@ -1664,7 +1670,7 @@ void wifi_manager()
16641670
// Extra parameters to be configured
16651671
// After connecting, parameter.getValue() will get you the configured value
16661672
// Format: <ID> <Placeholder text> <default value> <length> <custom HTML> <label placement>
1667-
// (*** we are not using <custom HTML> and <label placement> ***)
1673+
// (** we are not using <custom HTML> and <label placement> **)
16681674

16691675
// AIO_SERVER
16701676
ESPAsync_WMParameter AIO_SERVER_FIELD(AIO_SERVER_Label, "AIO SERVER", custom_AIO_SERVER, custom_AIO_SERVER_LEN + 1);
@@ -2081,7 +2087,7 @@ void loop()
20812087
20822088
### Debug Termimal Output Samples
20832089
2084-
1. This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr](examples/Async_ConfigOnDRD_FS_MQTT_Ptr) on ***ESP32 ESP32_DEV.***. Config Portal was requested by DRD to input and save MQTT Credentials. The boards then connected to Adafruit MQTT Server successfully.
2090+
1. This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr](examples/Async_ConfigOnDRD_FS_MQTT_Ptr) on **ESP32 ESP32_DEV.**. Config Portal was requested by DRD to input and save MQTT Credentials. The boards then connected to Adafruit MQTT Server successfully.
20852091
20862092
```
20872093
Starting Async_ConfigOnDRD_FS_MQTT_Ptr using SPIFFS on ESP32_DEV
@@ -2148,7 +2154,7 @@ MQTT connection successful!
21482154
TWWWW WTWWWW WWTW
21492155
```
21502156
2151-
2. This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr](examples/Async_ConfigOnDRD_FS_MQTT_Ptr) on ***ESP8266 NodeMCU 1.0.***. Config Portal was requested to input and save MQTT Credentials. The boards then connected to Adafruit MQTT Server successfully.
2157+
2. This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr](examples/Async_ConfigOnDRD_FS_MQTT_Ptr) on **ESP8266 NodeMCU 1.0.**. Config Portal was requested to input and save MQTT Credentials. The boards then connected to Adafruit MQTT Server successfully.
21522158
21532159
```
21542160
Starting Async_ConfigOnDRD_FS_MQTT_Ptr using LittleFS on ESP8266_NODEMCU
@@ -2215,7 +2221,7 @@ TWWWW WTWWW
22152221
```
22162222
---
22172223
2218-
3. This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/Async_ConfigOnDoubleReset) on ***ESP32 ESP32_DEV.***. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully. WiFi AP **HueNet1** is then lost, and board **autoreconnects** itself to backup WiFi AP **HueNet2**.
2224+
3. This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/Async_ConfigOnDoubleReset) on **ESP32 ESP32_DEV.**. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully. WiFi AP **HueNet1** is then lost, and board **autoreconnects** itself to backup WiFi AP **HueNet2**.
22192225
22202226
```cpp
22212227
Starting Async_ConfigOnDoubleReset with DoubleResetDetect using SPIFFS on ESP32_DEV
@@ -2270,7 +2276,7 @@ HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH
22702276
```
22712277
---
22722278

2273-
4. This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/Async_ConfigOnDoubleReset) on ***ESP8266_NODEMCU.***. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully. WiFi AP **HueNet1** is then lost, and board **autoreconnects** itself to backup WiFi AP **HueNet2**.
2279+
4. This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/Async_ConfigOnDoubleReset) on **ESP8266_NODEMCU.**. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully. WiFi AP **HueNet1** is then lost, and board **autoreconnects** itself to backup WiFi AP **HueNet2**.
22742280

22752281
```cpp
22762282
Starting Async_ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP8266_NODEMCU
@@ -2326,7 +2332,7 @@ HHHHHHHHHH HHHHHHHHHH HHH
23262332
23272333
---
23282334
2329-
5. This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/Async_ESP_FSWebServer_DRD) on ***ESP8266_NODEMCU.***. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully.
2335+
5. This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/Async_ESP_FSWebServer_DRD) on **ESP8266_NODEMCU.**. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully.
23302336
23312337
```cpp
23322338
Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU
@@ -2402,6 +2408,7 @@ By going to http://192.168.2.186/edit or http://async-esp8266fs.local/edit, you
24022408
---
24032409

24042410
### Debug
2411+
24052412
Debug is enabled by default on Serial. To disable, add before `startConfigPortal()`
24062413

24072414
```cpp
@@ -2495,7 +2502,7 @@ If you want to contribute to this project:
24952502

24962503
### License and credits ###
24972504

2498-
- The library is licensed under [MIT](https://github.com/khoih-prog/WebSockets2_Generic/blob/master/LICENSE)
2505+
- The library is licensed under [MIT](https://github.com/khoih-prog/ESPAsync_WiFiManager/blob/master/LICENSE)
24992506

25002507
---
25012508

0 commit comments

Comments
 (0)