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

Plus with more RAM .... in the cards?


  • Please log in to reply
12 replies to this topic

#1 samjones

samjones

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts

Posted 05 February 2012 - 09:53 PM

Chris, Given my experience with the Plus board, I may outgrow it due to the very limited RAM on board. For example, it seems I cannot use high level http webrequest calls and SD card logging at the same time, due to RAM limitations. Is a "RAM enhanced" Plus in the cards? Thanks! (Note: One way to approach this: Is there a way to disable some of the networking pieces to reduce the footprint of the networking code? I only do http get requests, via high level httpwebrequest calls, also need dhcp).

#2 Magpie

Magpie

    Advanced Member

  • Members
  • PipPipPip
  • 279 posts
  • LocationAustralia (south island)

Posted 05 February 2012 - 10:02 PM

Hi
I was having the same troubles until I saw this thread.
Re: memory pig

So I changed my code around and now I rarely get out of memory exceptions.
Hope you find it helpful.
STEFF Shield High Powered Led Driver shield.

#3 samjones

samjones

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts

Posted 06 February 2012 - 12:33 AM

I was having the same troubles until I saw this thread.
Re: memory pig


It is helpful, but does not apply, I think...

My memory problems flow from the use of this code:
http://forums.netdui...dpost__p__23637

This code already uses FileStream, and has no use of StreamReader...

Any other ideas?

#4 Arbiter

Arbiter

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationBrisbane, Australia

Posted 06 February 2012 - 09:30 AM

Lose the WebRequest. Internally it uses StreamReader. That's why, in the post mentioned above, my other sample shows direct use of a socket.
One day, all this too shall parse.

#5 samjones

samjones

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts

Posted 06 February 2012 - 02:47 PM

Lose the WebRequest. Internally it uses StreamReader. That's why, in the post mentioned above, my other sample shows direct use of a socket.


(In, in your other post I focused on the use of IO to the SD card, and reviewed my own, and found no streams... I misunderstood!)

Ohhhh, I am loath to lose WebRequest. It works reliably, and helps me keep my code really simple. It lets me do stuff like http://100.200.50.25.../path/endpoiint really easily. With Sockets, the implementations all had various limitations (assuming port 80, etc etc).

I have used sockets, but really am glad to have moved away from them (in fact, a broken WebRequest implementation is why I left the Panda platform and came back to netduino).


Is there a full socket implementation for http GET?

#6 Arbiter

Arbiter

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationBrisbane, Australia

Posted 06 February 2012 - 11:12 PM

Is there a full socket implementation for http GET?

No, there isn't. I have been toying with the idea of getting NETMF and modifying it to reduce the internal buffer allocations of StreamReader. Without WebRequest it's waaaaay too much work to use SSL, for example.
One day, all this too shall parse.

#7 samjones

samjones

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts

Posted 06 February 2012 - 11:38 PM

No, there isn't. I have been toying with the idea of getting NETMF and modifying it to reduce the internal buffer allocations of StreamReader. Without WebRequest it's waaaaay too much work to use SSL, for example.


Sounds like I am on the same page with you:

WebRequest is just too useful, and there isn't a good drop in replacement for it.

Over on the Panda side, I spent hours and hours (20, I think, and that is expensive for me as a hobbyist), discovering that their implementation of WebRequest was so buggy to be unusable. I used sockets because that was all that would work, but found I was spending all my time managing/enhancing socket based code, and not spending time on my actual project.

I came back to netduino specifically to have working WebRequest, and am now hitting the memory wall because Netduino + is so very memory constrained due small available memory on the chip + overhead of networking code.

Open to all suggestions!

#8 Arbiter

Arbiter

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationBrisbane, Australia

Posted 08 February 2012 - 12:10 AM

FEZ Hydra 16M RAM. Yes, Sixteen megabytes. But it's from the same chap who did the Panda so you may run into framework quality issues. I've just run into a peculiar problem with sockets. But when I tried to build a bug repro project the problem failed to manifest.
One day, all this too shall parse.

#9 samjones

samjones

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts

Posted 08 February 2012 - 02:51 AM

>> FEZ Hydra Well, even Panda is fine on the RAM side. It has 62KB of user RAM, and networking is on an external board, so AFAIK you don't lose any when you add networking. I like the Hydra, but prefer the smaller form factor and lower price (since I may end up building dozens of these things).

#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 February 2012 - 03:33 AM

Hi samjones, You will always lose some RAM when you add networking. There are buffers and such that need to be maintained, whether in managed or native code. BTW, have you noticed how much free RAM is available on Netduino Plus with .NET MF 4.2 RC4 firmware? :) Try this in an empty program: Debug.Print("available RAM: " + Debug.GC(true)); Chris

#11 samjones

samjones

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts

Posted 08 February 2012 - 04:10 AM

BTW, have you noticed how much free RAM is available on Netduino Plus with .NET MF 4.2 RC4 firmware? :)


Not yet. I fear I don't have time until 4.2 goes gold (as a hobbyist my time is very constrained).

#12 Arbiter

Arbiter

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationBrisbane, Australia

Posted 08 February 2012 - 12:55 PM

Got a rough guesstimate of when 4.2 might go gold? I realise this is a how-long-is-a-piece-of-string question.
One day, all this too shall parse.

#13 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 February 2012 - 02:04 PM

Got a rough guesstimate of when 4.2 might go gold? I realise this is a how-long-is-a-piece-of-string question.

As soon as the community lets us know that things are stable, we'll be pushing 4.2 beyond beta. It sounds like the latest release candidate really helped on the stability front, so we're optimistic that it'll be within the next two months.

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.