Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

corrupted data with : Leonardo + Ethernet Shield + WebRepeatingClient

Open franckbehaghel opened this issue 13 years ago • 5 comments

WebRepeatingClient received corrupted data when uSD card is in the slot.

For unknown reason , after time , and randomly , data get corrupted :

disconnecting. connecting... HTTP/1.1 200 OK Date: Sat, 02 Mar 2013 14:56:57 GMT Server: Apache/ProXad [Apr 20 2012 15:06:05] X-Powered-By: PHP/4.4.3-dev Connection: close Content-Type: text/html

1 disconnecting. connecting... HTÿP/ÿ.1ÿ20ÿ Oÿ ÿatÿ: ÿatÿ 0ÿ Mÿr ÿ01ÿ 1ÿ:5ÿ:5ÿ GÿT ÿSeÿveÿ: ÿpaÿhe/ÿroXÿd [ÿpr ÿ0 2012 15:06:05] ÿX-Pÿweÿed-Bÿ: ÿHPÿ4.4.ÿ-ÿev ÿCoÿneÿtiÿn:ÿclÿseÿ CÿntÿntÿTyÿe:ÿtexÿ/htÿl ÿ

franckbehaghel avatar Mar 02 '13 19:03 franckbehaghel

Are you sure uSD enable pin is in low state while communicating with ethernet shield? Please discuss this on the forum before reporting a bug

2013/3/2 franckbehaghel [email protected]

WebRepeatingClient seem to have corrupted data when uSD card is in the slot.

For unknown reason , after time , and randomly , data get corrupted :

disconnecting. connecting... HTTP/1.1 200 OK Date: Sat, 02 Mar 2013 14:56:57 GMT Server: Apache/ProXad [Apr 20 2012 15:06:05] X-Powered-By: PHP/4.4.3-dev Connection: close Content-Type: text/html

1 disconnecting. connecting... HTÿP/ÿ.1ÿ20ÿ Oÿ ÿatÿ: ÿatÿ 0ÿ Mÿr ÿ01ÿ 1ÿ:5ÿ:5ÿ GÿT ÿSeÿveÿ: ÿpaÿhe/ÿroXÿd [ÿpr ÿ0 2012 15:06:05] ÿX-Pÿweÿed-Bÿ: ÿHPÿ4.4.ÿ-ÿev ÿCoÿneÿtiÿn:ÿclÿseÿ CÿntÿntÿTyÿe:ÿtexÿ/htÿl ÿ

— Reply to this email directly or view it on GitHubhttps://github.com/arduino/Arduino/issues/1303 .

lestofante avatar Mar 04 '13 10:03 lestofante

this log is from WebRepeatingClient example. I just change this

32c32
< IPAddress ip(192,168,0, 150);
---
> IPAddress ip(10,0,0,20);
35c35
< IPAddress myDns(8,8,8,8);
---
> IPAddress myDns(1,1,1,1);
40c40
< char server[] = "xxxxxxxxxxxxxxxx";
---
> char server[] = "www.arduino.cc";
44c44
< const unsigned long postingInterval = 1*1000;  // delay between updates, in milliseconds
---
> const unsigned long postingInterval = 60*1000;  // delay between updates, in milliseconds
91,92c91,93
<     client.println("GET /arduino/info.php HTTP/1.1");
<     client.println("Host: xxxxxxxxxxxx");
---
>     client.println("GET /latest.txt HTTP/1.1");
>     client.println("Host: www.arduino.cc");
>     client.println("User-Agent: arduino-ethernet");

uSD card is not in the slot => no corrupted data. uSD card is in the slot => corrupted data. ( not systematic , randomly , happen after 1h or 2h )

I did not found that myself : http://arduino.cc/forum/index.php?topic=151790.0

franckbehaghel avatar Mar 04 '13 19:03 franckbehaghel

look at the answer of "SurferTimhttp://arduino.cc/forum/index.php?action=profile;u=49379 " "it does interfere with the SPI bus" this is my same concern: "Are you sure uSD enable pin is in low state while communicating with ethernet shield" let's continue of forum

edit: maybe "WebClientRepeating" should write a LOW in pin 4 with a comment witch say it is to disable SD

2013/3/4 franckbehaghel [email protected]

this log is from WebRepeatingClient example. I just change this 32c32 < IPAddress ip(192,168,0, 150);

IPAddress ip(10,0,0,20); 35c35 < IPAddress myDns(8,8,8,8);

IPAddress myDns(1,1,1,1); 40c40 < char server[] = "xxxxxxxxxxxxxxxx";

char server[] = "www.arduino.cc"; 44c44 < const unsigned long postingInterval = 1*1000; // delay between updates, in milliseconds

const unsigned long postingInterval = 60*1000; // delay between updates, in milliseconds 91,92c91,93 < client.println("GET /arduino/info.php HTTP/1.1"); < client.println("Host: xxxxxxxxxxxx");

client.println("GET /latest.txt HTTP/1.1"); client.println("Host: www.arduino.cc"); client.println("User-Agent: arduino-ethernet");

uSD card is not in the slot => no corrupted data. uSD card is in the slot => corrupted data. ( not systematic , randomly , happen after 1h or 2h )

I did not found that myself : http://arduino.cc/forum/index.php?topic=151790.0

— Reply to this email directly or view it on GitHubhttps://github.com/arduino/Arduino/issues/1303#issuecomment-14401548 .

lestofante avatar Mar 04 '13 20:03 lestofante

I guess the uSD client select is a CSN (client select not), thus enable on low. It should be kept high if it should not interfere.

shulter avatar Apr 21 '13 15:04 shulter

You should fix this problem by adding the following lines inside the setup():

pinMode (4, OUTPUT); digitalWrite (4, HIGH);

Fede85 avatar May 23 '13 16:05 Fede85