Go Down

Topic: Ethernet shield,Arduino UNO and 3 problems :) (Read 8833 times) previous topic - next topic

knockouta

Hello, this is my first topic here :) I am sorry for may bad English.

I have Arduino UNO and Ethernet shield (Wiznet W5100).

Problem 1: When i want to upload a sketch while the shiled is pluged it says: avrdude: stk500_getsync(): not in sync: resp=0x00
when i unplug the the shield it uploads with no problems.
Problem 2: The serial monitor is not working while the  shield is on. When i unplug only the ICSP , it starts to work immediately.
Problem 3: I cant ping the shield. when i ping it the RX blinks, but the TX is not. ( destination host unreachable )

I am trying to run DhcpChatServer, but it does nothing.
FULLD,100M,LINK and PWR led are always on. When i ping it RX starts to blink.

I am new in this thing. I am trying to fix it a few days already...

AJITnayak

Share your code

1)
Quote
When i want to upload a sketch while the shiled is pluged it says: avrdude: stk500_getsync(): not in sync: resp=0x00
when i unplug the the shield it uploads with no problems.

is TX and RX line connected to any other interface.???

2)
Quote
Problem 2: The serial monitor is not working while the  shield is on. When i unplug only the ICSP , it starts to work immediately.

How you uploading code. Ru using ICSP or USB to upload the code.

3)
Quote
Problem 3: I cant ping the shield. when i ping it the RX blinks, but the TX is not. ( destination host unreachable )

can you share  screen shot of error
AMPS

SurferTim

Some ethernet shields have a manufacturing defect. They have solder bridges from pin to pin. That will cause the symptoms you describe.

Here is a link to a pic of a w5100 with 4 solder bridges. The red arrows point to them. There should be no solder bridges between any pins on your IC.
http://i681.photobucket.com/albums/vv178/grue2/Computers/pict10842.jpg

knockouta

Thanks. I saw those bridges when open it but i was not shure if it is right. My mind was keep sayingme  get them off. I will try to fix and replay. Thanks you both :)
No other devices and I am using USB.

AJITnayak

If using USB . why did you mention ICSP??

I have same shield , but i can upload code. I am doing like this way . i removed ethernet connection. upload program using USB. After that i connected Ethernet cable.

can you share your code  so i can tryout once.
AMPS

SurferTim

Quote
Thanks. I saw those bridges when open it but i was not shure if it is right.

@AMP-N: The device is faulty. It has solder bridges. The ICSP connector has the SPI data lines for the shield.

@knockouta: If the shield is new, you might consider returning it for a new shield. Contact your supplier to see if you can get a replacement before you try to repair the one you have.

AJITnayak

But i am also having same solder bridge in shield . I am not getting any error.
AMPS

SurferTim


But i am also having same solder bridge in shield . I am not getting any error.

Then you are lucky the solder bridges are not causing a fail. There should be no solder bridges on your IC.

AJITnayak

As per me he should tried this code.

First  remove your Ethernet shield. Upload the Example code. Then connect your Ethernet .
check it is working or not.

Add blink program, serialmonitor display .

Code: [Select]

/*
  Web Server

A simple web server that shows the value of the analog input pins.
using an Arduino Wiznet Ethernet shield.

Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* Analog inputs attached to pins A0 through A5 (optional)

created 18 Dec 2009
by David A. Mellis
modified 9 Apr 2012
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[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1,177);

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup() {
// Open serial communications and wait for port to open:
  Serial.begin(9600);
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());
}


void loop() {
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(c);
        // 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("Connection: close");  // the connection will be closed after completion of the response
  client.println("Refresh: 5");  // refresh the page automatically every 5 sec
          client.println();
          client.println("<!DOCTYPE HTML>");
          client.println("<html>");
          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            int sensorReading = analogRead(analogChannel);
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(sensorReading);
            client.println("<br />");       
          }
          client.println("</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();
    Serial.println("client disonnected");
  }
}



This part is very important
Quote


byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1,177);

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);
AMPS

SurferTim

That is a very good idea. If you see "server is at 192.168.1.177", then your w5100 SPI is working ok. If you get any other iP, like "server is at 0.0.0.0", then your w5100 is failing.


knockouta

I can try it beacouse my serial monitor is not working while the shield is on. I try it with LCD and lcd.print but no result. I thing that the shield is total fault. I remove the bridges but no result...
If i remove ICSP i get from serial monitor 0.0.0.0...

SurferTim

If that is the case, I will guess the 5 volt bus or the MOSI line is shorted on the shield. I can't think of anything else that would cause that fail. If you want to try one more thing, attach the shield with the ICSP pins connected and check the voltage on the 5v pin.

knockouta

I dont know but the green LED on the port was always on, but the yellow one never worked. I wrote a email to the vendor. I try to take a new one :) It is from ebay and takes a month :X A original one is for me to  $)

SurferTim

I missed this:
Quote
I try it with LCD and lcd.print but no result.

What LCD are you using? How is it connected? Is it connected when the fail happens? Have you tried the ethernet shield with the LCD removed?


knockouta


I missed this:
Quote
I try it with LCD and lcd.print but no result.

What LCD are you using? How is it connected? Is it connected when the fail happens? Have you tried the ethernet shield with the LCD removed?




I try it first without the LCD. I read 1 week all forums and i tryed everything. I just put the LCD to see what happens. it uses A5 and A4.
The solutions is one: new and working shield.
Thank you all for the help i will try to fix it until i get new one.

Go Up