To make it simle, I am trying the small examples for the Ethernet Library, currently the one that make a google search. I have changed it to use fixed ip (10.0.0.9) instead of DHCP.
However, it just says "connection failed" on the serial monitor. What is weird though is that I have actually got a http response twice out of about 100 attempts. I saw the html of the google page.
If it just didn't work at all I would have dismissed it as broken, but obviously not completely.
The following LEDs flash now and then meaning that there is network activity. Tx only flashes just after the sketch has started, probably at the point where it tries to connect to google. COLL is constantly off.
I would very appreciate some tips on how to debug this problem.
Here is a couple of questions:
I am using the shield on a Duemilanove which is quite old, is that a problem?
I am running Linux. Can I use some command to see if there is activity from the shield? (I couldn't see anything with Wireshark).
To make it simle, I am trying the small examples for the Ethernet Library, currently the one that make a google search. I have changed it to use fixed ip (10.0.0.9) instead of DHCP.
Are you sure that is your network setting? These are what it will use:
IP = 10.0.0.9
subnet = 255.255.255.0
gateway = 10.0.0.1
dns server = 10.0.0.1
Can you configure the router to tell it that the Arduino exists, at a specific IP address that it is not to use for any other device on the network?
the weird thing is that I actually twice did get a succesful connection out of now perhaps 200 attemtps.
If some device was connected that was assigned 10.0.0.9 by the router, and then that device was disconnected, the router would then route requests to/from the Arduino correctly for a while.
The router has to understand about the Arduino so that it can route packets to it, including ping requests. The Arduino won't be able to connect until the router knows it exists, and that it should accept packets from it and route packets to it.
I have tried to assign 10.0.0.15 which is not in use to the current MAC address of the Arduino to no avail. I also tried changing the MAC address to the same value as my PC but there was no light in the COLL lamp.
I did something else for a test. I connected the shield directly to the LAN connector on my PC. It still didn't work but at least my PC sees that it is connected to a network. If I unplug it, the notification icon in the tray will show that it is not connected.
Is there are any command I can run on the Linux box to check if the specific MAC address is present on the network?
I also tried changing the MAC address to the same value as my PC but there was no light in the COLL lamp.
Never do that. It will cause a fail. Like ip addresses, the mac addresses on the localnet must be unique. Otherwise it will not be able to connect to anything.
SurferTim:
Never do that. It will cause a fail. Like ip addresses, the mac addresses on the localnet must be unique. Otherwise it will not be able to connect to anything.
Sure, but you didn't get the point! I deliberately assigned the same mac address and would have expected the collision warning lamp to light up. It didn't, which tells me "something is rotten"
Do you have a microSD card in the SD slot on the shield? If so, remove it and test it again. You might need to power down the Arduino for a few seconds to clear any faulty settings from the devices.
Here is my test. Upload this code. If the serial monitor shows 192.168.2.2, then you are ok on the SPI and the Arduino end of the w5100. If it returns anything else, like 0.0.0.0, then it failed.