Page 1 of 1

URGENT: How to switch between WIFI and ethernet connection?

Posted: Mon May 13, 2019 2:05 pm
by gpezzella
Hello
if I have understand well, esp32 always start in wifi mode and after if "SYSTEM_EVENT_ETH_CONNECTED" event is raised you can manage it.

Now I start in this way:

Code: Select all

    WiFi.mode(WIFI_MODE_STA);
    WiFi.onEvent(WiFiEvent);        
    WiFi.begin(_SSID_STA.c_str() , _PASSW_STA.c_str());
    while (WiFi.status() != WL_CONNECTED) {}
What I should write under "SYSTEM_EVENT_ETH_CONNECTED" case for switch to ethernet?

thanks