Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about WiFi and Ethernet running simultaneously #36

Open
gonzabrusco opened this issue Nov 29, 2022 · 2 comments
Open

Question about WiFi and Ethernet running simultaneously #36

gonzabrusco opened this issue Nov 29, 2022 · 2 comments

Comments

@gonzabrusco
Copy link

Hello. I have one question about how this example works:

https://github.com/OLIMEX/ESP32-POE/blob/master/SOFTWARE/ARDUINO/ESP32_PoE_Ethernet_WIFI_test/ESP32_PoE_Ethernet_WIFI_test.ino

How do you know or how do you force which connection is made using Ethernet and which one is made using WiFi? It not very clear because you always initialize a WiFiClient object but there's no hint of which connection will use to reach internet.

Thanks
Gonzalo

@DanKoloff
Copy link
Contributor

No idea, we just combined the two examples and they worked. Might be better idea to ask in the espressif forums for ESP32 or in the Arduino or Arduino for ESP32 forums.

@0x0fe
Copy link

0x0fe commented Feb 6, 2023

clearly this example is not valid, they use the exact same wificlient for both connection with no action to ensure which one connects to which link, besides, IDF doesnt have any mechanism as of now to set a particular client to a particular link, so all this example does is keep connecting via the same link. in this case it must be via wifi probably since it is the last link which has been setup.
You can see the ticket i opened here espressif/arduino-esp32#7796
One convoluted way to do it, would be to set wifi off whenever you want to use the ETH link, and set the ETH off whenever you want to use the wifi link, but that doesnt seem very practical, and i dont even know how we can se the ETH off, for wifi you can use

void wifi_off(void){
  
  WiFi.disconnect(true);
  WiFi.mode(WIFI_OFF);  
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants