Problems with Ethernet Shield (no IP)

Hi,

I just bought the official ethernet shield, and plugged it into my 2009.

I opened the router control panel, assigned a fixed IP (according to my network), using the mac address provided in the examples. I rebooted the router.

Il tried to plug the ethernet cable before running the sketches, and also after. I also tried several arduino resets and router reboots.

Just to summarize: nothing works :frowning:

When I plug the net cable the green communication led lights up, and remains so. The amber makes several blinks, and then dies.

If I ping the arduino it doesn't answer BUT when I ping anything (the arduino itself or a random IP) the amber led blinks several times (then dies again). So the packets reach the arduino.

the network config is typical:

subnet mask 255.255.255.0
gateway 192.168.1.1

My PC (in wireless) is assigned a static ip adress (192.168.1.4), so I can easily port forward for Emule.

The weird thing is that in the client list I cannot see the MAC address of the arduino, nor the address of my pc (wireless). I mean, the IP address are in the list, but the MAC field is empty. But if I plug my ethernet cable from the router to the PC, and assing that connection a fixed IP (192.168.1.3), the MAC address shows up correctly in the client list.

The router is a DLINK DSL G624T.

Any help would be appreciated...please...I'm lost :frowning:

Hi,

I tried to put the arduino in DMZ.

Then I installed wireshark.

I see packets from the router asking "who is 192.168.1.100" in broadcast, but nothing answers. The router is also unable to know which MAC address that ip has, given that it shows "00.00.00.00.00". I don't know if this is normal for every packet sent broadcast...I'm not a network expert...

Sorry I forgot to mention the version: it's 0017.

Running on Vista (also tried to disable firewall).

What code are you running on the Arduino? Did you set your IP properly in code before you uploaded it to the board?

Hi Digger,

I'm trying to run the 3 examples provided with the environment.

Before uploading to the arduino I properly assign an IP according to my network configuration (192.168.1.100). I do not change netmask and gateway as the default values are ok.

I also tried to connect it to the PC directly (beforhand I assing to the LAN configuration of the PC a static IP).

I also tried to enter my router's console via putty, to ping directy the arduino from the router (not from my PC). It didn't work either :frowning:

I've noticed that 2 couples of the network SM IC are soldered together (precisely Vddpl and Vddpx are soldered together, then also Vsspl and Vssosc). Is it correct or maybe it's a soldering issue?

Many tnx!

Hey, I figured out that I've got the ethernet shield v1.1, does this mean that I have to change the ethernet library?

I just figured out that the "official" shield uses pins 10, 11, 12 and 13, while mine uses the same pins PLUS pin 2...

What shield exactly do you have? Is it based on the Wiznet W5100 chip? If it's not, it won't work with the official ethernet library.

Hi, it is based on the enc28j60 ethernet controller from Microchip.

Do you know which library should I use? I've also asked the vendor (in paraller :wink: ).

Hi Sergio,

I have used a version of the ENC28J60 ethernet shield for a while now. Got 4 of them in fact! I've created an updated library that should in theory work with your ethernet shield as it seems to have the same pins used (basically SPI and pin 2 for interrupt, which doesnt seem to be used in the library).

Have a look at this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1252250616/5 as this has similar question and links to my updated library.

I am currently using it via Arduino IDE 0017 to tweet and update pachube feeds from a pair of Arduino that are monitoring temp/humidity/light in my house. Plus another that acts as a clock using network time protocol.

Hope this helps

Andy

Tnx!!! Now it works!

Just a little issue, in your example of the twitter client I cannot compile.

It says:
In function 'int8_t analyse_get_url(char*)':
error: 'class EtherShield' has no member named 'ES_find_key_val' In function 'void loop()':

Any clue?

Ok, I saw your answer in the other topic. Now it compiles, but still I cannot see any tweet msg.

I'll debug deeper to understand tweets messages cannot leave my network, in spite of the gateway correctly configured.

Update on the topic: no news:(

The server works in the local network, but it cannot tweet (nor it can be accessed from outside).

Let's solve one problem at a time, the tweeter client: I changed the gateway and the IP according to my net. The board can be pinged and the webserver works (locally). I added a serial print after the tweet try: it reaches that part of code (every time I press the button).
I set up a sniffer, and no packets leaves the arduino in that moment. I can easily see the webserver and the ping packets, but when it comes to tweeting, no packets :frowning:

I encoded tweeter username and password following the rules (anyway the problem is not there, as no packets leave the board)...

Any hints?

ok, I discovered that the sniffer cannot detect packets between the arduino and the router...I should add a hub...

anyway, now it works BUT only in DMZ :frowning:

The server side could remain inside, but when I need a client, such as in this case, it must be in dmz, otherwise it cannot properly recognize the gateway (perhaps...).

If you've got any suggestions...here I am:)

tnx!

Mmmm.... looks like a port forwarding issue more than a gateway problem.

Are you sure you properly configured NAT on your router?
DMZ is a "black hole" where your router sends all incoming traffic which was not handled by the NAT rules.
Looks like your router is not correctly handling packets required by your application, so that they are conseguently routed towards DMZ.

Just my 2 cents...

Max

Tnx Max for your msg!

I thought the same, but I have no way to verify it.

The only thing that I know is that I can properly redirect ports for Emule, so the procedure is clear and it's working.

Btw, the problem appears not only when I try to access the arduino working as a server (where port forwarding is involved), but also when publishin msg in twitter. When arduino is working as a client, port forwarding is irrelevant: the client starts a connection. But the problem in my opinion is that the client cannot "see" the world outside.

Any other hint is more than welcome!