Best Answer StefanUSMC, 26 January 2013 - 02:45 PM
I'd try turning on the router and letting it start up to the point where it can give out IP addresses.
Definitely.
When I use DHCP, I typically include something like:
public static Microsoft.SPOT.Net.NetworkInformation.NetworkInterface NetInterface = Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0];public static void ObtainDHCP() { NetInterface.EnableDhcp(); Thread.Sleep(3000); if (NetInterface.IPAddress == "0.0.0.0") { Debug.Print("Waiting on DHCP..."); Thread.Sleep(3000); } if (NetInterface.IPAddress == "0.0.0.0") { Debug.Print("ERROR: Unable to obtain IP"); } Globals.NIC_IP = NetInterface.IPAddress; Debug.Print("IP - " + Globals.NIC_IP); }
This allows a wait time for the ND to grab an IP, and reports an error if the IP is still invalid.
Good Luck,
Brandon
Go to the full post