Go Down

Topic: Ethernet shield not allowing repeated connections (Read 4400 times) previous topic - next topic


@Paul - I just got my ethernet shield in the post and so I'd be interested (and I'm sure the rest of the forum would too) to see what you did in your source to check for the lock-up

Paul Tanner

OK.  This is not the recommended solution as the libraries ought to be fixed.  What I did was:

         // ready to send something
         while (!client.connect()) {
           digitalWrite(13,HIGH);         // flash LED if it hangs
           if (tries > 100) {                 // ok we have problem
             Ethernet.begin(mac, ip);    // solve it by brute force
         // OK to send now
         client.print("GET /etc...

As I mentioned above this is not the right fix but a reasonable workaround until the libraries get fixed.


Feb 01, 2009, 10:41 pm Last Edit: Feb 01, 2009, 10:47 pm by GekoCH Reason: 1
@Paul Tanner

Could you please post all your changes in the libary.
Because mine still hangs up after 20-30 reconnects
to a PHP site.


Paul Tanner

@GekoCH.  I only made one change in the library.  It's the one (posted above) relating to changing the port number.  In the application I made a change that I also posted above.  This is the one about restarting the shield if and when it won't connect.

Please post again here if you have these changes and it still hangs.  We really need help on this from the author of the library or someone familiar with the code.


ok I've changed those things in the libary and made some changes in my sketch.
Every time I send data to my PHP skript I start the Modul again with:
Code: [Select]
Ethernet.begin(mac, ip);
like you've done in your sketch.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131