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.
Photo

Netduino Firmware v4.2.0 BETA 1


  • Please log in to reply
83 replies to this topic

#61 ColinR

ColinR

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationCape Town, South Africa

Posted 05 July 2011 - 05:09 AM

The MSDN example suggests..

// Create an instance of StreamReader to read from a file.
// The using statement also closes the StreamReader.
using (StreamReader sr = new StreamReader("TestFile.txt"))
{
    String line;
    // Read and display lines from the file until the end of
    // the file is reached.
    while ((line = sr.ReadLine()) != null)
    {
        Console.WriteLine(line);
    }
}
Link

#62 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 05 July 2011 - 05:23 AM

Hmm. Thanks for the details. Very interesting. Two questions: 1. Does ColinR's sample work as a workaround? 2. Does your example work with files on Windows (i.e. is the behavior inconsistent between .NET and .NET MF)? Chris

#63 grimbouk

grimbouk

    New Member

  • Members
  • Pip
  • 8 posts

Posted 05 July 2011 - 07:44 AM

Hmm. Thanks for the details. Very interesting.

Two questions:
1. Does ColinR's sample work as a workaround?
2. Does your example work with files on Windows (i.e. is the behavior inconsistent between .NET and .NET MF)?

Chris


Very interesting. I wonder if that has become the recommended way to check for EndOfStream? If you search you'll find that a lot of people give examples they way I use EndOfStream. I managed to find one official example as well: http://msdn.microsof...y/ee461504.aspx (step 9).

Answers:-
2. This design pattern does work in the standard framework as I use it quite often.

1. Interesting, this pattern manages to read all the lines, but doesn't stop trying to read lines when the EndOfStream is hit:-

Debug.Print(File.Exists(filename) ? "File Found" : "File Not Found!");

using (StreamReader sr = new StreamReader(filename))
    {   
        Debug.Print("Initial EOS:" + sr.EndOfStream.ToString());

        String line;    
        // Read and display lines from the file until the end of    
        // the file is reached.    
        while ((line = sr.ReadLine()) != null)    
        {
            Debug.Print("LINE:" + line + " - EOS:" + sr.EndOfStream.ToString());
        }
}

This gived me the following output...

File Found
Initial EOS:True
LINE:TestLine0 - EOS:False
LINE:TestLine1 - EOS:False
LINE:TestLine2 - EOS:False
LINE:TestLine3 - EOS:False
LINE:TestLine4 - EOS:True
LINE: - EOS:True
LINE: - EOS:True
LINE: - EOS:True
...

So it looks like EndOfStream isn't set until the first line is read.

If I step over the code, "line" is never set to null, if there's no data available it seems to be set to empty string. I wouldn't be happy to use this to determin the end of file.

It looks like I can get what I want by using a mix of this approach and adding a check for EndOfStream within the loop, like this:-

using (StreamReader sr = new StreamReader(filename))
{
    Debug.Print("Initial EOS:" + sr.EndOfStream.ToString());
    String line;    
    // Read and display lines from the file until the end of    
    // the file is reached.    
    while ((line = sr.ReadLine()) != null)    
    {
        Debug.Print("LINE:" + line + " - EOS:" + sr.EndOfStream.ToString());
        if (sr.EndOfStream) break;
    }
}

Tim

#64 ColinR

ColinR

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationCape Town, South Africa

Posted 05 July 2011 - 08:59 AM

Sounds like a bug then - but with a neat workaround.

Return Value

Type: System.String
The next line from the input stream, or null if the end of the input stream is reached.


Link

#65 Edward

Edward

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationLondon, UK

Posted 05 July 2011 - 10:13 AM

We build the tuning down of buffer sizes into the v4.1.0.0 firmware, and it's now included in the v4.2 firmware as well.

What is the FAT file access count memory issue? If that has been changed in the 4.2 codebase, it's included as well.

The GC bugfixes are included for sure.

We'll be posting v4.2 beta 2 later this weekend, now with "WithEvents" support for VB programmers.

Chris

Not FAT file access count - in a previous thread (that I can't now find) relating to out of memory issues you'd said you were going to reduce both the number and size of buffers allocated by the FAT file system. You also said in that thread you were going to change the wording of the GC message "Failed to allocate..." to clarify that it was a compaction trigger rather than an out of memory situation. The old wording remains so I wondered if the memory tuning got done and whether all this is in 4.2.

Thanks for clearsing this up.

Edward

#66 Stuart Crawshaw

Stuart Crawshaw

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts
  • LocationLeeds, United Kingdom

Posted 05 July 2011 - 10:37 AM

Hi all, Does this beta include the OneWire support by CW2? On another note, Since updating i can no longer deploy to my Netduino... I just sticks at deploying... I did notice however that when updating with MFDeploy, the output did not seem "complete" (see below) Deployment Status says: 1. Checking Signature 2. Erasing 0x0******* (cant remember exactly) 3. Deploying ER_FLASH 3. Checking Signature 4. Exiting application and the output window of MFDeploy says: "Chk s" and thats it. If i then try to click Target > Device Capabilities, it says "Error: No Response From Device" Ive seen screenshots and this normally says "Checking Signature, "Signature Passed"? Any idea what might be going wrong? Thanks,
Intelligent People Aren't Afraid To Ask For Help.

#67 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 05 July 2011 - 02:12 PM

Not FAT file access count - in a previous thread (that I can't now find) relating to out of memory issues you'd said you were going to reduce both the number and size of buffers allocated by the FAT file system. You also said in that thread you were going to change the wording of the GC message "Failed to allocate..." to clarify that it was a compaction trigger rather than an out of memory situation. The old wording remains so I wondered if the memory tuning got done and whether all this is in 4.2.

We changed this in an early version of 4.1.0...so all current versions should have the reduced FAT buffers and updated wording. This should all be checked in with the .NET MF 4.2 beta 1+ firmware as well.

Chris

#68 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 05 July 2011 - 02:14 PM

Hi Stuart,

Does this beta include the OneWire support by CW2?

The OneWire support is an add-on. We'll make a version with OneWire when the beta gets farther along (release candidate or RTM). I believe that CW2 is working on some updates, so we'll be sure to include the latest version.

Since updating i can no longer deploy to my Netduino... I just sticks at deploying...

When you reboot the Netduino, are you able to connect? Could you run "Target -> Device Capabilities" and post the results here?

Chris

#69 ColinR

ColinR

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationCape Town, South Africa

Posted 14 July 2011 - 10:17 PM

3 Exceptions I'm getting on 4.2 BETA 2:

Exception was thrown: System.Exception: System.Version::ToString
When using:
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()


Exception was thrown: System.Exception: Microsoft.SPOT.Net.NetworkInformation.NetworkInterface::get_DnsAddresses
When using:
ni.DnsAddresses[0]


Exception was thrown: System.Exception: Microsoft.SPOT.Net.NetworkInformation.NetworkInterface::IPAddressToString
Microsoft.SPOT.Net.NetworkInformation.NetworkInterface::get_DnsAddresses
When using:
ni.DnsAddresses[0]


#70 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 14 July 2011 - 10:35 PM

Colin, Did you set your network settings in MFDeploy after flashing the .NET MF 4.2 beta? Chris

#71 ColinR

ColinR

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationCape Town, South Africa

Posted 15 July 2011 - 05:14 AM

Colin,

Did you set your network settings in MFDeploy after flashing the .NET MF 4.2 beta?

Chris


I did, yes. What I didn't do is update the tinybooter - the 4.2 beta looked like it flashed ok though?
The exceptions do not hit every time unfortunately - I can't see a pattern.

#72 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 15 July 2011 - 05:31 AM

Could you please update TinyBooter as well and re-test? That could actually be important here... Chris

#73 ColinR

ColinR

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationCape Town, South Africa

Posted 15 July 2011 - 06:39 AM

Could you please update TinyBooter as well and re-test? That could actually be important here...

Chris



OK, will update it tonight and re-post.

#74 ColinR

ColinR

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationCape Town, South Africa

Posted 15 July 2011 - 08:11 PM

I get the two DNS Address related exceptions still, with the new tinybooter loaded. I've not seen the Version.ToString() again.

#75 Edward

Edward

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationLondon, UK

Posted 16 July 2011 - 02:27 PM

I agree, but I'm not an expert of things and like we say in Dutch: "van 't kastje naar de muur". Litteraly: "from the cupboard to the wall" but loosly translated being bounced around.
So perhaps you could reply on that issue, or take some other actions? If you need me to test anything, you know how to contact me ;)


The hang on deployment and the following BSOD on disconnect or reset is driving me crazy; makes serious development an absolute pain. It's happening to me on about 50% of deployments. Is there any known workaround? Is the 4.1 driver better than the 4.2? Is it happening only to a few people or everybody? Only 4 votes on codeplex. I'm using Win7 64bit and VS2010 Pro.

Edward

#76 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 17 July 2011 - 10:12 PM

Hi Edward, I share your pain, I really do. Could you post your findings in http://netmf.codeple...m/workitem/1049 as well, or just vote for that issue? :)
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#77 Dan T

Dan T

    Advanced Member

  • Members
  • PipPipPip
  • 91 posts
  • LocationBoston (Greater)

Posted 30 July 2011 - 02:00 PM

The hang on deployment and the following BSOD on disconnect or reset is driving me crazy
...
Is it happening only to a few people or everybody? Only 4 votes on codeplex. I'm using Win7 64bit and VS2010 Pro.

Edward

It's happening to me. Win7 32bit, VS2010 Express. I'm now the 8th vote on CodePlex.
So weird to see the BSOD. It's been years.

#78 Glen

Glen

    Member

  • Members
  • PipPip
  • 26 posts

Posted 30 July 2011 - 04:13 PM

It's happening to me. Win7 32bit, VS2010 Express. I'm now the 8th vote on CodePlex.
So weird to see the BSOD. It's been years.

I had it happen a couple times yesterday after going to 4.2 as well.

#79 Edward

Edward

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationLondon, UK

Posted 04 August 2011 - 11:52 PM

I had it happen a couple times yesterday after going to 4.2 as well.



I just spotted that this issue despite a high vote count was closed on Codeplex this Monday by "lorenzte" with no explanation. Outrageous.

Seriously considering an alternative platform for my product development as NETMF is proving too painful and unproductive at the moment. I had high hopes for it.

:-/

#80 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 05 August 2011 - 12:41 AM

I just spotted that this issue despite a high vote count was closed on Codeplex this Monday by "lorenzte" with no explanation. Outrageous.

I believe he closed the blue screen issue with a note that it may be fixed in RC1 (and to re-open it if it's not).

Can you downloaded the brand new .NET MF 4.2 RC1 SDK and see if you still get the issue (and if so, we'll push to re-open the issue)?

Chris




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.