Hello,
I am initializing Ethernet and WiFi in STA mode from main, then ESP32 is getting connected to cloud once both Ethernet and WiFi STA gets IP. I checked by disconnecting Ethernet and WiFi one by one to check which interface is being used for cloud connection, and I found that there is no effect of disconnecting Ethernet cable, only disconnecting WiFi router disconnects cloud from ESP32.
So my concern is, If AP is connected to ESP32, Ethernet connection will not come into picture. ESP32 will always use WiFi interface on priority than Ethernet. Is it expected behavior.?
Thanks.
Priority interface while using Ethernet and WiFi in STA mode together
-
- Posts: 62
- Joined: Wed Apr 19, 2017 6:35 am
-
- Posts: 62
- Joined: Wed Apr 19, 2017 6:35 am
Re: Priority interface while using Ethernet and WiFi in STA mode together
Hi WiFive,
Thanks for the quick response,
Now I am able to set default interface Eth/wifi with setting default netif.
Thanks.
Re: Priority interface while using Ethernet and WiFi in STA mode together
Hi all,
How about the IDF 4.0?
I modified tcpip_adapter_lwip.c
if (esp_netif[TCPIP_ADAPTER_IF_ETH] != NULL && netif_is_up(esp_netif[TCPIP_ADAPTER_IF_ETH])) {
netif_set_default(esp_netif[TCPIP_ADAPTER_IF_ETH]);
But it not effected.
How about the IDF 4.0?
I modified tcpip_adapter_lwip.c
if (esp_netif[TCPIP_ADAPTER_IF_ETH] != NULL && netif_is_up(esp_netif[TCPIP_ADAPTER_IF_ETH])) {
netif_set_default(esp_netif[TCPIP_ADAPTER_IF_ETH]);
But it not effected.
-
- Posts: 1
- Joined: Mon Dec 07, 2020 2:38 am
Re: Priority interface while using Ethernet and WiFi in STA mode together
Hi, Is it possible in Arduino environnement?
Thanks!
Thanks!
Who is online
Users browsing this forum: No registered users and 339 guests