Reference.EthernetBegin History

Show minor edits - Show changes to markup

September 02, 2013, at 04:25 PM by Federico -
Changed lines 25-26 from:

dns: the address for a DNS server.

to:

dns: the IP address of the DNS server (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1

Deleted line 52:
October 30, 2012, at 12:18 PM by Roberto Guido -
Added line 38:
  1. include <SPI.h>
June 02, 2012, at 09:37 PM by David A. Mellis -
Changed lines 33-34 from:

None

to:

The DHCP version of this function, Ethernet.begin(mac), returns an int: 1 on a successful DHCP connection, 0 on failure. The other versions don't return anything.

April 10, 2012, at 12:13 AM by Scott Fitzgerald -
Changed lines 15-17 from:

Ethernet.begin(mac, ip, gateway);
Ethernet.begin(mac, ip, gateway, subnet);

to:

Ethernet.begin(mac, ip, dns);
Ethernet.begin(mac, ip, dns, gateway);
Ethernet.begin(mac, ip, dns, gateway, subnet);

Added lines 25-26:

dns: the address for a DNS server.

November 01, 2011, at 01:14 PM by Scott Fitzgerald -
Changed lines 7-8 from:

Initializes the ethernet library and network settings. With version 1.0, the library supports DHCP. Using Ethernet.begin(mac) with the proper network setup, the Ethernet shield will automatically obtain an IP address.

to:

Initializes the ethernet library and network settings.

With version 1.0, the library supports DHCP. Using Ethernet.begin(mac) with the proper network setup, the Ethernet shield will automatically obtain an IP address. This increases the sketch size significantly.

October 31, 2011, at 06:57 PM by Tom Igoe -
Changed line 32 from:

[@

to:
Changed lines 46-47 from:

@]

to:
October 31, 2011, at 04:20 PM by Scott Fitzgerald -
Changed lines 7-8 from:

Initializes the ethernet library and network settings.

to:

Initializes the ethernet library and network settings. With version 1.0, the library supports DHCP. Using Ethernet.begin(mac) with the proper network setup, the Ethernet shield will automatically obtain an IP address.

Added line 11:

Ethernet.begin(mac); \\

October 19, 2010, at 06:52 AM by David A. Mellis -
Changed lines 17-18 from:

mac: the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. For most commercial Ethernet devices this is pre-assigned by the manufacturer. For the Ethernet shield, you get to choose your own.

to:

mac: the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. Newer Arduino Ethernet Shields include a sticker with the device's MAC address. For older shields, choose your own.

July 31, 2010, at 07:40 PM by Tom Igoe -
Changed lines 17-24 from:

mac: the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. For most commercial Ethernet devices this is pre-assigned by the manufacturer. For the Ethernet shield, you get to choose your own.

ip: the IP address of the device (array of 4 bytes)

gateway: the IP address of the network gateway (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1

subnet: the subnet mask of the network (array of 4 bytes). optional: defaults to 255.255.255.0

to:

mac: the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. For most commercial Ethernet devices this is pre-assigned by the manufacturer. For the Ethernet shield, you get to choose your own.

ip: the IP address of the device (array of 4 bytes)

gateway: the IP address of the network gateway (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1

subnet: the subnet mask of the network (array of 4 bytes). optional: defaults to 255.255.255.0

July 31, 2010, at 07:39 PM by Tom Igoe -
Changed lines 17-18 from:

mac: the MAC address for the device (array of 6 bytes)

to:

mac: the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. For most commercial Ethernet devices this is pre-assigned by the manufacturer. For the Ethernet shield, you get to choose your own.

Changed lines 34-36 from:

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

to:

// the media access control (ethernet hardware) address for the shield: byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //the IP address for the shield: byte ip[] = { 10, 0, 0, 177 };

February 11, 2009, at 08:13 PM by David Cuartielles -
Changed line 42 from:

void loop {}

to:

void loop () {}

September 02, 2008, at 10:34 PM by David A. Mellis -
Changed lines 1-2 from:
to:
September 02, 2008, at 10:34 PM by David A. Mellis -
Added lines 1-2:
September 02, 2008, at 10:21 PM by David A. Mellis -
Changed lines 9-12 from:

Ethernet.begin(mac, ip); Ethernet.begin(mac, ip, gateway); Ethernet.begin(mac, ip, gateway, subnet);

to:

Ethernet.begin(mac, ip);
Ethernet.begin(mac, ip, gateway);
Ethernet.begin(mac, ip, gateway, subnet);

September 02, 2008, at 10:19 PM by David A. Mellis -
Added lines 1-42:

Ethernet.begin()

Description

Initializes the ethernet library and network settings.

Syntax

Ethernet.begin(mac, ip); Ethernet.begin(mac, ip, gateway); Ethernet.begin(mac, ip, gateway, subnet);

Parameters

mac: the MAC address for the device (array of 6 bytes)

ip: the IP address of the device (array of 4 bytes)

gateway: the IP address of the network gateway (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1

subnet: the subnet mask of the network (array of 4 bytes). optional: defaults to 255.255.255.0

Returns

None

Example

#include <Ethernet.h>

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

void setup()
{
  Ethernet.begin(mac, ip);
}

void loop {}

Share