File Download Via Ethernet
#1
Posted 26 May 2011 - 06:19 PM
#2
Posted 26 May 2011 - 06:24 PM
#3
Posted 26 May 2011 - 06:30 PM
Hi newfierich,
Sure, you can do this via HTTP like you would any other webpage. You'll get blocks of data in your buffer. The big struggle is what to do with the data as you get it. I'm assuming that you want to write it out to an SD card right away, since you have dozens of KB of RAM, not MBs of RAM...but you could also parse the data for specific messages, etc.
Chris
Chris, thanks for your quick response. Reading my original question I see that it was not very clear. I would like to send a file from the sd card on the Netduino Plus to a pc. Are there any examples of this implementation? BTW love the Netduino!
#4
Posted 26 May 2011 - 06:53 PM
You should be able to accept a connection via a socket or HttpListener, open up the file as a stream, and then read/write chunks of data until the file is completely sent. You can probably use code from the desktop framework for this...you'll just need to keep memory considerations in mind (and use the "long form" method overloads if necessary).Chris, thanks for your quick response. Reading my original question I see that it was not very clear. I would like to send a file from the sd card on the Netduino Plus to a pc. Are there any examples of this implementation? BTW love the Netduino!
I know that there are a few "web server" projects in the forums. If you do a bit of searching, you may find code that does exactly what you need already. If not, let us know and we can help give you additional pointers.
Glad that you're enjoying your Netduino,
Chris
#5
Posted 20 October 2011 - 07:48 PM
Chris, thanks for your quick response. Reading my original question I see that it was not very clear. I would like to send a file from the sd card on the Netduino Plus to a pc. Are there any examples of this implementation? BTW love the Netduino!
I am looking to do the same thing. Did you get this working? Do you have code that you would like to share?
#6
Posted 20 October 2011 - 10:05 PM
- tel001 likes this
NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and down - and upload files
If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
#7
Posted 21 October 2011 - 03:51 AM
http://msdn.microsof....webclient.aspx
e.g. on the PC,
Using client As WebClient = New WebClient client.UploadFile(SDFullPath, LocalFullPath) 'and 'client.DownloadFile(SDFullPath, LocalFullPath) End Using
It's really simple on the PC, but you need to parse the HTTP POST and GET headers on the Netduino and write some code to
handle the file. I am using this method on my PC Netduino client.
Baxter
#8
Posted 25 October 2011 - 06:49 PM
#9
Posted 29 October 2011 - 07:26 AM
If you could wait till the end of the weekend, i will upload my webserver project.
With it you can access your Netduino via your browser and I try to build it easy extendable, so that you could code just a little method and be able to access your pins on the netduino through the browser for example.
But due to school and work i don't have time to finish it till saturday. Code will be published then =)
Greets Markus
Hi Markus,
I would greatly appreciate a look at your webserver code... It's helpfull guys like you thank get us old guys hooked on new toys
#10
Posted 29 October 2011 - 01:36 PM
Hi Markus,
I would greatly appreciate a look at your webserver code... It's helpfull guys like you thank get us old guys hooked on new toys
Yeah, I'm working on it.
I developed an PC version and just finnished porting it to .NETMF. But I'm facing a problem at the moment (http://forums.netdui...9959#entry19959)
When it's finnished i will post a link to codeplex where you can download the full source.
I will message you via PM if you want.
Greets Markus
- tel001 likes this
NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and down - and upload files
If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users