I am trying to read data from GPS CF using serial comm on Pocket PC 2002.
However, the result were some weird unreadable chars.
The GPS CF itself uses NMEA and I just follow its default settings.

Is there anyone can give some helps/support for me to solve this prob?

Thanks for any support/helps.

Peter

Re: Reading Serial Comm (GSP CF) by PeterB

PeterB
Tue Nov 11 02:02:13 CST 2003

Are you only getting a bunch of numbers (0-9)? If so you need to convert the
bytes to strings.

A good place to learn about it is on http://www.opennetcf.org/serial.asp
where you can find a library for this.

You can use the code below to convert a byte array (port.Input) to an ASCII
string:
System.Text.Encoding.ASCII.GetString( port.Input, 0, port.Input.Length );



regards,

Peter



"Peter Alex" <peteralexbox@hotmail.com> wrote in message
news:u9eZOLCqDHA.2312@TK2MSFTNGP12.phx.gbl...
> I am trying to read data from GPS CF using serial comm on Pocket PC 2002.
> However, the result were some weird unreadable chars.
> The GPS CF itself uses NMEA and I just follow its default settings.
>
> Is there anyone can give some helps/support for me to solve this prob?
>
> Thanks for any support/helps.
>
> Peter
>
>
>



Re: Reading Serial Comm (GSP CF) by Peter

Peter
Tue Nov 11 03:00:59 CST 2003

Hi Peter,

Actually, the weird-characters are not in form of numeric '0..9'...they are
in form such unmapped chars.
And also ...it seems get hang when reading from comport (using starndar
WINCE API);

Thanks for your helps and support;

regards,

Peter

"PeterB" <peter@data.se> wrote in message
news:uzybjoCqDHA.392@TK2MSFTNGP11.phx.gbl...
> Are you only getting a bunch of numbers (0-9)? If so you need to convert
the
> bytes to strings.
>
> A good place to learn about it is on http://www.opennetcf.org/serial.asp
> where you can find a library for this.
>
> You can use the code below to convert a byte array (port.Input) to an
ASCII
> string:
> System.Text.Encoding.ASCII.GetString( port.Input, 0, port.Input.Length );
>
>
>
> regards,
>
> Peter
>
>
>
> "Peter Alex" <peteralexbox@hotmail.com> wrote in message
> news:u9eZOLCqDHA.2312@TK2MSFTNGP12.phx.gbl...
> > I am trying to read data from GPS CF using serial comm on Pocket PC
2002.
> > However, the result were some weird unreadable chars.
> > The GPS CF itself uses NMEA and I just follow its default settings.
> >
> > Is there anyone can give some helps/support for me to solve this prob?
> >
> > Thanks for any support/helps.
> >
> > Peter
> >
> >
> >
>
>



Re: Reading Serial Comm (GSP CF) by Trevor

Trevor
Tue Nov 11 11:20:13 CST 2003

"Peter Alex" <peteralexbox@hotmail.com> wrote in message
news:u9eZOLCqDHA.2312@TK2MSFTNGP12.phx.gbl...
> I am trying to read data from GPS CF using serial comm on Pocket PC 2002.
> However, the result were some weird unreadable chars.
> The GPS CF itself uses NMEA and I just follow its default settings.
>
> Is there anyone can give some helps/support for me to solve this prob?
>
> Thanks for any support/helps.
>
> Peter
>
>
>

Peter,

From my experiences with RS232, whenever you are receiving "strange
characters" your baud rate is wrong on one (or both) ends. Match up the
baud rate on both ends and the data should look normal after you reconnect.
You can hook it up to your PC with HyperTerminal to figure out which baud
rate is the correct one. AFAIK NMEA only uses ASCII characters. Usually
9600 is the de-facto standard baud rate but sometimes manufacturers use
19200, etc.



Re: Reading Serial Comm (GSP CF) by r_z_aret

r_z_aret
Tue Nov 11 13:03:00 CST 2003

On Tue, 11 Nov 2003 14:09:20 +0700, "Peter Alex"
<peteralexbox@hotmail.com> wrote:

>I am trying to read data from GPS CF using serial comm on Pocket PC 2002.
>However, the result were some weird unreadable chars.
>The GPS CF itself uses NMEA and I just follow its default settings.
>
>Is there anyone can give some helps/support for me to solve this prob?

I suspect the string is ASCII, and you need to convert it to UNICODE.
The Win32 function to do this is MultiByteToWideChar. Several related
functions exist that hide many of the details. If you let us know
which programming language you are using, one of us might have a more
precise answer.

>
>Thanks for any support/helps.
>
>Peter
>
>
>

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret
PenFact, Inc.
500 Harrison Ave., Suite 3R
Boston, MA 02118
www.penfact.com

Re: Reading Serial Comm (GSP CF) by Dick

Dick
Mon Nov 17 15:31:43 CST 2003

Hi,

I haven't seen any problems. Are your settings correct (speed, parity,
etc.)?

What is your code? Does it work correctly with other devices (say, a
modem)?

--
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.



Re: Reading Serial Comm (GSP CF) by MSPygoes

MSPygoes
Sat Nov 29 08:30:54 CST 2003


I can read serial data through the PC2000 emulator OK but
cannot send, except at about 3 baud.

The problem is shown with the simplest code i.e.

Private Sub cmdInput_Click()
lblInput = Comm1.Input
End Sub

Private Sub cmdOutput_Click()
MsgBox "About to output. "
Comm1.Output = "1" ' Takes about 20 seconds!
MsgBox "Outputted" ' and it eventually works
End Sub

Private Sub Comm1_OnComm()
' Nothing happens here
MsgBox "OnComm. comm1.comEvent=" & Comm1.CommEvent
End Sub

Private Sub Form_Load()
Comm1.PortOpen = True
End Sub


The input side works OK, but the time between pressing OK
on "About to Output" and receiving "Outputted" is 10-30
seconds or more.

The COM port has default settings - no handshaking (3-wire
connection only), settings 9600,N,8,1.

Pygoes