Montemarciano, Ancona, Italia
Offline
Newbie
Karma: 0
Posts: 33
|
 |
« Reply #15 on: February 26, 2012, 10:52:31 am » |
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
Online
Faraday Member
Karma: 60
Posts: 3547
|
 |
« Reply #16 on: February 26, 2012, 10:59:04 am » |
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
Newbie
Karma: 0
Posts: 33
|
 |
« Reply #17 on: February 26, 2012, 11:00:12 am » |
Yes...
|
|
|
|
|
Logged
|
|
|
|
|
Miramar Beach, Florida
Online
Faraday Member
Karma: 60
Posts: 3547
|
 |
« Reply #18 on: February 26, 2012, 11:03:34 am » |
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
Newbie
Karma: 0
Posts: 33
|
 |
« Reply #19 on: February 26, 2012, 11:05:26 am » |
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
Online
Faraday Member
Karma: 60
Posts: 3547
|
 |
« Reply #20 on: February 26, 2012, 11:18:41 am » |
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
Newbie
Karma: 0
Posts: 33
|
 |
« Reply #21 on: February 26, 2012, 12:45:41 pm » |
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
Online
Faraday Member
Karma: 60
Posts: 3547
|
 |
« Reply #22 on: February 26, 2012, 12:52:23 pm » |
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
Newbie
Karma: 0
Posts: 33
|
 |
« Reply #23 on: February 26, 2012, 12:57:25 pm » |
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
Online
Faraday Member
Karma: 60
Posts: 3547
|
 |
« Reply #24 on: February 26, 2012, 01:02:07 pm » |
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
Newbie
Karma: 0
Posts: 33
|
 |
« Reply #25 on: February 26, 2012, 01:09:25 pm » |
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
Online
Faraday Member
Karma: 60
Posts: 3547
|
 |
« Reply #26 on: February 26, 2012, 01:52:20 pm » |
You wrote this in an earlier post: 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 int EthernetUDP::available() { return W5100.getRXReceivedSize(_sock); }
|
|
|
|
« Last Edit: February 26, 2012, 05:14:46 pm by SurferTim »
|
Logged
|
|
|
|
|
Montemarciano, Ancona, Italia
Offline
Newbie
Karma: 0
Posts: 33
|
 |
« Reply #27 on: February 27, 2012, 08:25:14 am » |
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
Online
Faraday Member
Karma: 60
Posts: 3547
|
 |
« Reply #28 on: February 27, 2012, 08:29:24 am » |
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
|
|
|
|
|
|