Pages: 1 [2]   Go Down
Author Topic: Official Ethernet Shield crashes  (Read 2098 times)
0 Members and 1 Guest are viewing this topic.
Montemarciano, Ancona, Italia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 116
Posts: 5400
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Montemarciano, Ancona, Italia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes...
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 116
Posts: 5400
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Montemarciano, Ancona, Italia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: February 26, 2012, 11:11:09 am by elQuero » Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 116
Posts: 5400
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: February 26, 2012, 11:22:08 am by SurferTim » Logged

Montemarciano, Ancona, Italia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 116
Posts: 5400
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Montemarciano, Ancona, Italia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 116
Posts: 5400
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Montemarciano, Ancona, Italia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 116
Posts: 5400
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
int EthernetUDP::available() {
  return W5100.getRXReceivedSize(_sock);
}
« Last Edit: February 26, 2012, 05:14:46 pm by SurferTim » Logged

Montemarciano, Ancona, Italia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 116
Posts: 5400
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!!
Logged

Pages: 1 [2]   Go Up
Jump to: