Dear all
If you've called setup on EthernetNetIf and had a failure (eg. cable not connected or DHCP not ready), you'll have found that you couldn't call setup again in a loop until success; it would just lock up on the second attempt.
This meant that on setup failure you would have no choice but to reset the mbed - not very desirable IMO.
I've debugged the code and think I've fixed it - it's a problem in lwip where the timer list (not even fully used) is not initialised properly. I've also modified the setup method to clean up if already called previously. With the new code, repeated failed calls to setup don't seem to cause a memory leak on the main memory (tested using AvailableMemory function).
I'll update the library here soon, I'm also going to add access to the mac address of the ethernet interface in use.
If anybody has got any other useful fixes to Donatien's stack then please let me know. I've already added ability to set hostname under DHCP, fixed a bug in NTPClient, and added proper URL decoding to the RPCHandler of HTTPServer - and most importantly utilised the AHBSRAM1 memory bank rather than main memory for the lwip memory pools.
Saludos
Dear all
If you've called setup on EthernetNetIf and had a failure (eg. cable not connected or DHCP not ready), you'll have found that you couldn't call setup again in a loop until success; it would just lock up on the second attempt.
This meant that on setup failure you would have no choice but to reset the mbed - not very desirable IMO.
I've debugged the code and think I've fixed it - it's a problem in lwip where the timer list (not even fully used) is not initialised properly. I've also modified the setup method to clean up if already called previously. With the new code, repeated failed calls to setup don't seem to cause a memory leak on the main memory (tested using AvailableMemory function).
I'll update the library here soon, I'm also going to add access to the mac address of the ethernet interface in use.
If anybody has got any other useful fixes to Donatien's stack then please let me know. I've already added ability to set hostname under DHCP, fixed a bug in NTPClient, and added proper URL decoding to the RPCHandler of HTTPServer - and most importantly utilised the AHBSRAM1 memory bank rather than main memory for the lwip memory pools.
Saludos