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's Content

There have been 10 items by dottorduino (Search limited from 24-May 23)


By content type

See this member's

Sort by                Order  

#29628 Map Serial Port to PC COM

Posted by dottorduino on 24 May 2012 - 07:57 AM in Netduino Plus 2 (and Netduino Plus 1)

Why the emulator should not fit the requirement?


Ciao Mario.
Probably the emulator is able to do this, but I can't find a way to make it happen..



#29627 Transfer file PC to NetDuino SD Card

Posted by dottorduino on 24 May 2012 - 07:54 AM in Netduino Plus 2 (and Netduino Plus 1)

ok! Thank you all.



#29575 Map Serial Port to PC COM

Posted by dottorduino on 23 May 2012 - 10:00 AM in Netduino Plus 2 (and Netduino Plus 1)

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.



#29319 Transfer file PC to NetDuino SD Card

Posted by dottorduino on 17 May 2012 - 09:04 AM in Netduino Plus 2 (and Netduino Plus 1)

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



#29318 HttpWebRequest GetResponse Error

Posted by dottorduino on 17 May 2012 - 08:18 AM in General Discussion


@Stefan, is their a use case for adding additional info to the XML comment for Simple socket that entering localhost here means you are connecting to the NETMF Board the client is running on, or similar words to that effect?

Nak.


Just for dummies :)

Now I'm fighting with the CLR_E_OUT_OF_RANGE error at runtime!!! :angry:
Maybe the string for the request is too long?

...a few minutes later...

Solved removing the "\r\n" line from my string.



#29247 HttpWebRequest GetResponse Error

Posted by dottorduino on 16 May 2012 - 09:25 AM in General Discussion

For localhost it makes sense, since localhost refers to the Netduino itself, which doesn't listen on port 80.


...this was the problem :mellow:

I'm porting from a Console Application where, of course, I refer to my IIS using localhost and I forgot this "little" difference between localhost on a PC and localhost on simulator -.-

Thank you for your support.



#29245 HttpWebRequest GetResponse Error

Posted by dottorduino on 16 May 2012 - 09:03 AM in General Discussion

Hi Stefan,
thank you for your quick reply.

Even if I try this simple function:
 private HTTP_Client _remoteSession;
 private IntegratedSocket _remoteSocket;
 [...]

 private void testFunction()
 {
  _remoteSocket = new IntegratedSocket("localhost", 80);
  _remoteSession = new HTTP_Client(_remoteSocket);
            
  HTTP_Client.HTTP_Response response = _remoteSession.Get("");
  [...]


When the .Get(...) method is called, I encounter this message:
An unhandled exception of type 'System.NullReferenceException' occurred in System.dll

The problem (for the debugger) is in IntegratedSocket.cs at line 75.



#29243 HttpWebRequest GetResponse Error

Posted by dottorduino on 16 May 2012 - 08:06 AM in General Discussion

Hi

Have you tried using Stefan's netmf toolbox http client?

As far as i understand it the standard HttpWebRequest .net dev's are familiar with, relies on streams to operate, which although technically possible in netmf is very memory intensive and so is either not implemented or max's out the available ram very quickly. However the netmf toolbox http client takes a different approach and has worked very successfully for myself including long-polling scenarios.

Nak.


Hi Nak,
thank you for your reply.
This toolbox is awesome!

Anyway, when the program arrives to :

HTTP_Client.HTTP_Response Response = WebSession.Get(pollString);

the Response object is still null...



#29100 HttpWebRequest GetResponse Error

Posted by dottorduino on 15 May 2012 - 10:50 AM in General Discussion

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?



#29016 Replacing texst in strings

Posted by dottorduino on 14 May 2012 - 02:51 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi folks, I can't find String.Replace in my NetDuino Plus project. This is the error: "String does not contain a defenition for 'Replace' and no extension method...bla bla bla" I use .Net MF 4.1




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.