Go Down

Topic: Can only connect to ENC28J60 webserver once then "cannot connect" message (Read 2528 times) previous topic - next topic

LJSG

Hi Folks,

purchased mu first Arduino recently and with it came the ENC28J60 ethernet shield which everyone seems to have some problem with lol.
well Im another to add to the list.

Im using the library that came from here.
I have loaded up the Arduino with the webserver example and can connect to it through my browser, however if I refresh the page or try to ping after initial connection it no longer works until i reset.

Any suggestions?

FrankRadio

Hum.. what will be?
You test it with several browser or only with one?.

Because i builded that kit in a vero board and i don't have any issue. What i remember is that i use always the internet explorer as browser.

May be is that.. i don't remember if they use javascript or similar and some browser do not understand that.

Or...Microchip get a new firmware at the 28J60, or got some err..why do not search at microchip the 28J60 version? may be some CMD are different from the olders..

I was using 28J60 and the CPU family 18F67J60 with any issue. Why do not cheq the client version with the arduino?

Best Regards
Frank

LJSG

I have tried several browsers and the same still happens, I dont think its a browser issue as the same happens when I use PING from the CMD menu.

I will have a scout around for any firmware upgrades that may be required.

I will need to wait until I have some spare time for now though.

grndamgt4

I'm sorry to say there are multiple causes of what you are facing. I've dealt with 1 and am currently facing a 2nd
1)The first time this happened it was a power issue, see my post at
https://github.com/thiseldo/EtherShield/issues/4#comment_1240422

if you are using usb power, try a couple other computers or a wall wart (i now use a 7.5v 500ma cell phone charger) as usb power is not created equal. This got me past the simple web server example only returning 1 or 2 requests.

1.5)As the author of the library posted at the link above, it could also be a buffer problem depending on the size of the packet you are sending and which chip you are using, though this was not my problem it is worth a shot, especially if you have an arduino uno or other atmega328 with the extra space.

2)I have a very simple web server with a form, 2 text boxes, and a submit button (it's hooked up to my garage door). It works perfectly from a browser. However, if I click the submit button 4 or 5 times fast, the web server stops responding. I can see from the serial.println that the arduino is still happily chugging along, but calls to the ethernet library no longer process requests. I had a portion of code that looked like
digitalWrite(9,HIGH);
delay(800);
digitalWrite(9,LOW);
delay(2000);

for some reason the delay of 2 seconds at the end allowed the ethernet shield to get into a bad state. I removed that delay and now it works for as fast as I can humanly click the submit button.
However, i have written an android app to open my garage door. When it sends a simple httpget to the arduino, the arduino processes the request twice, again I believed this to be related to the delay(800), so I changed it to a delay(500) and now it works fine for 5 out of 8 requests and then get into a bad state. All the while the arduino is still running correctly, it's just the library/ethernet shield get hung up.

Good luck with your issue.

Go Up