Netduino 3 Ethernet DHCP Failure

Netduino 3 Ethernet running firmware v4.3.2.3, Netduino SDK v5, NETMF v4.3.2 - QFE2 SDK.

Using the examples (here) and Wireshark the N3E sends a “DHCP Discover” request then it receives back a “DHCP Request” and immediately Visual Studio throws a Argument Out Of Range exception in mscorlib.

Am I missing something or does DHCP not work on the N3E?
As a side note I have also tried

  • firmware v4.2.0.1
  • 3 different versions of MFDeploy
  • Setting the static IP to 0.0.0.0 saving then checking DHCP and saving again in MFDeploy
  • Netduino and NetduinPlus References

My plan is to upgrade 75+ field boxes using NetduinoPlus 1’s to N3E’s if the N3E is DHCP capable.
Any help or guidance would be greatly appreciated.

I haven’t seen this. We recently tested the N3E using this code here, and it picked up an address from the DHCP server no problem.

Is that a first chance exception? If you hit ‘continue’ are you able to continue executing? I do know there are some issues in the network stack on N3E and N3WiFi that we’re currently working on a fix for, but those are to do with StaticIPs and such.

It does appear to be a first chance exception.
The only alteration to the code is to comment out the “Debug.Print(“Sleep while obtaining an IP”);” and add the System.Diagnostics namespace code seen in the pics.

I am unsure on how to further debug the exception in mscorlib. Pointers?
Will also try a consumer router to see if the problem is with linux isc-dhcp-server.

Attached are pics of the logs and such. Attached to the next few posts will be the pics. New users apparently can only attach one pic to a post :grinning: I am using VS2015 but the error also occurs using VS2013.

VS Error



Wireshark Log

ISC-DHCP-Server Log

VS output after clicking continue

Wireshark after clicking continue

DHCP log after clicking continue

VS Deploy Log

More information found. The N3E connected to a consumer router (old dlink ebr-2310) received an address with no issues and received it very fast (~30mS), the isc-dhcp-server has about a ~1 second delay on the response to the dhcp discover. My theory is the slower response by the isc-dhcp-server is causing the N3E to timeout waiting for the response.
This thread is where my theory is coming from. Is there a way to have the N3E be patient waiting for the dhcp server?




The first 3 lines are the dlink router and the second 2 are the isc-dhcp-server

I’d like to try and repro this, we’re actively working on the stack here. Can you tell me what router to get and what version of ICS you’re running on it?

I don’t think there’s a public way to set the timeout there, it’s all internals.

About any basic computer will work as long as it has 2 network ports.
e.g. 2 nics, 1 dual nic, 1 mb port and 1 nic, dual mb ports, 1 usb nic 1 mb nic, etc…

  • Download Ubuntu Server 16 and install with default packages.
  • (optional but suggested) Rename the NIC cards to WAN and LAN. Guide here
  • Follow this to setup as router/dhcp/dns server.
  • (optional) Install Webmin for a web front end.

This is a vary basic router setup for testing purposes, however i would not use it as your main internet router without setting up the firewall.

As a side note, over the years using the NP1 we had customers that had to have a network switch between the NP1 and the wall jack for it to get an IP from their network. Yesterday I was allowed to fire up Wireshark at one such customer’s place and noticed without the switch the NP1 occasionally would act just as the N3E is now. They are running a Cisco router and switch. Now it is possible since the switch is using spanning tree that it is causing the issue due to the delay the switch is causing when the port is activated.
The NP1 seems to be more tolerant of the DHCP response delay than the N3E but i have no facts to base it on.

Thanks. Captured it here for now. I’ll make sure we look at it as part of our current set of network work.

Thank you for adding this to the issue list. I will continue to work on it from my end and post any update i have.