2025-01-09 19:28:30 +01:00
|
|
|
#include "esp_event.h"
|
|
|
|
|
|
|
|
|
2025-01-09 19:30:41 +01:00
|
|
|
#define CONFIG_ESP_WIFI_SSID "YourSSID"
|
|
|
|
#define CONFIG_ESP_WIFI_PASS "YourPASSWORD"
|
|
|
|
#define CONFIG_ESP_MAXIMUM_RETRY 3
|
2025-01-09 19:28:30 +01:00
|
|
|
|
|
|
|
#if CONFIG_ESP_WPA3_SAE_PWE_HUNT_AND_PECK
|
|
|
|
#define ESP_WIFI_SAE_MODE WPA3_SAE_PWE_HUNT_AND_PECK
|
|
|
|
#define EXAMPLE_H2E_IDENTIFIER ""
|
|
|
|
#elif CONFIG_ESP_WPA3_SAE_PWE_HASH_TO_ELEMENT
|
|
|
|
#define ESP_WIFI_SAE_MODE WPA3_SAE_PWE_HASH_TO_ELEMENT
|
|
|
|
#define EXAMPLE_H2E_IDENTIFIER CONFIG_ESP_WIFI_PW_ID
|
|
|
|
#elif CONFIG_ESP_WPA3_SAE_PWE_BOTH
|
|
|
|
#define ESP_WIFI_SAE_MODE WPA3_SAE_PWE_BOTH
|
|
|
|
#define EXAMPLE_H2E_IDENTIFIER CONFIG_ESP_WIFI_PW_ID
|
|
|
|
#endif
|
|
|
|
#if CONFIG_ESP_WIFI_AUTH_OPEN
|
|
|
|
#define ESP_WIFI_SCAN_AUTH_MODE_THRESHOLD WIFI_AUTH_OPEN
|
|
|
|
#elif CONFIG_ESP_WIFI_AUTH_WEP
|
|
|
|
#define ESP_WIFI_SCAN_AUTH_MODE_THRESHOLD WIFI_AUTH_WEP
|
|
|
|
#elif CONFIG_ESP_WIFI_AUTH_WPA_PSK
|
|
|
|
#define ESP_WIFI_SCAN_AUTH_MODE_THRESHOLD WIFI_AUTH_WPA_PSK
|
|
|
|
#elif CONFIG_ESP_WIFI_AUTH_WPA2_PSK
|
|
|
|
#define ESP_WIFI_SCAN_AUTH_MODE_THRESHOLD WIFI_AUTH_WPA2_PSK
|
|
|
|
#elif CONFIG_ESP_WIFI_AUTH_WPA_WPA2_PSK
|
|
|
|
#define ESP_WIFI_SCAN_AUTH_MODE_THRESHOLD WIFI_AUTH_WPA_WPA2_PSK
|
|
|
|
#elif CONFIG_ESP_WIFI_AUTH_WPA3_PSK
|
|
|
|
#define ESP_WIFI_SCAN_AUTH_MODE_THRESHOLD WIFI_AUTH_WPA3_PSK
|
|
|
|
#elif CONFIG_ESP_WIFI_AUTH_WPA2_WPA3_PSK
|
|
|
|
#define ESP_WIFI_SCAN_AUTH_MODE_THRESHOLD WIFI_AUTH_WPA2_WPA3_PSK
|
|
|
|
#elif CONFIG_ESP_WIFI_AUTH_WAPI_PSK
|
|
|
|
#define ESP_WIFI_SCAN_AUTH_MODE_THRESHOLD WIFI_AUTH_WAPI_PSK
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void event_handler(void* arg, esp_event_base_t event_base,
|
|
|
|
int32_t event_id, void* event_data);
|
|
|
|
|
|
|
|
void wifi_init_sta(void);
|