WIFI to WPA2:
Posted: Tue Apr 30, 2019 7:32 pm
Hello All,
I am just getting started with ESP32, and wish to join a WPA2 AP.
I tried out this example:
https://github.com/espressif/esp-idf/bl ... ise_main.c
and keep getting this error:
I did include esp_wifi_types.h.
i did a system wide search for WIFI_EVENT_STA_DISCONNECTED and could not find anything that matches:
"#define WIFI_EVENT_STA_DISCONNECTED ..." ()
How do I fix this? Thanks in advance.
Krish.
I am just getting started with ESP32, and wish to join a WPA2 AP.
I tried out this example:
https://github.com/espressif/esp-idf/bl ... ise_main.c
and keep getting this error:
Code: Select all
src/test.c: In function 'event_handler':
src/test.c:83:23: error: 'WIFI_EVENT' undeclared (first use in this function)
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
^
src/test.c:83:23: note: each undeclared identifier is reported only once for each function it appears in
src/test.c:83:49: error: 'WIFI_EVENT_STA_START' undeclared (first use in this function)
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
^
src/test.c:85:56: error: 'WIFI_EVENT_STA_DISCONNECTED' undeclared (first use in this function)
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
^
src/test.c:88:30: error: 'IP_EVENT' undeclared (first use in this function)
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
^
src/test.c:88:54: error: 'IP_EVENT_STA_GOT_IP' undeclared (first use in this function)
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
I did include esp_wifi_types.h.
- Platform : Linux
IDE : PlatformIO
Device: ESP32 Pico Kit V4.1
IDF Version: 1.8.0
i did a system wide search for WIFI_EVENT_STA_DISCONNECTED and could not find anything that matches:
"#define WIFI_EVENT_STA_DISCONNECTED ..." (
Code: Select all
grep -Inr "#define.*WIFI_EVENT_STA_DISCONNECTED" ./*
How do I fix this? Thanks in advance.
Krish.