@ -38,6 +38,33 @@
@@ -38,6 +38,33 @@
extern " C " {
# endif
/** @brief Wi-Fi connect result codes. To be overlaid on top of \ref wifi_status
* in the connect result event for detailed status .
*/
enum wifi_conn_status {
/** Connection successful */
WIFI_STATUS_CONN_SUCCESS = 0 ,
/** Connection failed - generic failure */
WIFI_STATUS_CONN_FAIL ,
/** Connection failed - wrong password
* Few possible reasons for 4 - way handshake failure that we can guess are as follows :
* 1 ) Incorrect key
* 2 ) EAPoL frames lost causing timeout
*
* # 1 is the likely cause , so , we convey to the user that it is due to
* Wrong passphrase / password .
*/
WIFI_STATUS_CONN_WRONG_PASSWORD ,
/** Connection timed out */
WIFI_STATUS_CONN_TIMEOUT ,
/** Connection failed - AP not found */
WIFI_STATUS_CONN_AP_NOT_FOUND ,
/** Last connection status */
WIFI_STATUS_CONN_LAST_STATUS ,
/** Connection disconnected status */
WIFI_STATUS_DISCONN_FIRST_STATUS = WIFI_STATUS_CONN_LAST_STATUS ,
} ;
/** @brief IEEE 802.11 security types. */
enum wifi_security_type {
/** No security. */
@ -708,6 +735,9 @@ enum wifi_ap_config_param {
@@ -708,6 +735,9 @@ enum wifi_ap_config_param {
WIFI_AP_CONFIG_PARAM_VHT_CAPAB = BIT ( 4 ) ,
} ;
/** Helper function to get user-friendly status name for the status code. */
const char * wifi_conn_status_txt ( enum wifi_conn_status status ) ;
# ifdef __cplusplus
}
# endif