diff --git a/docs/source/api/wifi.rst b/docs/source/api/wifi.rst
index 5f1d100493e..ad5ca098586 100644
--- a/docs/source/api/wifi.rst
+++ b/docs/source/api/wifi.rst
@@ -11,7 +11,7 @@ The Wi-Fi API provides support for the 802.11b/g/n protocol driver. This API inc
 
 * AP mode (aka Soft-AP mode or Access Point mode). Devices connect to the ESP32
 
-* Security modes (WPA, WPA2, WEP, etc.)
+* Security modes (WPA2, WPA3 etc.)
 
 * Scanning for access points
 
@@ -490,6 +490,19 @@ Function used to get the automatic reconnection if the connection is lost.
 
     The function will return ``true`` if this setting is enabled.
 
+setMinSecurity
+**************
+
+Function used to set the minimum security for AP to be considered connectable.
+
+.. code-block:: arduino
+
+    bool setMinSecurity(wifi_auth_mode_t minSecurity);
+
+Where:
+
+* ``minSecurity`` is the minimum security for AP to be considered connectable. Default is ``WIFI_AUTH_WPA2_PSK``.
+
 WiFiMulti
 ---------
 
diff --git a/docs/source/troubleshooting.rst b/docs/source/troubleshooting.rst
index 72e1d1fc511..40e0a632b39 100644
--- a/docs/source/troubleshooting.rst
+++ b/docs/source/troubleshooting.rst
@@ -80,3 +80,42 @@ Solution
 * Change the USB port.
 * Check your power supply.
 * Check if the board is damaged or defective.
+
+Wi-Fi
+-----
+
+Why does the board not connect to WEP/WPA-"encrypted" Wi-Fi?
+************************************************************
+
+Please note that WEP/WPA has significant security vulnerabilities and its use is strongly discouraged.
+The support may therefore be removed in the future. Please migrate to WPA2 or newer.
+
+Solution
+^^^^^^^^
+
+Nevertheless, it may be necessary to connect to insecure networks. To do this, the security requirement of the ESP32 must be lowered to an insecure level by using:
+
+.. code-block:: arduino
+
+    WiFi.setMinSecurity(WIFI_AUTH_WEP); // Lower min security to WEP.
+    // or
+    WiFi.setMinSecurity(WIFI_AUTH_WPA_PSK); // Lower min security to WPA.
+
+Why does the board not connect to WPA3-encrypted Wi-Fi?
+*******************************************************
+
+WPA3 support is resource intensive and may not be compiled into the used SDK.
+
+Solution
+^^^^^^^^
+
+* Check WPA3 support by your SDK.
+* Compile your custom SDK with WPA3 support.
+
+Sample code to check SDK WPA3 support at compile time:
+
+.. code-block:: arduino
+
+    #ifndef CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE
+    #warning "No WPA3 support."
+    #endif
diff --git a/libraries/WiFi/src/WiFiSTA.cpp b/libraries/WiFi/src/WiFiSTA.cpp
index f93f4bae0f7..3b888b5574c 100644
--- a/libraries/WiFi/src/WiFiSTA.cpp
+++ b/libraries/WiFi/src/WiFiSTA.cpp
@@ -337,9 +337,10 @@ bool WiFiSTAClass::reconnect()
 }
 
 /**
- * Disconnect from the network
- * @param wifioff
- * @return  one value of wl_status_t enum
+ * Disconnect from the network.
+ * @param wifioff `true` to turn the Wi-Fi radio off.
+ * @param eraseap `true` to erase the AP configuration from the NVS memory.
+ * @return `true` when successful.
  */
 bool WiFiSTAClass::disconnect(bool wifioff, bool eraseap)
 {
@@ -398,8 +399,8 @@ bool WiFiSTAClass::isConnected()
 }
 
 /**
- * Set the minimum security for AP to be considered connectable
- * Must be called before WiFi.begin()
+ * Set the minimum security for AP to be considered connectable.
+ * Must be called before WiFi.begin().
  * @param minSecurity wifi_auth_mode_t
  */
 void WiFiSTAClass::setMinSecurity(wifi_auth_mode_t minSecurity)