@@ -200,7 +200,7 @@ bool APClass::end(){
200
200
return true ;
201
201
}
202
202
203
- bool APClass::create (const char * ssid, const char * passphrase, int channel, int ssid_hidden, int max_connection, bool ftm_responder){
203
+ bool APClass::create (const char * ssid, const char * passphrase, int channel, int ssid_hidden, int max_connection, bool ftm_responder, wifi_auth_mode_t auth_mode, wifi_cipher_type_t cipher ){
204
204
if (!ssid || *ssid == 0 ) {
205
205
log_e (" SSID missing!" );
206
206
return false ;
@@ -226,8 +226,8 @@ bool APClass::create(const char* ssid, const char* passphrase, int channel, int
226
226
_wifi_strncpy ((char *)conf.ap .ssid , ssid, 32 );
227
227
conf.ap .ssid_len = strlen (ssid);
228
228
if (passphrase != NULL && passphrase[0 ] != 0 ){
229
- conf.ap .authmode = WIFI_AUTH_WPA2_PSK ;
230
- conf.ap .pairwise_cipher = WIFI_CIPHER_TYPE_CCMP; // Disable by default enabled insecure TKIP and use just CCMP.
229
+ conf.ap .authmode = auth_mode ;
230
+ conf.ap .pairwise_cipher = cipher;
231
231
_wifi_strncpy ((char *)conf.ap .password , passphrase, 64 );
232
232
}
233
233
}
@@ -318,15 +318,15 @@ size_t APClass::printDriverInfo(Print & out) const{
318
318
319
319
if (info.ap .authmode == WIFI_AUTH_OPEN){ bytes += out.print (" ,OPEN" ); }
320
320
else if (info.ap .authmode == WIFI_AUTH_WEP){ bytes += out.print (" ,WEP" ); }
321
- else if (info.ap .authmode == WIFI_AUTH_WPA_PSK){ bytes += out.print (" ,WWPA_PSK " ); }
322
- else if (info.ap .authmode == WIFI_AUTH_WPA2_PSK){ bytes += out.print (" ,WWPA2_PSK " ); }
323
- else if (info.ap .authmode == WIFI_AUTH_WPA_WPA2_PSK){ bytes += out.print (" ,WWPA_WPA2_PSK " ); }
321
+ else if (info.ap .authmode == WIFI_AUTH_WPA_PSK){ bytes += out.print (" ,WPA_PSK " ); }
322
+ else if (info.ap .authmode == WIFI_AUTH_WPA2_PSK){ bytes += out.print (" ,WPA2_PSK " ); }
323
+ else if (info.ap .authmode == WIFI_AUTH_WPA_WPA2_PSK){ bytes += out.print (" ,WPA_WPA2_PSK " ); }
324
324
else if (info.ap .authmode == WIFI_AUTH_ENTERPRISE){ bytes += out.print (" ,WEAP" ); }
325
- else if (info.ap .authmode == WIFI_AUTH_WPA3_PSK){ bytes += out.print (" ,WWPA3_PSK " ); }
326
- else if (info.ap .authmode == WIFI_AUTH_WPA2_WPA3_PSK){ bytes += out.print (" ,WWPA2_WPA3_PSK " ); }
327
- else if (info.ap .authmode == WIFI_AUTH_WAPI_PSK){ bytes += out.print (" ,WWAPI_PSK " ); }
328
- else if (info.ap .authmode == WIFI_AUTH_OWE){ bytes += out.print (" ,WOWE " ); }
329
- else if (info.ap .authmode == WIFI_AUTH_WPA3_ENT_192){ bytes += out.print (" ,WWPA3_ENT_SUITE_B_192_BIT " ); }
325
+ else if (info.ap .authmode == WIFI_AUTH_WPA3_PSK){ bytes += out.print (" ,WPA3_PSK " ); }
326
+ else if (info.ap .authmode == WIFI_AUTH_WPA2_WPA3_PSK){ bytes += out.print (" ,WPA2_WPA3_PSK " ); }
327
+ else if (info.ap .authmode == WIFI_AUTH_WAPI_PSK){ bytes += out.print (" ,WAPI_PSK " ); }
328
+ else if (info.ap .authmode == WIFI_AUTH_OWE){ bytes += out.print (" ,OWE " ); }
329
+ else if (info.ap .authmode == WIFI_AUTH_WPA3_ENT_192){ bytes += out.print (" ,WPA3_ENT_SUITE_B_192_BIT " ); }
330
330
331
331
if (esp_wifi_ap_get_sta_list (&clients) == ESP_OK) {
332
332
bytes += out.print (" ,STA:" );
0 commit comments