You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
### Releases 1.0.7
1. Use `just-in-time` scanWiFiNetworks() to reduce connection time necessary for battery-operated DeepSleep application. Thanks to [CrispinP](https://github.com/CrispinP) for identifying, requesting and testing. See [Starting WiFIManger is very slow (2000ms)](#6)
2. Fix bug relating SPIFFS in examples :
- [ConfigOnSwitchFS](examples/ConfigOnSwitchFS)
- [ConfigPortalParamsOnSwitch](examples/ConfigPortalParamsOnSwitch) (now support ArduinoJson 6.0.0+ as well as 5.13.5-)
- [AutoConnectWithFSParameters](examples/AutoConnectWithFSParameters)
See [Having issue to read the SPIFF file](#14), Thanks to [OttoKlaasen](https://github.com/OttoKlaasen) to report.
3. Fix [README](README.md). See [Accessing manager after connection](#15)
1. Use `just-in-time` scanWiFiNetworks() to reduce connection time necessary for battery-operated DeepSleep application. Thanks to [CrispinP](https://github.com/CrispinP) for identifying, requesting and testing. See [Starting WiFIManger is very slow (2000ms)](https://github.com/khoih-prog/ESP_WiFiManager/issues/6)
8
+
2. Fix bug relating SPIFFS in examples :
9
+
-[ConfigOnSwitchFS](examples/ConfigOnSwitchFS)
10
+
-[ConfigPortalParamsOnSwitch](examples/ConfigPortalParamsOnSwitch) (now support ArduinoJson 6.0.0+ as well as 5.13.5-)
See [Having issue to read the SPIFF file](https://github.com/khoih-prog/ESP_WiFiManager/issues/14), Thanks to [OttoKlaasen](https://github.com/OttoKlaasen) to report.
13
+
3. Fix [README](README.md). See [Accessing manager after connection](https://github.com/khoih-prog/ESP_WiFiManager/issues/15)
14
+
5
15
### Releases 1.0.6
6
16
7
17
1. Add function getConfigPortalPW()
@@ -14,10 +24,8 @@ This library is based on, modified, bug-fixed and improved from:
14
24
15
25
to add support to `ESP32` besides `ESP8266`.
16
26
17
-
This is an `ESP32 / ESP8266` WiFi Connection manager with fallback web configuration portal.
18
-
It's using a web configuration portal, served from the `ESP32 / ESP8266`, and operating as an access point.
19
-
20
-
The configuration portal is captive, so it will present the configuration dialogue regardless of the web address selected, excluding https requests.
27
+
This is an `ESP32 / ESP8266` WiFi Connection manager with fallback web ConfigPortal.
28
+
It's using a web ConfigPortal, served from the `ESP32 / ESP8266`, and operating as an access point.
21
29
22
30
## Prerequisite
23
31
1.[`Arduino IDE 1.8.12 or later` for Arduino](https://www.arduino.cc/en/Main/Software)
@@ -28,14 +36,18 @@ The configuration portal is captive, so it will present the configuration dialog
28
36
## How It Works
29
37
30
38
- The [ConfigOnSwitch](examples/ConfigOnSwitch) example shows how it works and should be used as the basis for a sketch that uses this library.
31
-
- The concept of ConfigOnSwitch is that a new `ESP32 / ESP8266` will start a WiFi configuration portal when powered up and save the configuration data in non volatile memory. Thereafter, the configuration portal will only be started again if a button is pushed on the `ESP32 / ESP8266` module.
32
-
- Using any WiFi enabled device with a browser (computer, phone, tablet) connect to the newly created Access Point and type in any http address.
33
-
- Because of the Captive Portal and the DNS server you will either get a 'Join to network' type of popup or get any domain you try to access redirected to the configuration portal.
34
-
- All http web addresses will be redirected to wifi.urremote.com which will be at IP address `192.168.4.1` . This address is also a valid internet address where the user will see advice that they are connected to the wrong network.
35
-
- Choose one of the access points scanned, enter password, click save.
36
-
- ESP will try to connect. If successful, the IP address on the new network will be displayed in the configuration portal.
37
-
- The configuration portal will now be visible on two networks, these being it's own network and the network to which it has connected. On it's own network it will have two IP addresses, the original `192.168.4.1` and the same IP address it has on the network to which it connected.
38
-
- Selecting "close configuration portal" will shutdown the web server, shutdown the `ESP32 / ESP8266` WiFi network and return control to the following sketch code.
39
+
- The concept of ConfigOnSwitch is that a new `ESP32 / ESP8266` will start a WiFi ConfigPortal when powered up and save the configuration data in non volatile memory. Thereafter, the ConfigPortal will only be started again if a button is pushed on the `ESP32 / ESP8266` module.
40
+
- Using any WiFi enabled device with a browser (computer, phone, tablet) connect to the newly created Access Point (AP) using configurable SSID and Password (specified in sketch)
then connect WebBrower to configurable ConfigPortal IP address, default is 192.168.4.1
48
+
49
+
- Choose one of the access points scanned, enter password, click ***Save***.
50
+
- 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).
39
51
40
52
## Quick Start
41
53
@@ -109,8 +121,14 @@ then later call
109
121
ESP_wifiManager.startConfigPortal()
110
122
```
111
123
112
-
While in AP mode, connect to it using its `SSID` (ESP_XXXXXX) / `Password` ("your_password"), then open a browser to the gateway IP, default `192.168.4.1`, configure wifi then save. The WiFi connection information will be saved in non volatile memory. It will then reboot and autoconnect.
124
+
While in AP mode, connect to it using its `SSID` (ESP_XXXXXX) / `Password` ("your_password"), then open a browser to the AP IP, default `192.168.4.1`, configure wifi then save. The WiFi connection information will be saved in non volatile memory. It will then reboot and autoconnect.
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.
In `Configuration Portal 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):
149
+
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):
132
150
133
151
```cpp
134
152
// SSID and PW for Config Portal
@@ -159,14 +177,14 @@ Select `Configuration` to enter this page where you can select an AP and specify
Enter your credentials, then click `Save`. The WiFi Credentials will be saved and the board reboots to connect to the selected WiFi AP.
180
+
Enter your credentials, then click ***Save***. The WiFi Credentials will be saved and the board reboots to connect to the selected WiFi AP.
163
181
164
-
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.
182
+
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.
165
183
166
184
## Documentation
167
185
168
186
#### Password protect the configuration Access Point
169
-
You can password protect the configuration access point. Simply add an SSID as the first parameter and the password as a second parameter to `startConfigPortal`. See the above examples.
187
+
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.
170
188
A short password seems to have unpredictable results so use one that's around 8 characters or more in length.
171
189
The guidelines are that a wifi password must consist of 8 to 63 ASCII-encoded characters in the range of 32 to 126 (decimal)
172
190
@@ -195,7 +213,7 @@ void saveConfigCallback () {
195
213
}
196
214
```
197
215
198
-
#### Configuration Portal Timeout
216
+
#### ConfigPortal Timeout
199
217
If you need to set a timeout so the `ESP32 / ESP8266` doesn't hang waiting to be configured for ever.
200
218
```cpp
201
219
ESP_wifiManager.setConfigPortalTimeout(60);
@@ -205,17 +223,17 @@ unless you're accessing the Config Portal. In this case, the `startConfigPortal`
205
223
the Config Portal.
206
224
207
225
208
-
#### On Demand Configuration Portal
226
+
#### On Demand ConfigPortal
209
227
210
228
Example usage
211
229
212
230
```cpp
213
231
voidloop()
214
232
{
215
-
// is configuration portal requested?
233
+
// is ConfigPortal requested?
216
234
if ((digitalRead(TRIGGER_PIN) == LOW) || (digitalRead(TRIGGER_PIN2) == LOW))
digitalWrite(PIN_LED, LED_ON); // turn the LED on by making the voltage LOW to tell us we are in configuration mode.
220
238
221
239
//Local intialization. Once its business is done, there is no need to keep it around
@@ -231,7 +249,7 @@ void loop()
231
249
232
250
//Check if there is stored WiFi router/password credentials.
233
251
//If not found, device will remain in configuration mode until switched off via webserver.
234
-
Serial.print("Opening configuration portal. ");
252
+
Serial.print("Opening ConfigPortal. ");
235
253
Router_SSID = ESP_wifiManager.WiFi_SSID();
236
254
if (Router_SSID != "")
237
255
{
@@ -264,7 +282,7 @@ void loop()
264
282
See [ConfigOnSwitch](examples/ConfigOnSwitch) example for a more complex version.
265
283
266
284
#### Custom Parameters
267
-
Many applications need configuration parameters like `MQTT host and port`, [Blynk](http://www.blynk.cc) or [emoncms](http://emoncms.org) tokens, etc. While it is possible to use `ESP_WiFiManager` to collect additional parameters it is better to read these parameters from a web service once `ESP_WiFiManager` has been used to connect to the internet. This makes `ESP_WiFiManager` simple to code and use, parameters can be edited on a regular web server and can be changed remotely after deployment. A web service that can provide these parameters is at [configure.urremote.com](http://configure.urremote.com/).
285
+
Many applications need configuration parameters like `MQTT host and port`, [Blynk](http://www.blynk.cc) or [emoncms](http://emoncms.org) tokens, etc. While it is possible to use `ESP_WiFiManager` to collect additional parameters it is better to read these parameters from a web service once `ESP_WiFiManager` has been used to connect to the internet.
268
286
269
287
To capture other parameters with `ESP_WiFiManager` is a lot more involved than all the other features and requires adding custom HTML to your form. If you want to do it with `ESP_WiFiManager` see the example [ConfigOnSwitchFS](examples/ConfigOnSwitchFS)
There are various ways in which you can inject custom HTML, CSS or Javascript into the configuration portal.
306
+
There are various ways in which you can inject custom HTML, CSS or Javascript into the ConfigPortal.
289
307
The options are:
290
308
- inject custom head element
291
-
You can use this to any html bit to the head of the configuration portal. If you add a `<style>` element, bare in mind it overwrites the included css, not replaces.
309
+
You can use this to any html bit to the head of the ConfigPortal. If you add a `<style>` element, bare in mind it overwrites the included css, not replaces.
@@ -337,8 +355,18 @@ If you get compilation errors, more often than not, you may need to install a ne
337
355
338
356
Sometimes, the library will only work if you update the `ESP32 / ESP8266` core to the latest version because I am using some newly added function.
339
357
340
-
If you connect to the created configuration Access Point but the configuration portal does not show up, just open a browser and type in the IP of the web portal, by default `192.168.4.1`.
358
+
If you connect to the created configuration Access Point but the ConfigPortal does not show up, just open a browser and type in the IP of the web portal, by default `192.168.4.1`.
359
+
360
+
### Releases 1.0.7
341
361
362
+
1. Use `just-in-time` scanWiFiNetworks() to reduce connection time necessary for battery-operated DeepSleep application. Thanks to [CrispinP](https://github.com/CrispinP) for identifying, requesting and testing. See [Starting WiFIManger is very slow (2000ms)](https://github.com/khoih-prog/ESP_WiFiManager/issues/6)
363
+
2. Fix bug relating SPIFFS in examples :
364
+
-[ConfigOnSwitchFS](examples/ConfigOnSwitchFS)
365
+
-[ConfigPortalParamsOnSwitch](examples/ConfigPortalParamsOnSwitch) (now support ArduinoJson 6.0.0+ as well as 5.13.5-)
See [Having issue to read the SPIFF file](https://github.com/khoih-prog/ESP_WiFiManager/issues/14), Thanks to [OttoKlaasen](https://github.com/OttoKlaasen) to report.
368
+
3. Fix [README](README.md). See [Accessing manager after connection](https://github.com/khoih-prog/ESP_WiFiManager/issues/15)
369
+
342
370
### Releases 1.0.6
343
371
344
372
#### New in v1.0.6
@@ -390,8 +418,8 @@ See [KenTaylor's version](https://github.com/kentaylor/WiFiManager) for previous
390
418
### Contributions and thanks
391
419
1. Based on and modified from [Tzapu](https://github.com/tzapu/WiFiManager) and [KenTaylor's version](https://github.com/kentaylor/WiFiManager)
392
420
2. Thanks to [Amorphous](https://community.blynk.cc/t/esp-wifimanager-for-esp32-and-esp8266/42257/13) for the static DNS feature and code, included in v1.0.5
393
-
3. Thanks to [CrispinP](https://github.com/CrispinP) for idea to add HostName (v1.0.4) and request to reduce the unnecessary waiting time in ESP_WiFiManager constructor (v1.0.6+).
394
-
4. Thanks to [OttoKlaasen](https://github.com/OttoKlaasen) for reporting [Having issue to read the SPIFF file](https://github.com/khoih-prog/ESP_WiFiManager/issues/14) bug.
421
+
3. Thanks to [CrispinP](https://github.com/CrispinP) for idea to add HostName (v1.0.4) and request to reduce the unnecessary waiting time in ESP_WiFiManager constructor (v1.0.6+). See [Starting WiFIManger is very slow (2000ms)](https://github.com/khoih-prog/ESP_WiFiManager/issues/6)
422
+
4. Thanks to [OttoKlaasen](https://github.com/OttoKlaasen) for reporting [Having issue to read the SPIFF file](https://github.com/khoih-prog/ESP_WiFiManager/issues/14) bug in examples.
0 commit comments