Serial port question

W

Wayne Sepega

I have an application I'm writing that retrieves information from my GPS,
the GPS is connected to my PPC via Blue Tooth, once connected the GPS shows
up on COM 6. Everything is going fine with the app. However, if my app is
running and collecting GPS data, I can no longer use my routing software on
the PPC since only one piece of software can connect to the COM port at a
time.

I've thought about emulating a com port. My software would still connect to
COM 6 but the routing software would connect to COM X which is my software
emulation port. I would then pass everything I receive from the GPS to the
other COM port as well as anything received from the other COM port would be
sent to the GPS. However, I'm not real sure where to start or how to
accomplish the above.

Any other ideas on how I can get both pieces of software to connect?

Thanks
Wayne
 
G

Ginny Caughey [MVP]

Wayne,

If you control both pieces of software, how about a 3rd piece (or a thread)
that just reads from the single serial port and writes to a database that
the other two apps could read from and delete items as they are no longer
needed? If you go the database route, be aware that SQL Mobile supports
multiple connections like this, but SQL CE doesn't.
 
W

Wayne Sepega

No I don't control both pieces of software. The Routing software is what
came with my GPS. So I need something I can do to either fake the COM port
to the routing software or get the data from the routing software, but would
rather not have to write something for every piece of routing software out
there.

As for the DB comment, I've installed SQL Mobile 2005 and am using the
System.Data.SqlServerCe namespace to access it. I should be ok with multiple
connections like this right? I ask as I'm trying to nail down what I think
is a threading issue when my app locks up from time to time, just started
happening so haven't spent a lot of time looking into it.

Thanks
Wayne
 
G

Guest

You need a virtual serial driver that reads the GPS and exposes multiple
serial ports that it echoes out on. There are some existing commecial ones
or you can write your own. The sample serial port driver in Platform
Builder is probably the simplest way to get started.

-Chris
 
D

Dick Grier

Hi,

If you are using Visual Studio 2005 and a Windows Mobile 5 device, the
required device driver is built-in. GPS data may be shared between multiple
clients, even ones over which you have no control.

However, for other devices (or if not using Visual Studio 2005), then your
best bet, IMO, would be to use GPS Tools from Franson (www.franson.com).
They have a free demo version that will allow you to determine if it does
what you need. If you go this route, you can contact me by email. I can
provide you with the full license for a significant discount.

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

Ginny Caughey [MVP]

Wayne,

Using SQL Mobile via SqlServerCe should work ok with multiple connections
across multiple apps or threads, but if you find out what's causing your
lockup issue, be sure to let us know.
 
T

ThisBytes5

Thanks for the offer, but I'm just goofing around with this. Don't
really want to put out any money right now. Though his software does
look interesting.
 

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