SOLVED!In the w5100.h there are two methods:
void W5100Class::setRetransmissionTime(uint16_t _timeout) {
writeRTR(_timeout);
}
void W5100Class::setRetransmissionCount(uint8_t _retry) {
writeRCR(_retry);
}
They are not used anywhere in the Ethernet library, so these get some default values. If you want to change these settings, just modify the begin() function in Ethernet.cpp to:
void EthernetClass::begin(uint8_t *mac, uint8_t *ip, uint8_t *gateway, uint8_t *subnet)
{
W5100.init();
W5100.setMACAddress(mac);
W5100.setIPAddress(ip);
W5100.setGatewayIp(gateway);
W5100.setSubnetMask(subnet);
// Add the following two lines:
W5100.setRetransmissionTime(50); // in milliseconds, 50 is a good value
W5100.setRetransmissionCount(1); // tries just once
}
Now my Arduino freezes just for 50 millis every 12 seconds, which is acceptable.
Thank you, dhunt for pointing me in the right direction!