Open GoogleCodeExporter opened 9 years ago
If there is a way of getting some knowledge about the state of the physical
layer, implementing a release/renew sequence won't be that hard.
It can be done with a Ethernet.begin(mac) or a fairly small change of the DHCP
library.
But we need to find out whether we can detect the link state change at all.
If there isn't a way of detecting the change we have to thing about a
workaround and I can immediately think of two possible ways.
A) Do a renew once every other loop or something, just in case.
B) Ignore the issue since it wont happen that often.
For the moment I'm leaning towards plan B but lets check out if the change can
be detected first.
Original comment by pe...@birchroad.net
on 11 Mar 2012 at 4:17
When your router/dhcpd reboots every client should call back the dhcpd with a
renew request, if the clients have a previous assigned IP address then it will
also inform the dhcpd server it's preferred IP address (being the previous
assigned one). Then the dhcpd will ACK the requested IP address or give a new
one, either way marking the IP address as used on it's internal tables.
When the router reboots and all the clients do not call back then the dhcpd
will not be aware of the used IP address by arduino, if we're talking about a
crappy dhcpd implementation then it could assign that IP address to another
client causing both clients to loose connectivity.
Original comment by jbrazio
on 11 Mar 2012 at 6:29
I've been reading the W5100 datasheet v1.2.2 and I couldn't find any reference
to a link status change interrupt.
Original comment by jbrazio
on 11 Mar 2012 at 7:56
I've been looking for a way to work to work out the link status too, and
according to the link below, there is no register corresponding to the link
status. Seems like a bit of an oversight to me, especially as there is a link
LED...
A reasonable hack would be to connect the link LED to a GPIO pin. Perhaps newer
shields should link the LED pin on the chip to an Arduino GPIO pin via a solder
bridge? As the default DHCP timeout is 60 seconds, it means there has to be a
blocking 60 second delay each time the Arduino tries to get a DHCP address when
the link is down, which is pretty poor.
http://www.wiznettech.com/Sub_Modules/en/technical/Q_A_View.asp?boardcd=101&SF_A
O=And&PK_NUM=20510&page=1&SF_Part=writer,%20subject,%20contents&SF_KeyWord=link%
20state%20physical&SF_AO=And
Original comment by elija...@mac.com
on 3 Jun 2013 at 4:59
Original issue reported on code.google.com by
adrian.m...@gmail.com
on 11 Mar 2012 at 2:18