ESP32 cannot communicate with WiFi when eth interface have an IP

ilusder
Posts: 1
Joined: Thu Mar 30, 2023 12:14 pm

ESP32 cannot communicate with WiFi when eth interface have an IP

Postby ilusder » Thu Mar 30, 2023 9:28 pm

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?

Who is online

Users browsing this forum: Bing [Bot], Gaston1980 and 114 guests