I am not able to configure the ethernet shield with the SD card. I tried to find a response in the forum but I have not found it and so I ask for help. Summary of the tests I have done:

1 / Test read write SD card using Arduino example "ReadWriteSdfat"
Result:
Code: Select all
Correct, read and write without problems.
2 / Proof of IP address assignment by DHCP using the Arduino example "DhcpAddressPrinter"
2.1 Without SD card
Result:
Code: Select all
Right, assign IP address of my address range
2.2 With SD card
Result:
Code: Select all
"Failed to configure using DHCP"
3 / Test example of Arduino "WebClient"
3.1 Without SD card
Result:
Code: Select all
"Connecting ...
Connected
HTTP / 1.1 302 Found
Location: http://www.google.com/search?q=arduino&gws_rd=cr&ei=_pZDWfyECsnSwAKK3JvwBA
Cache-Control: private
Content-Type: text / html; Charset = UTF-8
P3P: CP = "This is not a P3P policy! See https://www.google.com/support/accounts/answer/151657?hl=en for more info."
Date: Fri, 16 Jun 2017 08:29:50 GMT
Server: gws
Content-Length: 278
X-XSS-Protection: 1; Mode = block
X-Frame-Options: SAMEORIGIN
Set-Cookie: NID = 105 = vzLbA5TMDvu9l0gp61wcut12OhH7UuLFls8pRcBBSfd0LWGZDayQFEn0hWyqyg4Hps6gQBOWK1p7h7KfxdtQ4KeziFiu9HB9vH4tDV9uqDGcLR9XAMUCdl90YSsvIzuu; Expires = Sat, 16-Dec-2017 08:29:50 GMT; Path = /; Domain = .google.com; HttpOnly
Connection: close
<HTML> <HEAD> <meta http-equiv = "content-type" content = "text / html; charset = utf-8">
<TITLE> 302 Moved </ TITLE> </ HEAD> <BODY>
<H1> 302 Moved </ H1>
The document has moved
<A HREF="http://www.google.com/search?q=arduino&gws_rd=cr&ei=_pZDWfyECsnSwAKK3JvwBA"> here </A>.
</ BODY> </ HTML>
Disconnecting. "
3.2 With SD card
Result:
"Failed to configure Ethernet using DHCP
Connecting
Connection failed
Disconnecting. "
4 / Test using "Ethernet_shield_with_W5100 by FernandoGarcia
3.1 Without SD card
Result:
Only the serial monitor shows the following line
Code: Select all
"Server is at 192.168.1.69"
3.2 With SD card
Result:
Only the serial monitor shows the following line
Code: Select all
"Server is at 192.168.1.69"
5 / Try using "Simple_webserver_running_on_SD_card by FernandoGarcia"
The index.htm file I have created hand on the SD card
Sketch Configuration:
Code: Select all
Byte mac [] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip (192, 168, 1, 69); // IP address, may need to change depending on network
EthernetServer server (80);
Const byte SelectSlave_ETH = 53;
Const byte SelectSlave_SD = 4; // For ethernet shield
// const byte SelectSlave_SD = 5; // For Ferduino Mega 2560
Const byte SelectSlave_RFM = 69; // For Ferduino Mega 2560
5.1 first run with SD card
Code: Select all
"Server is at 192.168.1.69
Initializing SD Card ...
SUCCESS - SD Card Initialized
SUCCESS - Found Index.htm. "
5.2 second run with SD card
Code: Select all
"Server is at 223.171.223.255
Initializing SD Card ...
SUCCESS - SD Card Initialized
SUCCESS - Found Index.htm. "
5.3 Without SD card
Server is at 192.168.1.69
Initializing SD Card ...
ERROR - SD Card Initialization failed "