NULL reference exception in Netduino.IP.LinkLayers.CC3100

After nearly a year of not touching my Netduino, I saw that the Maple bug that blocked my advancement was fixed.

However today after most of the day I am stumped again… I have downloaded the newest Maple example too as well as my old app that started but died when the HTTP web request happened 2-3 times. It seems that when I get the IP Address I am seeing NULL Reference exception. I hope that someone can help me get past this?

It seems that I get an Exception in ApplianceHost–>Program.cs–>InitializeNetwork() at this line:

_interfaces = NetworkInteraface.GetAllNetworkInterfaces();

Here is the output:

Getting all the network interfaces.
Found Ethernet Interface
MAC Address: 5C-86-4A-01-2D-1D
DHCP enabled: False
Dynamic DNS enabled: False
IP Address: 192.168.1.160
An unhandled exception of type ‘System.NullReferenceException’ occurred in Netduino.IP.LinkLayers.CC3100

Subnet Mask: 255.255.255.0
Gateway: 192.168.1.1
Found Ethernet Interface
Already had IP Address: 192.168.1.160
Uncaught exception
The thread ‘’ (0x4) has exited with code 0 (0x0).
Exception thrown: ‘System.Net.WebException’ in System.Http.dll
An unhandled exception of type ‘System.Net.WebException’ occurred in System.Http.dll

Uncaught exception
The thread ‘’ (0x1) has exited with code 0 (0x0).
Done.
Waiting for debug commands…
The program ‘[12] Micro Framework application: Managed’ has exited with code 0 (0x0).

I’m going to try and reproduce this later today.

Regards,
Mark

Brad,

I’m having problems reproducing this. Any chance you could make your project available somewhere?

Could you also let us know the firmware information from the board. You can get this from MFDeploy. Connect to the device and then select Target -> Device Capabilities. You should see something like this:

HalSystemInfo.halVersion:               4.3.1.0
HalSystemInfo.halVendorInfo:            Netduino 3 Wi-Fi (v4.3.2.2) by Secret Labs LLC

There’s a lot of other information but for this I think we only need the first couple of lines.

Regards,
Mark

Mark

I am using the Connected Coffe Maker example for the ApplicationHost solution at https://github.com/WildernessLabs/Netduino_Samples/tree/master/Connected_CoffeeMaker. If I put a break point on the line _interfaces = NetworkInterface.GetAllNetworkInterfaces(); around line 77 in Program.cs and attempt to step into GetAllNetworkInterfaces() I see the exception but cannot step into the code since I do not have the Micro frame source.

I also attempted to run MFDeploy and do not see a Target -> Device Capabilities. My Netduino is connected and available but …? I am missing something here but I have a bad feeling my Netduino is bad.

I have attempted running everything as the Administrator and not with the same results.

Looking in Add/Remove Programs - its says Netduino SDK v4.3.2 (May 2015) and at the far right is version 4.3.2.1.

I’ll grab the Coffee Maker example and have a look.

The version of MFDeploy I use is found in the .NET Microframework SDK. On my machine the full path is:

C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3

Regards,
Mark

Mark

I think that the recent post has helped in this issue … if you look https://github.com/WildernessLabs/Netduino_SDK/issues/7 - scroll to the bottom of the explanation you will see that it mentions calls that fail. The ApplianceHost project is calling the very last method.

I just got a bright idea that I can try and set everything up on my Mac Mini and attempt to run ApplianceHost there. It might be a good data point.

Here is the output…
Device Capabilities:
HalSystemInfo.halVersion: 4.3.1.0
HalSystemInfo.halVendorInfo: Netduino 3 Wi-Fi (v4.3.2.2) by Secret Labs LLC
HalSystemInfo.oemCode: 34
HalSystemInfo.modelCode: 177
HalSystemInfo.skuCode: 4105
HalSystemInfo.moduleSerialNumber: 00000000000000000000000000000000
HalSystemInfo.systemSerialNumber: 0000000000000000
ClrInfo.clrVersion: 4.3.1.0
ClrInfo.clrVendorInfo: Netduino 3 Wi-Fi (v4.3.2.2) by Secret Labs LLC
ClrInfo.targetFrameworkVersion: 4.3.1.0
SolutionReleaseInfo.solutionVersion: 4.3.2.2
SolutionReleaseInfo.solutionVendorInfo: Netduino 3 Wi-Fi (v4.3.2.2) by Secret Labs LLC
SoftwareVersion.BuildDate: May 14 2015
SoftwareVersion.CompilerVersion: 410894
FloatingPoint: True
SourceLevelDebugging: True
ThreadCreateEx: True
LCD.Width: 0
LCD.Height: 0
LCD.BitsPerPixel: 0
AppDomains: True
ExceptionFilters: True
IncrementalDeployment: True
SoftReboot: False
Profiling: False
ProfilingAllocations: False
ProfilingCalls: False
IsUnknown:

Plug-in–>Debug–>Device Info
HAL build info: 4.3.1.0, Netduino 3 Wi-Fi (v4.3.2.2) by Secret Labs LLC
OEM Product codes (vendor, model, SKU): 34, 177, 4105
Serial Numbers (module, system):
00000000000000000000000000000000
0000000000000000
Solution Build Info: 4.3.2.2, Netduino 3 Wi-Fi (v4.3.2.2) by Secret Labs LLC

One thing I noticed is that you have to Connect to the Netduino first to get output. I also erased the memory and re-deployed. Once I run ApplicanceHost I see network NULL exception.

I could not for the life of me get ApplianceHost running on my Mac - it seems to just hang for a very long time.

Mark

On my drive into work this morning and thinking about this. I kept thinking about the guy having trouble with MFDeploy and part of the Wifi parameters are grayed out. My network has a password and I have a 2.4 and 5 GHz channel. Is it possible that the Exceptions I am seeing is from not having the Wifi channel, user and password? Its could be trying to connect to some unknown Wifi channel.

I am at work now but something to chew on. I’ll try and get home tonight and see how to get the Wifi details section to be available.

I think the CC3100 is 2.4GHz only.

Regards,
Mark

I’ve had a go with the coffee maker example and I get a valid list of interfaces when using a static IP address. One thing I did have to do was slow down the application a little as the board took a little while to actually show that it had connected to the WiFi OK.

Regards,
Mark

Nevyn

After great difficulty I finally got my Netduino to connect to the WiFi. However, once the application starts and I attempt to get the status I get a NULL reference exception. Not sure where to go now exception the Maples source code but hope you have an idea?

The thread ‘’ (0x2) has exited with code 0 (0x0).
Getting all the network interfaces.
Found Ethernet Interface
MAC Address: 5C-86-4A-01-2D-1D
DHCP enabled: True
Dynamic DNS enabled: False
The thread ‘’ (0x4) has exited with code 0 (0x0).
IP Address: 0.0.0.0
Subnet Mask: 0.0.0.0
Gateway: 0.0.0.0
SSID:FBI
Found Ethernet Interface
No IP Address
DHCP is enabled, attempting to get an IP Address
Sleep while obtaining an IP
Sleep while obtaining an IP
Sleep while obtaining an IP
Sleep while obtaining an IP
Sleep while obtaining an IP
Sleep while obtaining an IP
Sleep while obtaining an IP
Sleep while obtaining an IP
Sleep while obtaining an IP
Sleep while obtaining an IP
Got IP Address: 192.168.1.29
this is what we got from http://google.com:

301 Moved

301 Moved

The document has moved here.

Network done.
still alive. 21
still alive. 23
still alive. 26
Received GET /status - Invoking GETstatus
System.NullReferenceException
still alive. 29

Glad to hear you are making some progress.

The Maple source code is available in the Wilderness Labs git repository. I’d try downloading the Maple sources and reference the Maple project in yours. You should be able to trap the exception.

This still the connected coffee code ?

Regards,
Mark

Mark

Yes I had a hell of a time getting the settings correct in MfDeploy so that the CC3100 exception did not happen.

I am going to pull the Source and will look to adding some kind of documentation regarding the MfDeploy settings and WiFi - hopefully this will be my first post.

I’ll try and get to the Maple src this week but hard with work and the wife.

Thank you a lot,
Brad

1 Like

Hey Brad_Patterson,

We just released the beta of Netduino 3 Wifi 4.3.2.4 firmware which has stability fixes. Try it out and let us know how it goes.

Thanks!

1 Like

Guys I grabbed the beta firmware and did some experiments with 2.4/5Ghz networks and it seems that the IP.LinkLayers.CC3100 error comes from an invalid Wifi setting.

Thanks for the help…

1 Like