diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 8162ae9f2..f994be9c0 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -97,3 +97,4 @@ The following binary downloads have been compiled with ESP8266/Arduino library c - Add support for MI-BLE sensors using HM-10 Bluetooth 4.0 module by Christian Staars (#7683) - Add BootCount Reset Time as BCResetTime to ``Status 1`` - Add ``ZbZNPReceived``and ``ZbZCLReceived`` being published to MQTT when ``SetOption66 1`` +- Add optional Wifi AccessPoint passphrase define WIFI_AP_PASSPHRASE in my_user_config.h (#7690) diff --git a/tasmota/CHANGELOG.md b/tasmota/CHANGELOG.md index 4a490d2df..ceef0a771 100644 --- a/tasmota/CHANGELOG.md +++ b/tasmota/CHANGELOG.md @@ -10,6 +10,7 @@ - Add support for MI-BLE sensors using HM-10 Bluetooth 4.0 module by Christian Staars (#7683) - Add BootCount Reset Time as BCResetTime to ``Status 1`` - Add ``ZbZNPReceived``and ``ZbZCLReceived`` being published to MQTT when ``SetOption66 1`` +- Add optional Wifi AccessPoint passphrase define WIFI_AP_PASSPHRASE in my_user_config.h (#7690) ### 8.1.0.5 20200126 diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 5b5e5de8d..4287daf5a 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -66,6 +66,7 @@ #define STA_PASS1 "" // [Password1] Wifi password #define STA_SSID2 "" // [Ssid2] Optional alternate AP Wifi SSID #define STA_PASS2 "" // [Password2] Optional alternate AP Wifi password +#define WIFI_AP_PASSPHRASE "" // AccessPoint passphrase. For WPA2 min 8 char, for open use "" (max 63 char). #define WIFI_CONFIG_TOOL WIFI_RETRY // [WifiConfig] Default tool if wifi fails to connect (default option: 4 - WIFI_RETRY) // (WIFI_RESTART, WIFI_MANAGER, WIFI_RETRY, WIFI_WAIT, WIFI_SERIAL, WIFI_MANAGER_RESET_ONLY) // The configuration can be changed after first setup using WifiConfig 0, 2, 4, 5, 6 and 7. diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index 0873cebc5..5945436bc 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -640,7 +640,8 @@ void WifiManagerBegin(bool reset_only) int channel = WIFI_SOFT_AP_CHANNEL; if ((channel < 1) || (channel > 13)) { channel = 1; } - WiFi.softAP(my_hostname, nullptr, channel); + // bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4); + WiFi.softAP(my_hostname, WIFI_AP_PASSPHRASE, channel, false, 1); delay(500); // Without delay I've seen the IP address blank /* Setup the DNS server redirecting all the domains to the apIP */