wifi message on connection
Posted: Mon Nov 11, 2024 10:42 pm
I was able to connect to wifi router but every time I got this message on terminal:
It seems that the esp32 disconnect from router and ask for new IP address. This is the code I use to connect to wifi:
How do I solve this?
Regards
Gastón
Code: Select all
wifi:[ADDBA]RX DELBA, reason:39, delete tid:0, initiator:0(recipient)
Code: Select all
esp_netif_init(); // TCP/IP initiation s1.1
esp_event_loop_create_default(); // event loop s1.2
my_staif = esp_netif_create_default_wifi_sta(); // WiFi station s1.3
wifi_init_config_t wifi_initiation = WIFI_INIT_CONFIG_DEFAULT();
esp_wifi_init(&wifi_initiation); // s1.4
// 2 - Wi-Fi Configuration Phase
esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, wifi_event_handler, NULL);
esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, wifi_event_handler, NULL);
wifi_config_t wifi_configuration = {
.sta = {
.ssid = "",
.password =""
}
};
strcpy((char*)wifi_configuration.sta.ssid,SSID);
strcpy((char*)wifi_configuration.sta.password,PASS);
esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_configuration);
// 3 - Wi-Fi Start Phase
esp_wifi_start();
esp_wifi_set_mode(WIFI_MODE_STA);
// 4- Wi-Fi Connect Phase
esp_wifi_connect();
Regards
Gastón