WIZnet.W5500 and DHCP

Hi to all,
I am using FEZ Feather with a WizNet W5500 module, in static IP and the only example in documentation everything works.
If I enable DHCP I don’t get the address.
Looking at the driver it uses the BasicNet library.
Is there an example of how to use DHCP with the W5500?
Something is missing in the example and it is not enough to enable the setting to make it work?
Thank you all

Your FEZ Feather has full networking support that is built in. Use enc28j60 module for Ethernet

Wiznet works, but you will lose on a lot of awesome things!! You can get those modules for a couple dollars.

As for DHCP on wiznet, if I can’t remember if this chip did DHCP internally or the stack did the work. Either way, the entire source code is provided if you want to dig further.

Hi Gus, is there any example that shows how to do this with Feather and enc28j60? A quick search on Google brings up nothing.

Which things would that be, for example?

Performance with the ENC and native code stack will be orders of magnitude better, plus you won’t lose your own program space to all the code needed to support Wiz in managed code. And the native code for ENC is always there in firmware, so might as well use that instead of eating up more of your program space. There are also a bunch of security wins when using the GHI native code (no cleartext over SPI, better TLS support, etc).

GHI also tests and supports their work much better than I can support the serial interface drivers using my ‘spare time’.

Serial network interfaces are sometimes a necessary choice, but I would not make that choice if I had an option to use the native stack and supported hardware.

FEZ feather is a sitcore device. The enc example on docs work for all devices, including feather.

1 Like

I confirm what has been said about performance and safety with ENC28J.
Using the BasicNet library and the W5500 is just a curiosity of mine … and I have a couple of unused modules. Now I try to investigate by recompiling the library sources to understand the missing link between the TinyCLR.Drivers.BasicNet DHCPClient and the TinyCLR.Drivers.WIZnet.W5500 library but first warning it seems that the socket assignment for UDP is missing. Strange, however, no exceptions are generated

The only positive side of the library I think is just the possibility of future modification and adjustments … at the expense of performance and deadlock if you plan to use more than one socket at a time.

In case anyone is reading this and need to understand the difference: BasicNet library is “basic” by definition but it is all C# and works on any device, even SC13. Meaning you can have 6 interfaces if you really need! It is awesome in its own way but to get the commercial grade networking support, which is secure and tested/used by everyone, you need the built in native networking support with TLS which works with Ethernet, wifi and mobile.

1 Like