wifi connect

chegewara
Posts: 2240
Joined: Wed Jun 14, 2017 9:00 pm

wifi connect

Postby chegewara » Mon Nov 22, 2021 12:30 am

I am not sure if this is bug, but without source code of esp_wifi_connect is hard to say.
I am testing what happen when different API functions are called in different order. The "problem" is when i setup wifi STA and connect, all is fine till now, then i stop wifi and try to connect one more time without calling "esp_wifi_start". I would expect it will fail, since wifi is stopped, and here is surprise, "esp_wifi_connect" is reporting ESP_ERR_WIFI_CONN and is connecting anyway:

Code: Select all

base: WIFI_EVENT, event: 12
base: WIFI_EVENT, event: 13
I (504) WiFi class: wifi_init_softap finished. SSID:test123 password:
I (504) : wifi event: 12
base: WIFI_EVENT, event: 12
I (524) : wifi event: 13
base: WIFI_EVENT, event: 13
I (532) WiFi class: wifi_init_softap finished. SSID:test1 password:
I (532) : wifi event: 12
base: WIFI_EVENT, event: 12
I (551) : wifi event: 2
I (3004) : wifi event: 1
base: WIFI_EVENT, event: 1
I (3059) WiFi class: Total APs scanned = 20
I (3116) WiFi class: wifi_init_sta finished. SSID: password:
I (8127) : wifi event: 3
base: WIFI_EVENT, event: 3
I (8128) : wifi event: 13
base: WIFI_EVENT, event: 13
I (28140) : wifi event: 2
I (28143) WiFi class: wifi_init_sta finished. SSID: password:
I (28143) : wifi event: 12
base: WIFI_EVENT, event: 12
ESP_ERROR_CHECK_WITHOUT_ABORT failed: esp_err_t 0x3007 (ESP_ERR_WIFI_CONN) at 0x4037d2c6
0x4037d2c6: _esp_error_check_failed_without_abort at /home/chegewara/esp/master/components/esp_system/esp_err.c:37
file: "../main/main.cpp" line 87
func: void app_main()
expression: wifi_itf->enableSTA("xxx", "xxx", true) // true to auto connect
I (30480) : wifi event: 4
I (30481) main: station connected
I (33401) : wifi event: 0
I (33402) main: got ip: 192.168.0.100
I (33403) esp_netif_handlers: sta ip: 192.168.0.100, mask: 255.255.255.0, gw: 192.168.0.1

Who is online

Users browsing this forum: No registered users and 80 guests