Reference   Language | Libraries | Comparison | Changes

Ethernet

Ethernet.setRetransmissionTimeout()

Description

Set the Ethernet controller's timeout. The initial value is 200 ms. A 200 ms timeout times the default of 8 attempts equals a blocking delay of 1600 ms during a communications failure. You might prefer to set a shorter timeout to make your program more responsive in the event something goes wrong with communications. You will need to do some experimentation to determine an appropriate value for your specific application.

Syntax

Ethernet.setRetransmissionTimeout(milliseconds)

Parameters

milliseconds: the timeout duration (uint16_t)

Returns

Nothing

Example

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(10, 0, 0, 177);

void setup() {
  Ethernet.begin(mac, ip);
  Ethernet.setRetransmissionTimeout(50);  // set the Ethernet controller's timeout to 50 ms
}

void loop () {}

See also


Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.