You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is Issue 985 moved from a Google Code project.
Added by 2012-07-16T13:09:48.000Z by mik...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Defect, Priority-Medium, Component-Ethernet
Original description
What steps will reproduce the problem?
Ethernet shield + DHCP. If the DHCP server gives you lease with "infinite" lease time (0xFFFFFFFF) the method calculating rebind time (_dhcpT2 = _dhcpT1 << 1;) gives you wrong time forcing Ethernet.maintain() to rebind every time it's called.
What is the expected output? What do you see instead?
PROBLEM ROW #104:_dhcpT2 = _dhcpT1 << 1;
I'm expecting positive integer but I'm seeing -2. Calculation method gives 2147483647 for renew timer(_dhcpT1) and -2 for rebind timer(_dhcpT2). Ethernet.maintain() sees this like it would be always 2 seconds "late" and forces it to rebind. This creates huge amount of traffic inside LAN as DHCP uses broadcast messages for request etc.
If I'm correct the calculation method should be something else for example the one I used in my scenario (see below).
What version of the Arduino software are you using? On what operating system? Which Arduino board are you using?
IDE 1.0.1, Windows 7 SP1, Arduino Mega2560+ Ethernet shield with SD
Please provide any additional information below.
In my own scenario I fixed the problem by changing the row used to calculate rebind time to not use bitwise left shift. Instead the row is now like this: "_dhcpT2 = _dhcpLeaseTime*7/8;".
The text was updated successfully, but these errors were encountered:
This is Issue 985 moved from a Google Code project.
Added by 2012-07-16T13:09:48.000Z by mik...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Defect, Priority-Medium, Component-Ethernet
Original description
What steps will reproduce the problem?
Ethernet shield + DHCP. If the DHCP server gives you lease with "infinite" lease time (0xFFFFFFFF) the method calculating rebind time (_dhcpT2 = _dhcpT1 << 1;) gives you wrong time forcing Ethernet.maintain() to rebind every time it's called.
What is the expected output? What do you see instead?
PROBLEM ROW #104:_dhcpT2 = _dhcpT1 << 1;
I'm expecting positive integer but I'm seeing -2. Calculation method gives 2147483647 for renew timer(_dhcpT1) and -2 for rebind timer(_dhcpT2). Ethernet.maintain() sees this like it would be always 2 seconds "late" and forces it to rebind. This creates huge amount of traffic inside LAN as DHCP uses broadcast messages for request etc.
If I'm correct the calculation method should be something else for example the one I used in my scenario (see below).
What version of the Arduino software are you using? On what operating
system? Which Arduino board are you using?
IDE 1.0.1, Windows 7 SP1, Arduino Mega2560+ Ethernet shield with SD
Please provide any additional information below.
In my own scenario I fixed the problem by changing the row used to calculate rebind time to not use bitwise left shift. Instead the row is now like this: "_dhcpT2 = _dhcpLeaseTime*7/8;".
The text was updated successfully, but these errors were encountered: