Communication using the docking port

J

jayderk

Hello all,

I have an interesting challange, we are trying to hook a pda up to a
satellite antenna to send data to our server. we are of course using the
docking port on the pda and .net compact framework. Am I going to be able to
send a webrequest/response over the docking port?

what I mean is in order for the pda to transfer data over the docking port
activesync has to have made a connection, if I just use openNETCF.IO.Serial.
open("COM1:\0") will the .net compact framework call

*****************************************
req.Method = "POST";
req.ContentType = "text/plain; charset=utf-8";
byte[] encodedBytes = Encoding.UTF8.GetBytes(requestXml);
req.ContentLength = encodedBytes.Length;
if(timeOut.Length > 1)
req.Timeout = int.Parse(timeOut);

Stream reqStream = req.GetRequestStream();
reqStream.Write(encodedBytes, 0, encodedBytes.Length);
reqStream.Close();

WebResponse result = req.GetResponse();
return (Stream)result.GetResponseStream();
if(req != null)
req = null;
******************************************

know to use the docking port to communicate?

Cheers,
Jay
 
D

Dick Grier

The OpenNETCF serial class is used to access local serial ports. If your
device has a local port (usually Com1, not Com0), and ActiveSync is not
using that port, then you may open it and use it.

However!!! This employs standard Windows serial APIs. It does not employ
the TCP/IP or other network stack. So, it cannot be used with an internet
connection. At least, not without work that goes beyond normal scales.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top