Non-blocking Internet connection

Hi,

is there any way to achieve a non-blocking Internet connection when using 

Ethernet.begin(mac, ip);

?

If there is no connection at all, this procedure does not block, but if there IS and the IP is incorrect, the program stops at this point.

Is there a workaround?

 

Peter Bezemek
Peter Bezemek
34
| 1 1 2
Asked on 3/3/22, 12:52 PM
0
vote
197 Views

Hi Didier,

my problem is different. Let's assume THERE IS a working Internet connection, which, after some time, stops working for whatever reason. There is an Ethernet module present, but the Ethernet.begin method blocks the running of the program because there is a problem with the Internet connection and pretty much freezes the Industruino.

Peter Bezemek
Peter Bezemek
34
| 1 1 2
Answered on 4/11/22, 8:28 PM
0
vote

Hi Peter, At this point, I would use a watchdog, count the times the Industruino freezes in a row, save this in EEPROM, and when I reach a limit like 3 retries, stop retrying for, say, 10 minutes, and try again another 3-tries cycle, until it works. Not very satisfactory, but works. Didier, DG2R

Didier DORGUIN
on 6/14/22, 5:28 AM

Hi Didier,

my problem is different. Let's assume THERE IS a working Internet connection, which, after some time, stops working for whatever reason. There is an Ethernet module present, but the Ethernet.begin method blocks the running of the program because there is a problem with the Internet connection and pretty much freezes the Industruino.

Peter Bezemek
Peter Bezemek
34
| 1 1 2
Answered on 4/11/22, 8:27 PM
0
vote

Hi Peter,

I think Tom covered this in : https://industruino.com/blog/our-news-1/post/ethernet-easy-plug-play-38 when he tests if the Ethernet module is present prior to sending his Ethernet.begin by testing if the SD client is present, if I remember well.

Hope this helps

Didier, DG2R

Didier DORGUIN
Didier DORGUIN
172
| 4 1 3
Answered on 4/11/22, 7:35 PM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

68 follower(s)

Stats

Asked: 3/3/22, 12:52 PM
Seen: 197 times
Last updated: 4/11/22, 8:28 PM