From 8a0ff8d2c7accdeaa9353968698a2ab0da86eb0d Mon Sep 17 00:00:00 2001 From: Paolo Paolucci Date: Thu, 3 Sep 2015 18:52:08 +0200 Subject: [PATCH] Correct Ethernet.begin() The correct inizialization of Ethernet.begin() is: - Ethernet.begin(mac); - Ethernet.begin(mac, ip); - Ethernet.begin(mac, ip, dns); - Ethernet.begin(mac, ip, dns, gateway); - Ethernet.begin(mac, ip, dns, gateway, subnet); Ethernet.begin(mac, ip, gateway, subnet); is a common mistake. --> https://www.arduino.cc/en/Reference/EthernetBegin Will need to change the examples in the Reference. --- .../Ethernet/examples/AdvancedChatServer/AdvancedChatServer.ino | 2 +- libraries/Ethernet/examples/ChatServer/ChatServer.ino | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/Ethernet/examples/AdvancedChatServer/AdvancedChatServer.ino b/libraries/Ethernet/examples/AdvancedChatServer/AdvancedChatServer.ino index 1c7ec4cabd8..2fbd8a014a9 100644 --- a/libraries/Ethernet/examples/AdvancedChatServer/AdvancedChatServer.ino +++ b/libraries/Ethernet/examples/AdvancedChatServer/AdvancedChatServer.ino @@ -41,7 +41,7 @@ EthernetClient clients[4]; void setup() { // initialize the ethernet device - Ethernet.begin(mac, ip, gateway, subnet); + Ethernet.begin(mac, ip, gateway, gateway, subnet); // start listening for clients server.begin(); // Open serial communications and wait for port to open: diff --git a/libraries/Ethernet/examples/ChatServer/ChatServer.ino b/libraries/Ethernet/examples/ChatServer/ChatServer.ino index 927a60e1be2..1f960fce8d5 100644 --- a/libraries/Ethernet/examples/ChatServer/ChatServer.ino +++ b/libraries/Ethernet/examples/ChatServer/ChatServer.ino @@ -37,7 +37,7 @@ boolean alreadyConnected = false; // whether or not the client was connected pre void setup() { // initialize the ethernet device - Ethernet.begin(mac, ip, gateway, subnet); + Ethernet.begin(mac, ip, gateway, gateway, subnet); // start listening for clients server.begin(); // Open serial communications and wait for port to open: