Go Down

Topic: Official Ethernet Shield crashes (Read 2950 times) previous topic - next topic

elQuero

I know that the DHCP can take up to some minutes to respond (fortunately i've done the cisco ccna course around networks bases) and each time I try the sketch I wait 5 minutes. I've also seen that with "ipconfig /renew" new leases are released in a very short time, something like 10 - 15 seconds.

SurferTim

Quote
fortunately i've done the cisco ccna course around networks bases


Good. Then it should not be difficult for you to assign a static ip to the Arduino. You should know all about ips, subnets, gateways, and dns. Once you assign a static ip to the shield, can you ping the Arduino ip from a localnet computer?


SurferTim

OK! Now we are communicating!

It may be a bug in the dhcp routine. Remember, it is brand new.

Does everything you need to work do ok if you use the static ip assignment?

elQuero

#19
Feb 26, 2012, 05:05 pm Last Edit: Feb 26, 2012, 05:11 pm by elQuero Reason: 1
Yes, this is why i think that the problem is the DHCP library!

I think that the only test i could do is to set up a wireshark listener and then check the Arduino DHCP Request packet content, if the arduino sends it. Otherwise the problem isn't the packet but something in preliminar code.

SurferTim

#20
Feb 26, 2012, 05:18 pm Last Edit: Feb 26, 2012, 05:22 pm by SurferTim Reason: 1
That, or check the router log. I don't use Cisco. I use Mikrotik. They both perform about the same functions. You might want to check your router's arp table also. How does it see the Arduino?

edit: Might want to check your dhcp leases also while you are in the router. Did the dhcp server lease your mac address an ip?

elQuero

Well, I have a Dlink SOHO device, and his log is very difficult to understand, so i've setup a test with Wireshark. I've tried to first send an UDP Packet with a fixed IP, and i can see packets in Wireshark. Then i've tryed to test the DHCP procedure and in Wireshark i can't see any DHCP packet.

For be sure i've tryed to listen to another PC and perform a "ipconfig /renew" comand and i've seen some packets.

SurferTim

If it helps, I just tried my Mega2560 and ethernet shield on both a network with a dhcp server, and one without. The response was exactly as I expected on both. The dhcp issue was within a couple seconds. The fail took almost a minute.

elQuero

So i could think that there is a problem in my DHCP server and I should try to set up another server and see if there is a DHCP request?

SurferTim

I don't know. I can't check your router from here.

If the router is a SOHO DLink, then you should be able to see the dhcp settings and leases in "Network Settings" in the router setup. See if your mac address is there.


elQuero

I've already checked that and i've seen that there are all the MAC addresses of my network hosts but not the mac address of Arduino

SurferTim

#26
Feb 26, 2012, 07:52 pm Last Edit: Feb 26, 2012, 11:14 pm by SurferTim Reason: 1
You wrote this in an earlier post:
Quote
I've also experienced a loop in receiving data, because i use the linux compiler (i use lubuntu) for avr. But the ethernet shield begins correctly, that was my problem.


Did you install the "605 Bug" fix for that? I can see where that bug might affect dhcp too.

edit: That bug will affect dhcp and udp. Here is the function that will return the "forever non-zero" value in EthernetUdp.cpp

Code: [Select]
int EthernetUDP::available() {
  return W5100.getRXReceivedSize(_sock);
}


elQuero

Hey, you are right!
The problem was that method in W1500.h. Now the DHCP does it's work correctly.

I think that for next problems i should search in google code arduino account issues before post here.

Thank you for helping, goodBye.

SurferTim

You're welcome.

It isn't your fault. You could have gone to the Arduino code site, and not found that report. It is already marked as "fixed" and "closed". Does it seem like it is fixed to you?

HEY! ARDUINO CREW!! WAKE UP!!

Go Up