Page 1 of 1

ESP32 cannot communicate with WiFi when eth interface have an IP

Posted: Thu Mar 30, 2023 9:28 pm
by ilusder
Hi all.

I using chip ESP32-WROOM-32UE

version of ESP-IDF - 4.4.3


I need to use WiFi as a failover interface when eth connection lost internet connection.
Thats mean eth have link and have ip address.

If I detect no internet state - I switch to wifi interface (that have internet connection) with function

netif_set_default()
with STA interface.

Untill eth is still linked, I receiving an error:
esp-tls: couldn't get hostname for :some_somain: getaddrinfo() returns 202, addrinfo=0x0


When eth lost connection (unplug cable) or I destroy eth network interface - WiFi communication start workas expected.

And opposite way works correctly (wifi lost internet connection, and ETH is connected)

What a correct procedure of switching between network interfaces?