Combine two kind of (network) connection


I would like to combine two kinds of connexion like WIFI and Ethernet (I have already made my code to work with ENC28J60 and ESP8266 but not together). Did anyone once do that?

PD: My aim is not two use both of them at the same time but for example look if the wifi connexion is available and if it is not, try with Ethernet for example or being able to choose between one of those.

Thank you

I do vaguely seem to remember this being asked before, maybe as a question about using a SIM800 cellular data connection when Wi-Fi isn’t available.

It should be fairly easy to do. Search the forum for code example about re-connection routines - this may be a good starting point:

Instead of re-connecting to Wi-Fi when it’s available again, switch over to trying to connect via Ethernet instead (and vice versa).


Thank you Pete, your comment has been very Helpful.

Between using Blynk.config() as a non-blocking command, and the fact the BlynkTimer works without server connection, then using lambda functions with timers, one could even put the logic entirely into the Setup() function (although not necessary… just saying).

Boot, try one connection for x time, if nothing, try the next method, then the next, etc… then connect to Blynk and start the usual looping run.

1 Like

Thank you, I will try and reply as soon as posible.