Hello,
I have Uno R3 and W5100 shield with micro-SD card slot.
The problem symptoms are:
This code hands, nothing is executed until reset
Udp.beginPacket(address, port)
The piece from Webserver example
IPAddress ip(192, 168, 1, 21);
...
Ethernet.begin(mac, ip);
server.begin();
Serial.print("server is at ");
Serial.println(Ethernet.localIP());
outputs it's local IP is 0.0.0.0
3. The LEDs on the Ethernet port is not blinking (turned off)
4. SD card works fine.
Also it worked both for TCP and UDP. The device is still under construction so it never worked longer then few hours. Does it looks like some hardware or software issue? The cable is connected. Exactly the same cable which I used before. Also I tried another cable which is used for my PC to connect to the router now.
I do not know how exactly but when I'm calling SD card functions it automatically activates SD card, same for Ethernet. The sketch was working without any problem, the question is why W5100 is warm (so, has power) but leds on the Ethernet port are off.
The sketch does not use SD and network similtaneously. It sends some data then writes a file log.
mmessiah:
I do not know how exactly but when I'm calling SD card functions it automatically activates SD card, same for Ethernet. The sketch was working without any problem, the question is why W5100 is warm (so, has power) but leds on the Ethernet port are off.
The sketch does not use SD and network similtaneously. It sends some data then writes a file log.
If you try the Ethernet library examples, they do not initialize the SD card. if pin 4 is floating the bus is disturbed.
mmessiah:
OK, lets return to the initial problem. Not my sketch. Webserver example does not work, IP is 0.0.0.0, nothing related to SD card, port LEDs are off.
did you remove the SD card from the adapter?
do you use the latest version of the Ethernet library (2.00)? the examples have better diagnostics
I tried both with SD card and without. Ethernet library 1.1.2, just updated to 2.0.0, recompiled and uploaded Webserver. Without SD card inserted. Again, leds are off, Ethernet.localIP() in setup() returns 0.0.0.0.
Led "pwr" on the shield is on,
leds "link", "100m", "coll", "tx" are constantly off regardless if cable connected or not.
Yesterday I used network cable tester to test connection from both sides: all 8 wires show to be connected.
Same situation with another UNO. Unfortunately I have no second Ethernet shield to compare the behaviour with connected and disconnected cable, and I forgot which leds were on while it worked.
mmessiah:
I tried both with SD card and without. Ethernet library 1.1.2, just updated to 2.0.0, recompiled and uploaded Webserver. Without SD card inserted. Again, leds are off, Ethernet.localIP() in setup() returns 0.0.0.0.
Led "pwr" on the shield is on,
leds "link", "100m", "coll", "tx" are constantly off regardless if cable connected or not.
Yesterday I used network cable tester to test connection from both sides: all 8 wires show to be connected.
Same situation with another UNO. Unfortunately I have no second Ethernet shield to compare the behaviour with connected and disconnected cable, and I forgot which leds were on while it worked.
how is Ethernet cable connected? to router/switch?
Of course, switch. In case of cross-over to PC it probably should work in case of proper static IP configuration, not DHCP. I use almost new cable for Arduino. When I noticed this problem yesterday I also connected it instead of my PC with the cable which I use just now, so it should not be a cable issue.
I checked once more with different power source and different ethernet cable. Cable tester from opposite side shows all pins are connected to equipment (i.e. Arduino ethernet shield). LEDs are off, IP is 0.0.0.0, DHCP is working in my LAN, the problem is hardware. Who knows why this shield could be broken after few days of operation in total? Maybe some ideas what to check and how to fix? Looks like the chip is under power (it's warm)...
Ethernet shield was not found. Sorry, can't run without hardware.
I see some interesting code in the w5100.cpp & w5100.h so I'll try to send some SPI requests directly to check the RAW output... but it sounds bad.
After removing some comments from w5100.cpp and adding my own debug output:
Ethernet WebServer Example
w5100 init
w5100.cpp: detect W5200 chip
Wiznet soft reset
mr=0
w5100.cpp: detect W5500 chip
Wiznet soft reset
mr=0
w5100.cpp: detect W5100 chip
Wiznet soft reset
mr=0
w5100.cpp: readMR =0 <> 0x10
no chip
Ethernet shield was not found. Sorry, can't run without hardware.
There is no answer from W5100 by SPI, probably 0 is a result of timeout.
P.S. I tried to join Webserver and CardInfo examples, but it takes 106% of global vars memory. Looks like new Ethernet library is too fat in comparison with old version. Finally I wrapped some string constants into F(""), then recompiled. In both cases when SD card initialized before or after Ethernet the result is the same - no answer from W5100 ...