I have a wiz820io which I`m using with conjunction with an Arduino mega 2560 and the Arduino Ethernet Library.
The program on the board consistently keeps sending requests to a PC. The current behavior is such that if the PC is disconnected in the beginning when the board is turned on, the endPacket() function of the Ethernet library retries the transmission for 8 times by default and throws a timeout after 1600ms(Because of not getting the ARP response/dest MAC address) which stops the program . If the PC is present then the MAC address is saved in SN_DHAR register and the programs keeps running flawlessly(theoretically) even if the PC is disconnected from the network .
However , there are random occurances where the timeout occurs and the program stops, maybe once a day if I keep it running continously. Please correct me if I
m wrong but since the destination MAC address is already saved in the Sn_DHAR register, there should be no random re-try of ARP requests that can cause endPacket to timeout right?If Im not wrong, UDP send only retries the ARP if the IP or the port of the destination has changed from the previous time right?
Even if it tries ARP again, since the PC is still connected to the network it should be able to get the MAC address again and not fail with the UDP send. I can`t seem to figure out a reason for random timeouts like this. Anything on the Network side that can make this happen to the module?
Please can someone explain a possible reasoning for this?