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.

dottorduino

Member Since 10 May 2012
Offline Last Active Aug 06 2012 04:19 PM
-----

Topics I've Started

Map Serial Port to PC COM

23 May 2012 - 10:00 AM

Is there a way to map a NetDuino Serial Port to a PC serial port, so when I call:

serial.write(b,0,b.Lenght);

the .Net MF route the write request to a COM port on my PC?

I need to do this because I don't own a real NetDuino device at moment.

Transfer file PC to NetDuino SD Card

17 May 2012 - 09:04 AM

Hi,
it is possible transfer file from PC Application (WPF) to Netduino SD card reader?

If so, can I use code like this?
System.IO.File.Copy(_sourceFile, _destFile, true);
where _destFile is
_destFile = System.IO.Path.Combine(@"SD:\", "myfile.foo");

thank you
bye

HttpWebRequest GetResponse Error

15 May 2012 - 10:50 AM

Hi Duini :)

When I call the GetResponse method, it return a null status.

This is the code

 String URI = "http://" + serverIP + "/testPoll/signalr?";            
 
 pollString = URI + "transport=longPolling";
 pollString += "&connectionId=" + _connectionID;
 pollString += "&connectionData=" + Tools.RawUrlEncode("[{\"name\":\"testPoll.Chat\",\"methods\":[\"addMessage\"]}]");                        
 pollString += "&messageID=" + 45;
 pollString += "&groups=" + Tools.RawUrlEncode("[\"testPoll.Chat.foo\"]");
 pollString += "\r\n";
            
 var request = (HttpWebRequest)WebRequest.Create(pollString);
 request.Method = "GET";
 request.KeepAlive = false;

 try
 {
  var httpResponse = (HttpWebResponse)request.GetResponse();

  [...]


When I inspect on httpResponse, I have:

ContentEncoding: 'HttpResponse.ContentEncoding threw an Exception of type 'System.NullReferenceException'
ContentType: 'HttpResponse.ContentType threw an Exception of type 'System.NullReferenceException'

and the HttpStatus is "null".

Why I obtain this null Response?

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.