WIFI / WPS esp_wifi_connect() returns error

hansonite
Posts: 4
Joined: Mon Mar 30, 2020 12:17 pm

WIFI / WPS esp_wifi_connect() returns error

Postby hansonite » 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?

Nikostpn
Posts: 13
Joined: Mon Jan 25, 2021 5:46 pm

Re: WIFI / WPS esp_wifi_connect() returns error

Postby Nikostpn » Thu Jan 27, 2022 10:51 pm

Hi,

Were you able to resolve this issue or find out what causes it?

Thanks!

User avatar
Coffeeye
Posts: 7
Joined: Tue Nov 09, 2021 9:59 am

Re: WIFI / WPS esp_wifi_connect() returns error

Postby Coffeeye » Wed Jan 24, 2024 9:39 am

same problem here on example-like program

Code: Select all

sm BSSid: 00:00:00:00:00:00 scan BSSID f8:8e:85:be:8b:76
ESP32 station wps succeeds in enrollee mode
wifi:sta is connecting, return error
esp_wifi_connect returns ESP_ERR_WIFI_CONN
also idk why but in esp-idf function 'wps_finish' ssid and password does not match my settings, are those somehow generated just for this connection or something is clearly wrong?
Programming in C and JS using ESP-IDF on esp32-d0wd-v3

Who is online

Users browsing this forum: Google [Bot] and 133 guests