It also doesn't contain the IP address you said you think the arduino should have. WPA2 settings should be wireless-only and irrelevant to an ethernet-connected device.
I've completely lost track of how you have your arduino connected, how you have it configured, what sketch you're running, and ... pretty much everything else.
So, let's start over. (1 Step): I selected to share my internet via Ethernet port (System Preferences/Sharing/Internet Sharing (select Internet sharing, select share your connection from: Ethernet) So internet sharing from my computer is on via Ethernet port.
(2 step) Get IP Arduino Address as last sketch requires IP and mac addresses:
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0x00, 0xAA, 0xBB, 0xCC, 0xDA, 0x02 };
IPAddress ip(191,11,1,1); //<<< ENTER YOUR IP ADDRESS HERE!!!
I found in Arduino/Examples/DHCPAddressPrinter and uploaded DHCPAddressPrinter click on Serial monitor and I get message
<My My IP address: 192.168.2.3> .
DHCP:"The Dynamic Host Configuration Protocol (DHCP) is a standardized networking protocol used on Internet Protocol (IP) networks for dynamically distributing network configuration parameters, such as IP addresses for interfaces and services."
/*
DHCP-based IP printer
This sketch uses the DHCP extensions to the Ethernet library
to get an IP address via DHCP and print the address obtained.
using an Arduino Wiznet Ethernet shield.
Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
created 12 April 2011
modified 9 Apr 2012
by Tom Igoe
*/
#include <SPI.h>
#include <Ethernet.h>
// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = {
0x32, 0x53, 0xcf, 0x83, 0x61, 0xd4 };
// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
// this check is only needed on the Leonardo:
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
for(;;)
;
}
// print your local IP address:
Serial.print("My IP address: ");
for (byte thisByte = 0; thisByte < 4; thisByte++) {
// print the value of each byte of the IP address:
Serial.print(Ethernet.localIP()[thisByte], DEC);
Serial.print(".");
}
Serial.println();
}
void loop() {
}
(3 Step) I used code in reply #3, which worked for me. I got this message on serial monitor:
<connected
HTTP/1.1 200 OK
Date: Sun, 01 Jun 2014 00:27:06 GMT
Server: Apache/2.2.15 (CentOS)
Last-Modified: Sat, 13 Nov 2010 16:31:40 GMT
Accept-Ranges: bytes
Content-Length: 51
Connection: close
Content-Type: text/plain; charset=UTF-8
Woohoo! Your arduino ethernet client works!
zoomkat
disconnecting.
OK, ethernet connection is working : )).... For this moment things are fine.
(4 Step): There is great web:http://www.instructables.com/id/Arduino-Ethernet-Shield-Tutorial/step4/Server/
I decided to use this sketch:
/*
Web Server Demo
thrown together by Randy Sarafan
A simple web server that changes the page that is served, triggered by a button press.
Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* Connect a button between Pin D2 and 5V
* Connect a 10K resistor between Pin D2 and ground
Based almost entirely upon Web Server by Tom Igoe and David Mellis
Edit history:
created 18 Dec 2009
by David A. Mellis
modified 4 Sep 2010
by Tom Igoe
*/
#include <SPI.h>
#include <Ethernet.h>
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0x00, 0xAA, 0xBB, 0xCC, 0xDA, 0x02 };
IPAddress ip(191,11,1,1); //<<< ENTER YOUR IP ADDRESS HERE!!!
// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);
int buttonPress = 1;
void setup()
{
pinMode(2, INPUT);
// start the Ethernet connection and the server:
Ethernet.begin(mac, ip);
server.begin();
}
void loop()
{
buttonPress = digitalRead(2);
// listen for incoming clients
EthernetClient client = server.available();
if (client) {
// an http request ends with a blank line
boolean currentLineIsBlank = true;
while (client.connected()) {
if (client.available()) {
char c = client.read();
// if you've gotten to the end of the line (received a newline
// character) and the line is blank, the http request has ended,
// so you can send a reply
if (c == '\n' && currentLineIsBlank) {
// send a standard http response header
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println();
//serves a different version of a website depending on whether or not the button
//connected to pin 2 is pressed.
if (buttonPress == 1) {
client.println("<cke:html><cke:body bgcolor=#FFFFFF>LIGHT!</cke:body></cke:html>");
}
else if (buttonPress == 0){
client.println("<cke:html><cke:body bgcolor=#000000 text=#FFFFFF>DARK!</cke:body></cke:html>");
}
break;
}
if (c == '\n') {
// you're starting a new line
currentLineIsBlank = true;
}
else if (c != '\r') {
// you've gotten a character on the current line
currentLineIsBlank = false;
}
}
}
// give the web browser time to receive the data
delay(1);
// close the connection:
client.stop();
}
}
"The page should load with a black background" In my case, absolutely no page is loaded. Is there is something I should do?