Search found 3 matches

by ml8923
Tue Jan 14, 2020 5:35 pm
Forum: ESP-IDF
Topic: Reason code
Replies: 3
Views: 4478

Re: Reason code

With the new handler: wifi_event_sta_disconnected_t* event = (wifi_event_sta_disconnected_t*) event_data; if(WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT == event->reason || WIFI_REASON_AUTH_FAIL == event->reason) { g_fatal_error = true; ESP_LOGI(TAG,"Incorrect WiFi Credentials"); }
by ml8923
Tue Jan 14, 2020 4:20 pm
Forum: ESP-IDF
Topic: Reason code
Replies: 3
Views: 4478

Re: Reason code

I've got it figured out. Thanks

wifi_event_sta_disconnected_t* event = (wifi_event_sta_disconnected_t*) event_data;
ESP_LOGI(TAG, "%d", event->reason);
by ml8923
Tue Jan 14, 2020 4:00 pm
Forum: ESP-IDF
Topic: Reason code
Replies: 3
Views: 4478

Reason code

How do I get the reason code with the non legacy event loop? ie: static void event_handler(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) I understand with the legacy eventloop: esp_err_t event_handler(void *ctx, system_event_t *event) I can get the info: system_event_st...