GPS in Device Emulator

D

Daniel

Please help!

I have a PC with a bluetooth dongle that is associated to a bluetooth GPS
device. That appears as COM4. I am trying with VB2005 to read the data
from the GPS but can't do it. I am opening the port but when I use the method
".ReadLine" it just sits there doing nothing. I see that someone else recently
posted with the same problem but no-one replied to their post. Any ideas?
Has anyone done this before? If so, could you post some code?

I want to do it all with code rather than use an external DLL.


Daniel
 
G

Guest

First ensure that serial data is actually coming into the port and getting
routed to the emulator. Use a terminal program on the emulator to open the
port and see if the data comes in. If that works, then it's a code issue,
if not, it's a setup/configuration issue.
 
D

Dick Grier

Hi,

I have done this (though I use ReadExisting, not ReadLine -- but, since
standard GPS NMEA sentences are terminated by a newline character pair
(CRLF), usually this isn't an issue). Realize that if the data does not
have proper format, ReadLine will wait forever.

So, is your BT port mapped to the emulator?

And, as Chris asks, does yout BT adapter work with HyperTerminal (or some
other terminal program)?

BTW, I do have example code in my book that shows how to read the serial
data stream (pretty easy) and to decode and display it (sometimes a little
more difficult). See below.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 

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