WIFI / WPS esp_wifi_connect() returns error
Posted: Wed May 19, 2021 6:19 am
In the Wifi / WPS example from esp-idf_v4.4-dev-1254-g639e7ad49 the esp_wifi_connect() function is called in the wifi event handlers WIFI_EVENT_STA_DISCONNECTED event. Please make sure to build this example with the current stable esp-idf version 4.2.1.
The esp_wifi_connect() function call returns the following error:
E (16267) wifi:sta is connecting, return error
If you encapsulate esp_wifi_connect() function with the ESP_ERROR_CHECK ... ESP_ERROR_CHECK(esp_wifi_connect());
the following error and an abort occurs:
E (16267) wifi:sta is connecting, return error
P_ERROR_CHECK failed: esp_err_t 0x3007 (ESP_ERR_WIFI_CONN) at 0x400870f8
0x400870f8: _esp_error_check_failed at /home/ubuntu/esp/esp-idf/components/esp_common/src/esp_err.c:45
abort() was called at PC 0x400870fb on core 0
0x400870fb: _esp_error_check_failed at /home/ubuntu/esp/esp-idf/components/esp_common/src/esp_err.c:46
Backtrace:0x40087eaa:0x3ffc0aa0 0x400491:0x3ffc0ac0 0x4008ea9a:0x3ffc0ae0 0x400870fb:0x3ffc0b50 0x4d7c1e:0x3ffc0b70 0x400d7d87:0x3ffc0ba0 0x401719fb:0x3ffc0be0 0x40171ac8:0x3ffc0c30
0x40087eaa: panic_abort at /home/ubuntu/esp/esp-idf/components/esp_system/panic.c:341
0x4008ea9a: abort at /home/ubuntu/esp/esp-idf/components/newlib/abort.c:46
0x400870fb: _esp_error_check_failed at /home/ubuntu/esp/esp-idf/components/esp_common/src/esp_err.c:46
0x400d7d87: bora::ConnectionManager::EventHandler(void*, char const*, int, void*) at /home/ubuntu/src/repos/P127/POC-Embedded/build/../main/source/connection_manager.cpp:182 (discriminator 8)
0x401719fb: handler_execute at /home/ubuntu/esp/esp-idf/components/esp_event/esp_event.c:145
(inlined by) esp_event_loop_run at /home/ubuntu/esp/esp-idf/components/esp_event/esp_event.c:582
0x40171ac8: esp_event_loop_run_task at /home/ubuntu/esp/esp-idf/components/esp_event/esp_event.c:115 (discriminator 15)
So, is there an bugfix planned from espressif side, to address this issue?
The esp_wifi_connect() function call returns the following error:
E (16267) wifi:sta is connecting, return error
If you encapsulate esp_wifi_connect() function with the ESP_ERROR_CHECK ... ESP_ERROR_CHECK(esp_wifi_connect());
the following error and an abort occurs:
E (16267) wifi:sta is connecting, return error
P_ERROR_CHECK failed: esp_err_t 0x3007 (ESP_ERR_WIFI_CONN) at 0x400870f8
0x400870f8: _esp_error_check_failed at /home/ubuntu/esp/esp-idf/components/esp_common/src/esp_err.c:45
abort() was called at PC 0x400870fb on core 0
0x400870fb: _esp_error_check_failed at /home/ubuntu/esp/esp-idf/components/esp_common/src/esp_err.c:46
Backtrace:0x40087eaa:0x3ffc0aa0 0x400491:0x3ffc0ac0 0x4008ea9a:0x3ffc0ae0 0x400870fb:0x3ffc0b50 0x4d7c1e:0x3ffc0b70 0x400d7d87:0x3ffc0ba0 0x401719fb:0x3ffc0be0 0x40171ac8:0x3ffc0c30
0x40087eaa: panic_abort at /home/ubuntu/esp/esp-idf/components/esp_system/panic.c:341
0x4008ea9a: abort at /home/ubuntu/esp/esp-idf/components/newlib/abort.c:46
0x400870fb: _esp_error_check_failed at /home/ubuntu/esp/esp-idf/components/esp_common/src/esp_err.c:46
0x400d7d87: bora::ConnectionManager::EventHandler(void*, char const*, int, void*) at /home/ubuntu/src/repos/P127/POC-Embedded/build/../main/source/connection_manager.cpp:182 (discriminator 8)
0x401719fb: handler_execute at /home/ubuntu/esp/esp-idf/components/esp_event/esp_event.c:145
(inlined by) esp_event_loop_run at /home/ubuntu/esp/esp-idf/components/esp_event/esp_event.c:582
0x40171ac8: esp_event_loop_run_task at /home/ubuntu/esp/esp-idf/components/esp_event/esp_event.c:115 (discriminator 15)
So, is there an bugfix planned from espressif side, to address this issue?