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.

cSharper's Content

There have been 13 items by cSharper (Search limited from 20-April 23)


By content type

See this member's

Sort by                Order  

#63984 Noob System.NotSupportedException

Posted by cSharper on 26 August 2015 - 01:50 PM in Visual Basic Support

I think you still may not have the correct firmware. Mine is 4.3.2.1 like the link I posted above.

HalSystemInfo.halVersion:               4.3.1.0
HalSystemInfo.halVendorInfo:            Netduino Plus 2 (v4.3.2.1) by Secret Labs LLC
HalSystemInfo.oemCode:                  34
HalSystemInfo.modelCode:                177
HalSystemInfo.skuCode:                  4102
HalSystemInfo.moduleSerialNumber:       00000000000000000000000000000000
HalSystemInfo.systemSerialNumber:       0000000000000000
ClrInfo.clrVersion:                     4.3.1.0
ClrInfo.clrVendorInfo:                  Netduino Plus 2 (v4.3.2.1) by Secret Labs LLC
ClrInfo.targetFrameworkVersion:         4.3.1.0
SolutionReleaseInfo.solutionVersion:    4.3.2.1
SolutionReleaseInfo.solutionVendorInfo: Netduino Plus 2 (v4.3.2.1) by Secret Labs LLC
SoftwareVersion.BuildDate:              May  7 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:                              False



#63925 Problem Detect the presence of SD in Netduino Plus

Posted by cSharper on 18 August 2015 - 04:14 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi all,

 

I know this thread is old, but is there an updated way to perform this exact task?

Right now when I run the sample program given, I get this error:

Inserted
A first chance exception of type 'System.IO.IOException' occurred in Microsoft.SPOT.IO.dll
An unhandled exception of type 'System.IO.IOException' occurred in Microsoft.SPOT.IO.dll


 Uncaught exception 
Ejected
Inserted
Inserted



#63916 Why do I have to reboot my device to change the IP address?

Posted by cSharper on 17 August 2015 - 12:41 PM in Netduino Plus 2 (and Netduino Plus 1)

Chris,

 

Thank you for your reply, and I am looking forward to those updates in the near future!




#63735 Noob System.NotSupportedException

Posted by cSharper on 31 July 2015 - 06:54 PM in Visual Basic Support

I had this exact same issue, and I just uninstalled the SDK's, & .NetMF and followed his instructions here to reinstall-> http://forums.netdui...-v432-update-1/

 

I think I originally had the wrong firmware installed, because I just installed whatever was posted on the main website under downloads




#63734 Sd Card read issues

Posted by cSharper on 31 July 2015 - 06:49 PM in Netduino Plus 2 (and Netduino Plus 1)

This is how I read from my SD card:
 

        public string GetFileFromSD(string FilePath) {
            var line = "";
            using (FileStream fs2 = new FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.None)) {
                using (StreamReader sr = new StreamReader(fs2)) {

                    Debug.Print(line);
                    line = sr.ReadToEnd();
                }
            }
            return line;
        }



#63733 SD Memory issue when writing

Posted by cSharper on 31 July 2015 - 06:46 PM in Netduino Plus 2 (and Netduino Plus 1)

FYI: I finally figured out the answer after days of trial and error:

VolumeInfo.GetVolumes()[0].FlushAll();

Yup that's all you have to do. Not sure why it works




#63731 Why do I have to reboot my device to change the IP address?

Posted by cSharper on 31 July 2015 - 06:44 PM in Netduino Plus 2 (and Netduino Plus 1)

So I was able to a write code that gets my IP address from a file and changes it on initialization.

// Get and Update properties from those in the file on the SD
sd.GetAddressesFromFile();
var interf = NetworkInterface.GetAllNetworkInterfaces()[0];
interf.EnableStaticIP(sd.IP, sd.SubnetMask, sd.DefaultGateway);
//Debug print our IP address
Debug.Print(Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].IPAddress);

And that works great. However when I send a request from my browser to update the IP address, the only way I can get it to actually change is doing a PowerState.RebootDevice();

 

I was just wondering what dependencies are in the RebootDevice method that cause the IP address to reset. I tried playing around with the ReleaseDhcpLease() and RenewDhcpLease() but they didn't really do anything for me. Here is my code that changes the IP address after I get it from the browser:

        private void UpdateAddressesRequest() {
            // If no values were actually updated, we don't need to run this method.
            if (sd.ChangeFlag == false)
                return;

            var interf = NetworkInterface.GetAllNetworkInterfaces()[0];            
            interf.EnableStaticIP(sd.IP, sd.SubnetMask, sd.DefaultGateway);
            interf.EnableStaticDns(new string[] { "172.16.1.1", "172.16.1.2" });

            sd.ChangeFlag = false;
            PowerState.RebootDevice(soft: false);
        }



#63651 New: Netduino Update application

Posted by cSharper on 24 July 2015 - 08:24 PM in General Discussion

This was great and super easy to use! Great job!




#63641 Gameduino 2 For Netduino

Posted by cSharper on 24 July 2015 - 12:57 PM in Project Showcase

Looks cool! Is that a touch screen to play the game?




#63629 SD Memory issue when writing

Posted by cSharper on 23 July 2015 - 04:19 PM in Netduino Plus 2 (and Netduino Plus 1)

Hey all,

 

So I have an issue that has been causing my head to spin when writing to an SD card. I have searched all the threads and couldn't find anything like my issue.

I can read perfectly fine from the SD card, but when writing, it will only write over text that is currently in the file.

            string FilePath = @"\SD\yourfile.txt";

            using (var fs = new FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, 512))
            using (var sw = new StreamWriter(fs)) {
                sw.WriteLine("Will This String Write?");
                Thread.Sleep(1000);
                sw.WriteLine("done.");
                Thread.Sleep(1000);
                sw.Flush();
            }
            Debug.Print("We did something");

So for example if my text file contains the string "My String" then when I run the above program, the only thing in the text file will be "Will This" instead of the entire string. And if there is nothing in the file at all, then nothing is written. I have the lastest firmware and SDK's. In fact I recently just reinstalled everything. I am also using a 2GB sd card as recommended.

 

Thanks for your help!




#63628 System.NotSupportedException

Posted by cSharper on 23 July 2015 - 03:09 PM in Netduino Plus 2 (and Netduino Plus 1)

So I ended up reinstalling the firmware, and SDK's and I no longer get the error!




#63625 System.NotSupportedException

Posted by cSharper on 23 July 2015 - 12:27 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris, 

Thank you for getting back to me.

Yes I get it when doing any simple hello world program, so I assume it has something to do with my setup.

I am using a netduino plus 2 and Visual Studios 2013.

 

DeviceInfo:
  HAL build info: 4.3.1.0, Netduino Plus 2 (v4.3.1.0) by Secret Labs LLC
  OEM Product codes (vendor, model, SKU): 34, 177, 4102
  Serial Numbers (module, system):
    00000000000000000000000000000000
    0000000000000000
  Solution Build Info: 4.3.1.0, Netduino Plus 2 (v4.3.1.0) 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
    System,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
    SecretLabs.NETMF.Diagnostics,4.3.1.0
    SecretLabs.NETMF.Hardware.Netduino,4.3.1.0
    Microsoft.SPOT.Hardware.OneWire,4.3.1.0
    Microsoft.SPOT.Time,4.3.1.0
    SecretLabs.NETMF.Hardware,4.3.1.0
    MyNetDuino,1.0.0.0
    GoBus,1.5.0.0



#63598 System.NotSupportedException

Posted by cSharper on 21 July 2015 - 08:31 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello all,

I'm new to netduino,

 

Everytime I try and run any program, I get the following error:

 

An unhandled exception of type 'System.NotSupportedException' occurred in SecretLabs.NETMF.Hardware.Netduino.dll

 

I've recopied these dll's into my project folder, and even tried to make a new project and still get the same error.

I fortunately am able to continue through the error, but I'm curious as to what is causing it and how to fix it.

 

Thanks!





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.