Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libraries/WiFi/src/STA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ bool STAClass::connect(const char *ssid, const char *passphrase, int32_t channel
return true;
}

#if CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT
/**
* Start Wifi connection with a WPA2 Enterprise AP
* if passphrase is set the most secure supported mode will be automatically selected
Expand Down Expand Up @@ -519,6 +520,7 @@ bool STAClass::connect(

return connect(wpa2_ssid, NULL, channel, bssid, tryConnect); //connect to wifi
}
#endif /* CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT */

bool STAClass::disconnect(bool eraseap, unsigned long timeout) {
if (eraseap) {
Expand Down
7 changes: 6 additions & 1 deletion libraries/WiFi/src/WiFiSTA.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ class STAClass : public NetworkInterface {

bool connect();
bool connect(const char *ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t *bssid = NULL, bool connect = true);
#if CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT
bool connect(
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
);
#endif /* CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT */
bool disconnect(bool eraseap = false, unsigned long timeout = 0);
bool reconnect();
bool erase();
Expand Down Expand Up @@ -114,11 +116,14 @@ class WiFiSTAClass {
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
);
#if CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT
wl_status_t begin(
const String &wpa2_ssid, wpa2_auth_method_t method, const String &wpa2_identity = (const char *)NULL, const String &wpa2_username = (const char *)NULL,
const String &wpa2_password = (const char *)NULL, const String &ca_pem = (const char *)NULL, const String &client_crt = (const char *)NULL,
const String &client_key = (const char *)NULL, int ttls_phase2_type = -1, int32_t channel = 0, const uint8_t *bssid = 0, bool connect = true
) {
)
#endif /* CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT */
{
return begin(
wpa2_ssid.c_str(), method, wpa2_identity.c_str(), wpa2_username.c_str(), wpa2_password.c_str(), ca_pem.c_str(), client_crt.c_str(), client_key.c_str(),
ttls_phase2_type, channel, bssid, connect
Expand Down
Loading