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

Commit

Permalink
v1.7.8 to permit using HTTP port different from 80
Browse files Browse the repository at this point in the history
### Releases v1.7.8

1. To permit using HTTP port different from 80. Check [WiFiManager works only on port 80 #75](khoih-prog/ESPAsync_WiFiManager#75)
2. Fix bug returning IP `255.255.255.255` in core v2.0.0+ when using `hostname`
  • Loading branch information
khoih-prog authored Dec 1, 2021
1 parent 8e4d8a7 commit d1436e7
Show file tree
Hide file tree
Showing 31 changed files with 276 additions and 70 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Please ensure to specify the following:
Arduino IDE version: 1.8.16
ESP8266 Core Version 3.0.2
OS: Ubuntu 20.04 LTS
Linux Inspiron 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Linux Inspiron 5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Context:
I encountered an endless loop while trying to connect to Local WiFi.
Expand Down
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,7 @@ ESP_wifiManager.setRemoveDuplicateAPs(false);
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
#endif

#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.7"
#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.8"

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _WIFIMGR_LOGLEVEL_ 3
Expand Down Expand Up @@ -2460,6 +2460,9 @@ IPAddress APStaticIP = IPAddress(192, 168, 100, 1);
IPAddress APStaticGW = IPAddress(192, 168, 100, 1);
IPAddress APStaticSN = IPAddress(255, 255, 255, 0);

// Must be placed before #include <ESP_WiFiManager.h>, or default port 80 will be used
//#define HTTP_PORT 8080

#include <ESP_WiFiManager.h> //https://github.com/khoih-prog/ESP_WiFiManager

#define HTTP_PORT 80
Expand Down Expand Up @@ -2785,10 +2788,10 @@ bool loadConfigData()
File file = FileFS.open(CONFIG_FILENAME, "r");
LOGERROR(F("LoadWiFiCfgFile "));

memset((void*) &WM_config, 0, sizeof(WM_config));
memset((void *) &WM_config, 0, sizeof(WM_config));

// New in v1.4.0
memset((void*) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig));
memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig));
//////

if (file)
Expand Down Expand Up @@ -3027,6 +3030,10 @@ void wifi_manager()
Serial.print(F("192.168.4.1"));
#endif

#if defined(HTTP_PORT_TO_USE)
Serial.print(F(":")); Serial.print(HTTP_PORT_TO_USE);
#endif

Serial.print(F(", SSID = "));
Serial.print(ssid);
Serial.print(F(", PWD = "));
Expand Down Expand Up @@ -3483,7 +3490,7 @@ This is terminal debug output when running [ConfigOnSwitchFS_MQTT_Ptr](examples/
```
Starting ConfigOnSwichFS_MQTT_Ptr using LittleFS on ESP8266_NODEMCU_ESP12E
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
Configuration file not found
Failed to read configuration file, using default values
[WM] RFC925 Hostname = ConfigOnSwichFS-MQTT
Expand Down Expand Up @@ -3595,7 +3602,7 @@ This is terminal debug output when running [ESP32_FSWebServer_DRD](examples/ESP3
```cpp
Starting ESP32_FSWebServer_DRD with DoubleResetDetect using SPIFFS on ESP32_DEV
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
FS File: /ConfigSW.json, size: 150B
FS File: /CanadaFlag_1.png, size: 40.25KB
Expand Down Expand Up @@ -3660,7 +3667,7 @@ This is terminal debug output when running [ESP32_FSWebServer_DRD](examples/ESP3

```
Starting ESP32_FSWebServer_DRD with DoubleResetDetect using LittleFS on ESP32_DEV
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
FS File: /CanadaFlag_1.png, size: 40.25KB
FS File: /CanadaFlag_2.png, size: 8.12KB
Expand Down Expand Up @@ -3719,7 +3726,7 @@ This is terminal debug output when running [ConfigOnDRD_FS_MQTT_Ptr_Complex](exa

```
Starting ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP32_DEV
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
{"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"}
Config File successfully parsed
Expand Down Expand Up @@ -3762,7 +3769,7 @@ WWWW WTWWWW WWTWWW WWWTWW WWWWTW WWWWW

```
Starting ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP32_DEV
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
{"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"}
Config File successfully parsed
Expand Down Expand Up @@ -3847,7 +3854,7 @@ This is terminal debug output when running [ConfigOnDRD_FS_MQTT_Ptr_Complex](exa

```
Starting ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP8266_NODEMCU_ESP12E
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
{"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"}
Config File successfully parsed
Expand Down Expand Up @@ -3887,7 +3894,7 @@ TWWWW WTWWWW WWTWWW WWWTWW WWWWTW WWWWW

```
Starting ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP8266_NODEMCU_ESP12E
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
{"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"}
Config File successfully parsed
Expand Down Expand Up @@ -3964,7 +3971,7 @@ This is terminal debug output when running [ConfigOnDoubleReset](examples/Config

```
Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32S2_DEV
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] setAPStaticIPConfig
Expand Down Expand Up @@ -4014,7 +4021,7 @@ This is terminal debug output when running [ConfigOnDoubleReset](examples/Config

```
Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32_DEV
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] Set CORS Header to : Your Access-Control-Allow-Origin
Expand All @@ -4033,7 +4040,7 @@ doubleResetDetected
Saving config file...
Saving config file OK
Open Config Portal without Timeout: Double Reset Detected
Starting configuration portal @ 192.168.4.1, SSID = ESP_9ABF498, PWD = MyESP_9ABF498
Starting configuration portal @ 192.168.4.1:80, SSID = ESP_9ABF498, PWD = MyESP_9ABF498
```

#### 7.2 Data Saved => Connect to WiFi with correct local time, TZ set and using NTP
Expand Down Expand Up @@ -4124,7 +4131,7 @@ Local Date/Time: Thu May 6 21:29:18 2021

```
Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32_DEV
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] Set CORS Header to : Your Access-Control-Allow-Origin
Expand Down Expand Up @@ -4175,7 +4182,7 @@ This is terminal debug output when running [ConfigOnDoubleReset](examples/Config

```
Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32S2_DEV
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] Set CORS Header to : Your Access-Control-Allow-Origin
Expand All @@ -4190,7 +4197,7 @@ LittleFS Flag read = 0xD0D04321
No doubleResetDetected
Saving config file...
Saving config file OK
Starting configuration portal @ 192.168.4.1, SSID = ESP_8A1DF7C, PWD = MyESP_8A1DF7C
Starting configuration portal @ 192.168.4.1:80, SSID = ESP_8A1DF7C, PWD = MyESP_8A1DF7C
```

#### 8.2 Data Saved => Connect to WiFi with correct local time, TZ set and using NTP
Expand Down Expand Up @@ -4321,7 +4328,7 @@ Local Date/Time: Thu May 6 21:29:18 2021

```
Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32S2_DEV
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] Set CORS Header to : Your Access-Control-Allow-Origin
Expand Down Expand Up @@ -4374,7 +4381,7 @@ This is terminal debug output when running [ESP32_FSWebServer_DRD](examples/ESP3

```
Starting ESP32_FSWebServer_DRD with DoubleResetDetect using SPIFFS on ESP32C3_DEV
ESP_WiFiManager v1.7.7
ESP_WiFiManager v1.7.8
ESP_DoubleResetDetector v1.2.1
FS File: wm_cp.dat, size: 4B
FS File: wm_cp.bak, size: 4B
Expand Down Expand Up @@ -4496,7 +4503,7 @@ Submit issues to: [ESP_WiFiManager issues](https://github.com/khoih-prog/ESP_WiF
14. Thanks to [Stephen Lavelle](https://github.com/increpare) and [Ben Peart](https://github.com/benpeart) for requesting enhancement in [_timezoneName never getting set? #51](https://github.com/khoih-prog/ESP_WiFiManager/issues/51) and [How to retrieve timezone? #51](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues/51) leading to new v1.7.0
15. Thanks to [energise](https://github.com/energise) to report the issue in [Invalid Json generated #60](https://github.com/khoih-prog/ESP_WiFiManager/issues/60) leading to new v1.7.1
16. Thanks to [eth0up](https://github.com/eth0up) to make the PR [Add support for Wifi hidden SSID scanning. #66](https://github.com/khoih-prog/ESP_WiFiManager/pull/66) leading to v1.7.4

17. Thanks to [Dean Ott](https://github.com/deanjott) for reporting [WiFiManager works only on port 80 #75](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues/75) and providing the solution leading to v1.7.8

<table>
<tr>
Expand Down Expand Up @@ -4525,6 +4532,7 @@ Submit issues to: [ESP_WiFiManager issues](https://github.com/khoih-prog/ESP_WiF
</tr>
<tr>
<td align="center"><a href="https://github.com/eth0up"><img src="https://github.com/eth0up.png" width="100px;" alt="eth0up"/><br /><sub><b>eth0up</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/deanjott"><img src="https://github.com/deanjott.png" width="100px;" alt="deanjott"/><br /><sub><b>Dean Ott</b></sub></a><br /></td>
</tr>
</table>

Expand Down
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Releases v1.7.8](#releases-v178)
* [Releases v1.7.7](#releases-v177)
* [Releases v1.7.6](#releases-v176)
* [Releases v1.7.5](#releases-v175)
Expand Down Expand Up @@ -48,6 +49,12 @@

## Changelog

### Releases v1.7.8

1. To permit using HTTP port different from 80. Check [WiFiManager works only on port 80 #75](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues/75)
2. Fix bug returning IP `255.255.255.255` in core v2.0.0+ when using `hostname`


### Releases v1.7.7

1. Fix compile error for ESP32 core v1.0.5-
Expand Down
9 changes: 8 additions & 1 deletion examples/AutoConnect/AutoConnect.ino
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
#endif

#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.7"
#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.8"

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _WIFIMGR_LOGLEVEL_ 3
Expand Down Expand Up @@ -246,6 +246,9 @@ IPAddress APStaticGW = IPAddress(192, 168, 100, 1);
IPAddress APStaticSN = IPAddress(255, 255, 255, 0);
//////

// Must be placed before #include <ESP_WiFiManager.h>, or default port 80 will be used
//#define HTTP_PORT 8080

#include <ESP_WiFiManager.h> //https://github.com/khoih-prog/ESP_WiFiManager

// Function Prototypes
Expand Down Expand Up @@ -745,6 +748,10 @@ void setup()
Serial.print(F("192.168.4.1"));
#endif

#if defined(HTTP_PORT_TO_USE)
Serial.print(F(":")); Serial.print(HTTP_PORT_TO_USE);
#endif

Serial.print(F(", SSID = "));
Serial.print(AP_SSID);
Serial.print(F(", PWD = "));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
#endif

#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.7"
#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.8"

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _WIFIMGR_LOGLEVEL_ 3
Expand Down Expand Up @@ -257,6 +257,9 @@ IPAddress APStaticIP = IPAddress(192, 168, 100, 1);
IPAddress APStaticGW = IPAddress(192, 168, 100, 1);
IPAddress APStaticSN = IPAddress(255, 255, 255, 0);

// Must be placed before #include <ESP_WiFiManager.h>, or default port 80 will be used
//#define HTTP_PORT 8080

#include <ESP_WiFiManager.h> //https://github.com/khoih-prog/ESP_WiFiManager

//define your default values here, if there are different values in configFileName (config.json), they are overwritten.
Expand All @@ -280,7 +283,7 @@ uint8_t connectMultiWiFi();
///////////////////////////////////////////
// New in v1.4.0
/******************************************
* // Defined in ESPAsync_WiFiManager.h
* // Defined in ESP_WiFiManager.h
typedef struct
{
IPAddress _ap_static_ip;
Expand Down Expand Up @@ -975,6 +978,10 @@ void setup()
Serial.print(F("192.168.4.1"));
#endif

#if defined(HTTP_PORT_TO_USE)
Serial.print(F(":")); Serial.print(HTTP_PORT_TO_USE);
#endif

Serial.print(F(", SSID = "));
Serial.print(AP_SSID);
Serial.print(F(", PWD = "));
Expand Down
9 changes: 8 additions & 1 deletion examples/AutoConnectWithFeedback/AutoConnectWithFeedback.ino
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
#endif

#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.7"
#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.8"

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _WIFIMGR_LOGLEVEL_ 3
Expand Down Expand Up @@ -249,6 +249,9 @@ IPAddress APStaticIP = IPAddress(192, 168, 100, 1);
IPAddress APStaticGW = IPAddress(192, 168, 100, 1);
IPAddress APStaticSN = IPAddress(255, 255, 255, 0);

// Must be placed before #include <ESP_WiFiManager.h>, or default port 80 will be used
//#define HTTP_PORT 8080

#include <ESP_WiFiManager.h> //https://github.com/khoih-prog/ESP_WiFiManager

// Function Prototypes
Expand Down Expand Up @@ -756,6 +759,10 @@ void setup()
Serial.print(F("192.168.4.1"));
#endif

#if defined(HTTP_PORT_TO_USE)
Serial.print(F(":")); Serial.print(HTTP_PORT_TO_USE);
#endif

Serial.print(F(", SSID = "));
Serial.print(AP_SSID);
Serial.print(F(", PWD = "));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
#endif

#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.7"
#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.8"

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _WIFIMGR_LOGLEVEL_ 3
Expand Down Expand Up @@ -252,6 +252,9 @@ IPAddress APStaticIP = IPAddress(192, 168, 100, 1);
IPAddress APStaticGW = IPAddress(192, 168, 100, 1);
IPAddress APStaticSN = IPAddress(255, 255, 255, 0);

// Must be placed before #include <ESP_WiFiManager.h>, or default port 80 will be used
//#define HTTP_PORT 8080

#include <ESP_WiFiManager.h> //https://github.com/khoih-prog/ESP_WiFiManager

//for LED status
Expand Down Expand Up @@ -788,6 +791,10 @@ void setup()
Serial.print(F("192.168.4.1"));
#endif

#if defined(HTTP_PORT_TO_USE)
Serial.print(F(":")); Serial.print(HTTP_PORT_TO_USE);
#endif

Serial.print(F(", SSID = "));
Serial.print(AP_SSID);
Serial.print(F(", PWD = "));
Expand Down
9 changes: 8 additions & 1 deletion examples/ConfigOnDRD_FS_MQTT_Ptr/ConfigOnDRD_FS_MQTT_Ptr.ino
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
#endif

#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.7"
#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.8"

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _WIFIMGR_LOGLEVEL_ 3
Expand Down Expand Up @@ -367,6 +367,9 @@ IPAddress APStaticIP = IPAddress(192, 168, 100, 1);
IPAddress APStaticGW = IPAddress(192, 168, 100, 1);
IPAddress APStaticSN = IPAddress(255, 255, 255, 0);

// Must be placed before #include <ESP_WiFiManager.h>, or default port 80 will be used
//#define HTTP_PORT 8080

#include <ESP_WiFiManager.h> //https://github.com/khoih-prog/ESP_WiFiManager

#define HTTP_PORT 80
Expand Down Expand Up @@ -934,6 +937,10 @@ void wifi_manager()
Serial.print(F("192.168.4.1"));
#endif

#if defined(HTTP_PORT_TO_USE)
Serial.print(F(":")); Serial.print(HTTP_PORT_TO_USE);
#endif

Serial.print(F(", SSID = "));
Serial.print(ssid);
Serial.print(F(", PWD = "));
Expand Down
Loading

0 comments on commit d1436e7

Please sign in to comment.