mirror of https://github.com/arendst/Tasmota.git
parent
6821293819
commit
099c68678a
|
@ -59,7 +59,11 @@ typedef enum WiFiPhyMode
|
|||
class WiFiHelper {
|
||||
public:
|
||||
#ifdef ESP32
|
||||
#if __has_include("esp_eap_client.h") && __has_include("chip-debug-report.h") // check for Tasmota framework
|
||||
static wl_status_t begin(const char* wpa2_ssid, wpa2_auth_method_t method, const char* wpa2_identity=NULL, const char* wpa2_username=NULL, const char *wpa2_password=NULL, const char* ca_pem=NULL, const char* client_crt=NULL, const char* client_key=NULL, int ttls_phase2_type=-1, int32_t channel=0, const uint8_t* bssid=0, bool connect=true);
|
||||
#else
|
||||
static wl_status_t begin(const char* wpa2_ssid, wpa2_auth_method_t method, const char* wpa2_identity=NULL, const char* wpa2_username=NULL, const char *wpa2_password=NULL, const char* ca_pem=NULL, const char* client_crt=NULL, const char* client_key=NULL, int32_t channel=0, const uint8_t* bssid=0, bool connect=true);
|
||||
#endif
|
||||
#endif
|
||||
static wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
|
||||
static wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
|
||||
|
@ -94,4 +98,4 @@ public:
|
|||
|
||||
|
||||
|
||||
#endif // WIFIHELPER_H
|
||||
#endif // WIFIHELPER_H
|
||||
|
|
|
@ -34,12 +34,21 @@ ip_addr_t dns_save6[DNS_MAX_SERVERS] = {}; // IPv6 DNS servers
|
|||
#include "tasmota_options.h"
|
||||
#include "lwip/dns.h"
|
||||
|
||||
#if __has_include("esp_eap_client.h") && __has_include("chip-debug-report.h") // check for Tasmota framework
|
||||
wl_status_t WiFiHelper::begin(const char *wpa2_ssid, wpa2_auth_method_t method, const char *wpa2_identity, const char *wpa2_username, const char *wpa2_password, const char *ca_pem, const char *client_crt, const char *client_key, int ttls_phase2_type, int32_t channel, const uint8_t *bssid, bool connect) {
|
||||
WiFiHelper::scrubDNS();
|
||||
wl_status_t ret = WiFi.begin(wpa2_ssid, method, wpa2_identity, wpa2_username, wpa2_password, ca_pem, client_crt, client_key, ttls_phase2_type, channel, bssid, connect);
|
||||
WiFiHelper::scrubDNS();
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
wl_status_t WiFiHelper::begin(const char* wpa2_ssid, wpa2_auth_method_t method, const char* wpa2_identity, const char* wpa2_username, const char *wpa2_password, const char* ca_pem, const char* client_crt, const char* client_key, int32_t channel, const uint8_t* bssid, bool connect) {
|
||||
WiFiHelper::scrubDNS();
|
||||
wl_status_t ret = WiFi.begin(wpa2_ssid, method, wpa2_identity, wpa2_username, wpa2_password, ca_pem, client_crt, client_key, channel, bssid, connect);
|
||||
WiFiHelper::scrubDNS();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
wl_status_t WiFiHelper::begin(const char* ssid, const char *passphrase, int32_t channel, const uint8_t* bssid, bool connect) {
|
||||
WiFiHelper::scrubDNS();
|
||||
|
|
|
@ -47,7 +47,9 @@
|
|||
#include "c_types.h"
|
||||
#endif
|
||||
|
||||
#include <core_version.h>
|
||||
#if __has_include("core_version.h") // ESP32 Stage has no core_version.h file. Disable include via PlatformIO Option
|
||||
#include <core_version.h> // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_7_1)
|
||||
#endif // ESP32_STAGE
|
||||
#undef DEBUG_TLS
|
||||
|
||||
#ifdef DEBUG_TLS
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef ESP32_STAGE // ESP32 Stage has no core_version.h file. Disable include via PlatformIO Option
|
||||
#if __has_include("core_version.h") // ESP32 Stage has no core_version.h file. Disable include via PlatformIO Option
|
||||
#include <core_version.h> // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_7_1)
|
||||
#endif // ESP32_STAGE
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
// Location specific includes
|
||||
#ifndef ESP32_STAGE // ESP32 Stage has no core_version.h file. Disable include via PlatformIO Option
|
||||
#if __has_include("core_version.h") // ESP32 Stage has no core_version.h file. Disable include via PlatformIO Option
|
||||
#include <core_version.h> // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_7_1)
|
||||
#endif // ESP32_STAGE
|
||||
#include "include/tasmota_compat.h"
|
||||
|
|
Loading…
Reference in New Issue