Netduino Wifi CC3100SimpleLinkException

I have a Netduino 3 Wifi and I can’t get a IP-address. In MFDeploy I have configured the device with DHCP and after start the Wifi-LED goes from yellow to green.
In my router I can see the device and his ip-address and I can ping it. But in my program I use the loop with IPAddress.GetDefaultLocalAddress() and it displays 0.0.0.0 every time. I often get an exception: Netduino.IP.LinkLayers.CC3100SimpleLinkException.
I also use the ‘Web Request’ -sample ('https://github.com/WildernessLabs/Netduino_Samples/tree/master/WebRequest) on Github with the same result.

With static ip-address my program works. But here I have also a problem with this exception: When the Wifi-connection breaks and the device can’t establish a connection to the network I get this exception. This is very annoying because I can’t catch it with try … catch and so the device goes into nirwana. After the watchdog timeout it starts at the begin.

In the web I can’t find any help to this topic. So I hope for the community!

regards

Uwe

Try a 3 second delay before using the cc3100. The delay worked for me.

Hello David,
I tried this but witout success.
This is my short program:

public static void Main()
{
Thread.Sleep(4000);
while (IPAddress.GetDefaultLocalAddress() == IPAddress.Any)
{
Debug.Print("Sleep while obtaining an IP: " + IPAddress.GetDefaultLocalAddress());
Thread.Sleep(1000);
};
Debug.Print(“IP-Adr=” + IPAddress.GetDefaultLocalAddress());
Thread.Sleep(Timeout.Infinite);
}

In the debug-windows I see this (in german):

Eine Ausnahme (erste Chance) des Typs “Netduino.IP.LinkLayers.CC3100SimpleLinkException” ist in Netduino.IP.LinkLayers.CC3100 aufgetreten.
Eine Ausnahme (erste Chance) des Typs “Netduino.IP.LinkLayers.CC3100SimpleLinkException” ist in Netduino.IP.LinkLayers.CC3100 aufgetreten.
Eine Ausnahme (erste Chance) des Typs “Netduino.IP.LinkLayers.CC3100SimpleLinkException” ist in Netduino.IP.LinkLayers.CC3100 aufgetreten.
Eine Ausnahme (erste Chance) des Typs “Netduino.IP.LinkLayers.CC3100SimpleLinkException” ist in Netduino.IP.LinkLayers.CC3100 aufgetreten.
Sleep while obtaining an IP: 0.0.0.0

I use .NETMF 4.3 and the newest update of the board: Netduino3Wifi_4_3_2_2

regards

Uwe

Good Morning,

I just looked at my notes from an application that works.

  1. Need at least a three second delay

  2. Required a reference to NetduinoExtentions.dll (and standard Netduino references)

  3. To check the IP Address in VB use this:

Dim IPAddress As String = Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()(0).IPAddress.ToString()

Debug.Print(IPAddress)

Hello David,
thank you but I have no success: IPAddress is 0.0.0.0

perhaps this helps:

On _ipAddress ist a number but IPAddress is 0.0.0.0 and Gatewayaddress brings an exception. Perhaps a problem with the router? But there a some devices connected and they work fine.