ESP32-WPA2-enterprise icon indicating copy to clipboard operation
ESP32-WPA2-enterprise copied to clipboard

esp_wifi_sta_wpa2_ent_enable() needs a parameters

Open PaulRowntree opened this issue 7 years ago • 2 comments

Hi! The xxx_enable() call in the wpa2.ino example requires a parameter describing an algorithm. Could you please advise on how to continue? Thanks!

extern const wpa2_crypto_funcs_t g_wifi_default_wpa2_crypto_funcs;

typedef struct {
    const wpa2_crypto_funcs_t *crypto_funcs;
}esp_wpa2_config_t;

#define WPA2_CONFIG_INIT_DEFAULT() { \
    .crypto_funcs = &g_wifi_default_wpa2_crypto_funcs \
}

/**
  * @brief  Enable wpa2 enterprise authentication.
  *
  * @attention 1. wpa2 enterprise authentication can only be used when ESP32 station is enabled.
  * @attention 2. wpa2 enterprise authentication can only support TLS, PEAP-MSCHAPv2 and TTLS-MSCHAPv2 method.
  *
  * @return
  *    - ESP_ERR_WIFI_OK: succeed.
  *    - ESP_ERR_WIFI_NO_MEM: fail(internal memory malloc fail)
  */
esp_err_t esp_wifi_sta_wpa2_ent_enable(const esp_wpa2_config_t *config);

PaulRowntree avatar Jan 29 '18 00:01 PaulRowntree

I have this issue too: error: too few arguments to function 'esp_err_t esp_wifi_sta_wpa2_ent_enable(const esp_wpa2_config_t*)' Hoping to get past this. Trying to connect an ESP32 to our work network as a proof-of-concept for IoT projects at work.

mrmonteith avatar Jun 13 '18 18:06 mrmonteith

I found how to set this. Just not sure where in the code exactly it goes. esp_wpa2_config_t config = WPA2_CONFIG_INIT_DEFAULT(); esp_wifi_sta_wpa2_ent_enable(&config);

mrmonteith avatar Jun 13 '18 18:06 mrmonteith