Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

HiredMind

Member Since 24 Jan 2013
Offline Last Active Dec 24 2016 12:42 AM
-----

#65288 Exception when the MFWsStack assembly is referenced

Posted by HiredMind on 01 July 2016 - 05:01 AM

Hi all,

 

I'm getting a NullReference exception in Netduino.IP.LinkLayers.CC3100 when I reference the MFWsStack assembly.  It always happens twice upon power up, and prevents the Wifi from connecting. When I remove the reference and dependent code, it powers up and connects to the WiFi just fine (even have a little web server running on it).  Also tried commenting out all of my code and just inserting Thread.Sleep(Timeout.Infinite) in he Main() method, and with MFWsStack referenced it still does it.

 

There are also some first-chance exceptions of type CC3100SimpleLinkException being thrown:

Exception thrown: 'Netduino.IP.LinkLayers.CC3100SimpleLinkException' in Netduino.IP.LinkLayers.CC3100
Exception thrown: 'Netduino.IP.LinkLayers.CC3100SimpleLinkException' in Netduino.IP.LinkLayers.CC3100
The thread '<No Name>' (0x2) has exited with code 0 (0x0).
The thread '<No Name>' (0x4) has exited with code 0 (0x0).
Exception thrown: 'Netduino.IP.LinkLayers.CC3100SimpleLinkException' in Netduino.IP.LinkLayers.CC3100
Exception thrown: 'System.NullReferenceException' in Netduino.IP.LinkLayers.CC3100
An unhandled exception of type 'System.NullReferenceException' occurred in Netduino.IP.LinkLayers.CC3100

Any help appreciated.

 

 

 

Here's the output of MFDeploy->Debug->Device Info (AlarmMonitor, and BlinkStateLib are my project assemblies)

DeviceInfo:
  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
  AppDomains:
    default, id=1
  Assemblies:
    mscorlib,4.3.1.0
    Microsoft.SPOT.Native,4.3.1.0
    Microsoft.SPOT.Hardware,4.3.1.0
    Microsoft.SPOT.Net,4.3.1.0
    Microsoft.SPOT.Net.Security,4.3.1.0
    System,4.3.1.0
    System.Net.Security,4.3.1.0
    Microsoft.SPOT.Hardware.SerialPort,4.3.1.0
    Microsoft.SPOT.IO,4.3.1.0
    System.IO,4.3.1.0
    Microsoft.SPOT.Hardware.PWM,4.3.1.0
    Microsoft.SPOT.Hardware.Usb,4.3.1.0
    Netduino.IP,1.0.0.0
    Netduino.IP.Interop,1.0.0.0
    Netduino.IP.LinkLayers.CC3100,1.0.0.0
    SecretLabs.NETMF.Diagnostics,4.3.1.0
    GoBus,1.5.0.0
    SecretLabs.NETMF.Hardware.Netduino,4.3.1.0
    Microsoft.SPOT.Hardware.OneWire,4.3.1.0
    AlarmMonitor,1.0.0.0
    System.Http,4.3.1.0
    MFWsStack,4.3.1.0
    NetduinoExtensions,4.3.2.1
    MFDpwsExtensions,4.3.1.0
    BlinkStateLib,1.0.0.0
    System.Xml,4.3.1.0



#44674 Netduino hardware abstraction library

Posted by HiredMind on 31 January 2013 - 04:32 PM

You will be amazed what input a simple press on a button can give you on an IO pin, and you will be amazed how hard it is to update a display while at the same time sampling data from that "simple" switch.

 

With multi-threading this is trivial. That's why a chose a Netduino.  :)




#44629 SQLite

Posted by HiredMind on 30 January 2013 - 06:59 PM

So how about this: could I run Puppy Linux (http://puppylinux.org) headless on the microSD card, along with a LAMP stack and then somehow query the LAMP stack from the Netduino using C# code? I'm thinking of having the Netduino make a port 80 request to a php page running on the Apache web server on the Linux install, querying the MySQL database via php and then returning the results as a string to the Netduino. Posted Image If anyone knows how to do this or thinks it would work, please let me know.

 

I think you're over-complicating things.  If I understand correctly, you're talking about 5 levels of abstraction above.  What's your end goal?  If you lay out your project end-to-end here, we might be able to find a simple way to do it. 

 

What kind of data are you storing?

How often does it change?

How relational is it?

 

You might be able to use XML serialization or something, depending on the answers to these questions.




#44605 Finding all Netduino Plus(s) on a network

Posted by HiredMind on 30 January 2013 - 07:33 AM

Hi Dave -

 

I got curious about NetMF networking capabilities so I adapted some code to do UDP broadcast ping/response from an old library I wrote.  A solution is attached. Very little error checking and such.

 

It sends out a single packet to call, and a single packet for each response.  I believe that the ARP list would also be repopulated during this process as well - and only for the Netduino IPs - but I haven't fired up Ethereal to test that hypothesis.

 

A ping sweep sends out a packet for each IP address on the subnet, and one for each response, even the negative ones. Note that responses can come from routers too ("host unreachable", "no route to host", etc).  So, worst-case, for a class B subnet, that's 131,070 packets, plus all the ARP overhead at the Ethernet level.

Attached Files

  • Attached File  Udp.zip   9.12KB   11 downloads



#44400 Netduino hardware abstraction library

Posted by HiredMind on 28 January 2013 - 05:00 PM

Hi Kevin,

 

Like you I'm also a developer on the PC side, and getting my feet wet in NetMF. I would definitely advocate an OOP approach to programming on the Netduino. 

 

But sometimes you have to cut corners and go "old school", making your code look more like C++, due to the devices smaller size and smaller feature set.  I love having advanced features like generics, IOC Containers, lambdas, linq-to-entities, etc, but all of that adds to your memory footprint. 

 

On the full version of .Net, I tend to have zillions of extremely simple classes with lots of inheritance, so I can put them together like a puzzle depending on the needs of the project.  But each class adds a bit of overhead.  So in NetMF my classes tend to be a bit fatter, and there are fewer of them. You have to balance that, of course, against modularity: you get the same benefit from breaking up tasks into different assemblies on NetMF as in full .NET.


  • CW2 likes this


#44201 Finding all Netduino Plus(s) on a network

Posted by HiredMind on 26 January 2013 - 12:15 AM

You could use a UDP broadcast to do this.  You send out a UDP packet to a special address that indicates the entire subnet (e.g. 192.168.1.255), and your Netduinos would respond to it.  I don't remember what to set the netmask to, but there are bound to be tutorials galore out there, as the technique is older than I am  :lol:




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.