URGENT: How to switch between WIFI and ethernet connection?

gpezzella
Posts: 52
Joined: Sun Jan 27, 2019 8:04 pm

URGENT: How to switch between WIFI and ethernet connection?

Postby gpezzella » Mon May 13, 2019 2:05 pm

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

Who is online

Users browsing this forum: No registered users and 69 guests