Swithing between Ethernet and Wifi

eowe27
Posts: 4
Joined: Fri Feb 28, 2020 7:35 am

Swithing between Ethernet and Wifi

Postby eowe27 » Fri Jul 03, 2020 5:57 am

I couldn't fully understand the "ESP-NETIF" library. Can we say "ESP-NETIF" is the lwIP library adapted to ESP? Algorithm expected from the software:

let's say , At first ethernet cable is plugged in and I want to do all tcp / ip operations(socket, dhcp, mdns-query) from ethernet. It is also connected to a network with wifi-station. When the Ethernet cable is unplugged , tcp / ip operations(socket, dhcp, mdns-query) should be done with wifi.


Do you think the algorithm below works properly? Functions will be referenced from the connect.c file. https://github.com/espressif/esp-idf/bl ... /connect.c

Ethernet Link Up:
Start eth => static esp_netif_t* eth_start(void)
Start => tcp-socket, mdns
Ethernet Link Down:
Stop=> tcp-socket, mdns
Stop eth => static void eth_stop(void)
start wifi => static esp_netif_t* wifi_start(void)
Start tcp-socket, mdns

Also Can we say that there can only be one "esp_netif_t" in the app, tcp-socket, dhcp and mdns operate on this "esp_netif_t"?

Edit:
Also I didnt find any explanation about esp_netif_inherent_config_t.route_prio? What do we use it for?

Who is online

Users browsing this forum: No registered users and 181 guests