Hi,
I’d like to show you the issue that I got when I try to retrieve IP Address via DHCP using the ENC28J60 module.
I’d like to point out that when I set Static IP I didn’t have issues.
But when I call the function “EnableDhcp()” in about 3-4 minutes my DHCP server dies because the ENC28J60 module continues to ask an IP Address, receive a valid IP Address from DHCP server and then releases it (without a valid reason). After that the ENC28J60 module restarts to ask another IP Address and so on… After few minutes the DHCP server has no more free IP Addresses and the LAN become locked.
Another thing… Why I say that the problem is in the ENC28J60 module?? Because I have this issue only using FEZ Cobra 2 Net and FEZ Cerberus and, both mainboards, uses the ENC28J60 module. When I use FEZ Spider (that uses J11D module) the DHCP works properly.
Is this a new issue or is a known issue?
Any ideas?
@ RobvanSchelven - I set mac address with FEZ Config just after I bought the mainboard, never more.
This is a simple VS2012 gadgeteer project that shows the code I wrote: http://speedy.sh/cHJFs/GadgeteerAppEthFezCobra2Test.zip
Can you also tell us what device is handing out DHCP addresses? Is this your home router, and if so what brand and model is it? Do you have netmon/wireshark that you could capture the dhcp requests and responses ?
Could be other problem, but …
DHCP requires a MAC to assign an IP.
Just for fun, set the MAC (Eth1.NetworkInterface.PhysicalAddress) before starting.
There was a thread or two about the config program not doing this correctly.