Closed MehdiSadeghii closed 1 day ago
it's up to you to manage your interfaces. You have methods to check which one is connected and to set it as default outgoing interface. You have events, you can implement that there. I'm not sure that we need to implement something more than that.
if (NetInterface == "WIFI") { WiFi.STA.setDefault(); } else if (NetInterface == "PPP") { PPP.setDefault(); } else if (NetInterface == "ETH") { ETH.setDefault(); }
@BluesBilly you meant to use setDefault()?
if (NetInterface == "WIFI") { WiFi.STA.setDefault(); } else if (NetInterface == "PPP") { PPP.setDefault(); } else if (NetInterface == "ETH") { ETH.setDefault(); }
Thanks Problem Solved..
it's up to you to manage your interfaces. You have methods to check which one is connected and to set it as default outgoing interface. You have events, you can implement that there. I'm not sure that we need to implement something more than that.
Yeah You're correct. it was my confusion about managing interfaces. I thought that I have to manage it using mid level APIs but now I see it's easier than I thought. Thanks a lot .
Board
ESP32 Dev Module
Device Description
When using Ethernet and WiFi and PPP together, we can't switch between interfaces easily all interfaces, there's jut printTo method which we can print them. now my idea is to have a function which returns all NetworkInterface and when we want to set default interface we can choose interface from the list we extracted.
This feature is needed when we have more than one interfaces but our default interface doesn't have access to the internet. In this case we need to switch to another interface.
Hardware Configuration
gpio 16, 17 used for SIM800, VSPI is used for ETH
Version
latest master (checkout manually)
IDE Name
Arduino IDE
Operating System
Windows 10
Flash frequency
80 MHz
PSRAM enabled
yes
Upload speed
115200
Description
when my WiFi doesn't have access to the internet I need to switch to another interface.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide