@@ -200,7 +200,7 @@ bool APClass::end(){
200200 return true ;
201201}
202202
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 ){
204204 if (!ssid || *ssid == 0 ) {
205205 log_e (" SSID missing!" );
206206 return false ;
@@ -226,8 +226,8 @@ bool APClass::create(const char* ssid, const char* passphrase, int channel, int
226226 _wifi_strncpy ((char *)conf.ap .ssid , ssid, 32 );
227227 conf.ap .ssid_len = strlen (ssid);
228228 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;
231231 _wifi_strncpy ((char *)conf.ap .password , passphrase, 64 );
232232 }
233233 }
@@ -318,15 +318,15 @@ size_t APClass::printDriverInfo(Print & out) const{
318318
319319 if (info.ap .authmode == WIFI_AUTH_OPEN){ bytes += out.print (" ,OPEN" ); }
320320 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 " ); }
324324 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 " ); }
330330
331331 if (esp_wifi_ap_get_sta_list (&clients) == ESP_OK) {
332332 bytes += out.print (" ,STA:" );
0 commit comments