I am having trouble getting an ip address on my netduino plus 2.
Blinky works great, so I am connectd.
The ethernet cable connected to my router has proven itself on another computer.
I am using Netmf 4.3.1, visual studio 13.
Thanks for any help.
Terrence
Here is the code.
public static void Main()
{
byte[] MAC = { 0x5C, 0x86, 0x4A, 0x00, 0xF2, 0x15 };
NetworkInterface nic = NetworkInterface.GetAllNetworkInterfaces()[0];
nic.EnableDhcp();
nic.PhysicalAddress = MAC;
Debug.Print(Network.GetNicStatus(nic));
int i = 0;
while (true)
{
nic = NetworkInterface.GetAllNetworkInterfaces()[0];
if (nic.IPAddress != "0.0.0.0")
break;
Debug.Print("Waiting for an IP Address..." + i++.ToString());
Thread.Sleep(2000);
Debug.Print(Network.GetNicStatus(nic));
}
}
–can’t seem to find the help section on how to post code in the forums?–