Does ethercard have a working limitation?

Dear Folks;

I have a different kind of problem. My question is that ethercard library is limited for a certain time working (such as 1hour, 24hours, etc.)...

I have a project with Ard.UNO + ENC28J60 and makes HTTP request from web and gets responses; everything is perfect for a certain time. Indeed, I have two different place (so two different networks) to check the devices let's call those places as Place_G and Place_D. (Note: The same device with the same code (sketch) used for both place.)

For Place_G
Device works perfectly only for 24 hours. (Three different times checked, and the same results came. So it is very stable in it's behavior.) I also debugging from serial monitor; after that 24 hours Atmega328 still keeps working in a good way successfully. And pings from another PCs are very successfull to ENC28J60 + Atmega328. By the way; isLinkUp function of ethercard is successfull also after 24 hours later. Only problem is that my requests from my device to web stops... I think there is something in code, which stops the sending requests after 24 hours.

The 24 hours issue so sharp, because I also measured the time in 15 seconds sensivity. Even the real time vary from the device time which came from millis() function. The "hang on" time described by millis() function in the device. Deviations with real time was 10 min. 4 min. and 2 min. respectively. So I think the stopage of sending requests steam from device itself, not from the network modem nor another component from network.

For Place_D
The same situation is valid for only 1 hour. Nothing has been changed in the device and in the code. I only moved the same structure from Place_G to Place_D. So only network changed. Stopage time moved from 24 hours to 1 hour.
Also pings were successfull... The device is replying the pings perfectly; however there is no sending requests to web again after 1 hour.

As a brief; there is something stops the perfect working of the device after a certain time (24hours for Place_G and 1 hour Place_D). All other events goes on purely with pings and with Atmega328.

After that description; Do you have any experience like I have ? What was your solution ?

Your valuable kind answers will be appreciated....

You can kindly find the code below...

#include <EtherCard.h>
const char Serial_No[] = "12345678";
static byte mymac[] = { 0x11,0x22,0x33,0x44,0x55,0x66 };
const char website[] PROGMEM = "mywebsite.com";
byte Ethernet::buffer[350];

void setup()
{
Serial.begin(57600);
Serial.println(F("Starter Prompt"));
Serial.println(Serial_No);

if (ether.begin(sizeof Ethernet::buffer, mymac) == 0) Serial.println(F("Ethernet Failed..."));
if (!ether.dhcpSetup())Serial.println(F("DHCP Failed..."));

ether.printIp(F("MyIP:"),ether.myip);
ether.printIp(F("MyGW:"),ether.gwip);
ether.printIp(F("MyDNS:"),ether.dnsip);

if (!ether.dnsLookup(website)) Serial.println(F("DNS Failed..."));
ether.printIp(F("MySVR:"), ether.hisip);
}

void loop()
{
static uint32_t timer, Count_a, Count_b;
String Mytime;
char Data_ToSend[40];

ether.packetLoop(ether.packetReceive());

if (millis() > timer)
{
timer = millis() + 15000;
Count_a += 1;
if(!ether.isLinkUp()){Count_b += 1;}
Mytime = "CX:" + String(Count_b) + "_Tm:" + String(Count_a);
Serial.println(Mytime);
Mytime.toCharArray(Data_ToSend,40);
ether.browseUrl(PSTR("/api/api.php?value="), Data_ToSend, website, callback);
}
}

static void callback (byte status, word off, word len)
{
Ethernet::buffer[off+len] = 0;
Serial.println((const char*) Ethernet::buffer + off);
}

BR
Metin1981

If the same code on the same hardware exhibits different behavior depending on which network it is connected to, the problem isn't the code or the hardware.

PaulS:
If the same code on the same hardware exhibits different behavior depending on which network it is connected to, the problem isn't the code or the hardware.

Thanks for your reply, first of all...

As we think depended from network; why there is a "hang on" situation after a certain time such as 1hour etc. Normally something goes wrong after a certain time that is decided by atmega328 ( not the network).

BR
Metin1981

Normally something goes wrong after a certain time that is decided by atmega328 ( not the network).

Your not a network engineer, are you? If the network CONSISTENTLY fails to forward requests to the Arduino after 1 hour, or 24 hours, then the problem is NOT in the Arduino.

If the time that the Arduino worked was random or variable, then I'd consider that the problem COULD be with the Arduino.

PaulS:
If the time that the Arduino worked was random or variable, then I'd consider that the problem COULD be with the Arduino.

I see you very well; however after a simple short reset to ard. everything goes well again that's why ı asked is there a working limitation in the EtherCard library or something in the EtherCard library was wrong (or a bug) which causes a "hang on" ?

By the way as ı described at my first message everthing is perfect with ard. even after hang on situation. The same as perfect pings from network to ard.