Skip to content

Commit ee7a67f

Browse files
authored
add ttls_phase2_type
1 parent 4bcf6e0 commit ee7a67f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/WiFi/src/WiFiSTA.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ wl_status_t WiFiSTAClass::status() {
6565

6666
wl_status_t WiFiSTAClass::begin(
6767
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,
68-
const char *client_crt, const char *client_key, int32_t channel, const uint8_t *bssid, bool connect
68+
const char *client_crt, const char *client_key, int ttls_phase2_type, int32_t channel, const uint8_t *bssid, bool connect
6969
) {
7070
if (!STA.begin()) {
7171
return WL_CONNECT_FAILED;
7272
}
7373

74-
if (!STA.connect(wpa2_ssid, method, wpa2_identity, wpa2_username, wpa2_password, ca_pem, client_crt, client_key, channel, bssid, connect)) {
74+
if (!STA.connect(wpa2_ssid, method, wpa2_identity, wpa2_username, wpa2_password, ca_pem, client_crt, client_key, ttls_phase2_type, channel, bssid, connect)) {
7575
return WL_CONNECT_FAILED;
7676
}
7777

@@ -215,7 +215,7 @@ bool WiFiSTAClass::bandwidth(wifi_bandwidth_t bandwidth) {
215215
* @return true if STA is connected to an AP
216216
*/
217217
bool WiFiSTAClass::isConnected() {
218-
return STA.connected();
218+
return STA.connected() && STA.hasIP();
219219
}
220220

221221
/**

0 commit comments

Comments
 (0)