Doc: Add doc about minimum security for connection to AP (#6909)
* Add troubleshooting to connect to WEP/WPA APs. * Add troubleshooting about WPA3 support.
This commit is contained in:
parent
cb52e569ae
commit
cf01523ded
3 changed files with 59 additions and 6 deletions
|
|
@ -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
|
* 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
|
* Scanning for access points
|
||||||
|
|
||||||
|
|
@ -477,6 +477,19 @@ Function used to get the automatic reconnection if the connection is lost.
|
||||||
|
|
||||||
The function will return ``true`` if this setting is enabled.
|
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
|
WiFiMulti
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,3 +80,42 @@ Solution
|
||||||
* Change the USB port.
|
* Change the USB port.
|
||||||
* Check your power supply.
|
* Check your power supply.
|
||||||
* Check if the board is damaged or defective.
|
* 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
|
||||||
|
|
|
||||||
|
|
@ -337,9 +337,10 @@ bool WiFiSTAClass::reconnect()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect from the network
|
* Disconnect from the network.
|
||||||
* @param wifioff
|
* @param wifioff `true` to turn the Wi-Fi radio off.
|
||||||
* @return one value of wl_status_t enum
|
* @param eraseap `true` to erase the AP configuration from the NVS memory.
|
||||||
|
* @return `true` when successful.
|
||||||
*/
|
*/
|
||||||
bool WiFiSTAClass::disconnect(bool wifioff, bool eraseap)
|
bool WiFiSTAClass::disconnect(bool wifioff, bool eraseap)
|
||||||
{
|
{
|
||||||
|
|
@ -398,8 +399,8 @@ bool WiFiSTAClass::isConnected()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the minimum security for AP to be considered connectable
|
* Set the minimum security for AP to be considered connectable.
|
||||||
* Must be called before WiFi.begin()
|
* Must be called before WiFi.begin().
|
||||||
* @param minSecurity wifi_auth_mode_t
|
* @param minSecurity wifi_auth_mode_t
|
||||||
*/
|
*/
|
||||||
void WiFiSTAClass::setMinSecurity(wifi_auth_mode_t minSecurity)
|
void WiFiSTAClass::setMinSecurity(wifi_auth_mode_t minSecurity)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue