COM port multiplexer for GPS. Has any one got any ideas, please?

I

ink

Hi all,

Has anyone any idea on how to write a COM port multiplexer for GPS on
windows mobile 5? Or any example code of one that is available online?
The device I am working on is a Symbol HC700 and the geniuses that designed
the OS decided not to add the standard WM multiplexer into the OS.

We have looked at purchasing one but it is so big that it has caused such a
huge problem with DLL crunch. It has made the device unusable. This is
mainly due to all the other junk that they have the multiplexer.
Functionality that we don't need. And the company wont do a cut down
version.
I need it to be able to feed GPS data from the COM port to my application as
well as to TomTom.

I am a C# developer so and example in C# CF would be best. But if this can
only be done in C++ then that will have to do.

Thanks for any help.
ink
 
C

Chris Tacke, eMVP

Yes, the theory (and even the implementation) is quite simple. You write a
native stream interface driver - let's call it XYZ. When XYZ1: is opened
the first time, it opens the physical COM port. Each subsequent Open call
simply gets the already open handle. When data comes into the serial port,
XYZ buffers the data and then routes it to all callers who have opened XYZ
and are in a Read call.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
I

ink

hi Chris,

Thanks for getting back to me.

How do you make the virtual serial port visible to other applications?

If I have GPS data coming in on COM3
How do I make a COM5 and COM6 available that both mirror COM3 so that I can
have TomTom and MyApp using the data.

TomTom has to connect to a Serial port so I have to expose a virtual serial
port for it to connect to.

Do you know how I would do this.

I have been doing some reading and most third parties seem to be doing
something using null modem.
This is one of the article that I found but they are recommending using
third party software. GpsGate in fact which is the one we have been having
the DLL crunch problems with.
http://msdn.microsoft.com/en-us/library/aa446565.aspx

Thanks for your help
ink
 
C

Chris Tacke, eMVP

Thanks for getting back to me.
How do you make the virtual serial port visible to other applications?

Your multiplexer/virtual driver is a driver, so the apps would simply use
it.
If I have GPS data coming in on COM3
How do I make a COM5 and COM6 available that both mirror COM3 so that I
can have TomTom and MyApp using the data.

Your request is a little different than I'd implement, so you want COM5 and
COM6 to get the same data as COM3. Well I'd create the virtual driver and
register it for indexes 5 and 6. Then follow the same procedure I outlined
before. The first call to Open (or even in the Init if you want) opens COM3
and reads data from it into its own buffer. It then routes that data out to
COM5/6 as appropriate.
TomTom has to connect to a Serial port so I have to expose a virtual
serial port for it to connect to.

CreateFile, the call that opens the driver, has no clue about "serial"
drivers versus any other kind of stream interface driver. My guess is that
TomTom simply limits itself to looking at drivers with the prefix "COM".
That prefix can be used for any driver, not just serial, and serial drivers
can have anotehr prefix - it's just convention that says it's for serial
ports. If you give your virtual driver a "COM" prefix and cover the indexes
5 and 6 (and any others you want) then TomTom will see it.

You likely will have to implement at least a few of the serial-specific
IOCTLs or entries that TomTom may call. Here's a reasonable list:

http://msdn.microsoft.com/en-us/library/ms923143.aspx

To make things really simple I'd just start with the source for the 16550
driver that comes with PB, strinp it down to just the entry points, add in
debug messages and see what TomTom actually calls, then add implementation
in those areas.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
I

ink

Hi Chris,

I am sorry for all the questions but I trying to be smart about this and
look stuff up. I am not a C++ developer and I have never gone down to the
level of driver development, and that is what this is all sounding like to
me.

Can this sort of thing be done in C# using something like the msdn serial
port example using the .net port.
Found here: http://www.pcreview.co.uk/forums/thread-1298167.php

And could you clarify a few things that I am not understanding from what you
have said..

"Well I'd create the virtual driver and register it for indexes 5 and 6."
Would I use the like below to try and create the virtual driver?
What are the indexes?

"To make things really simple I'd just start with the source for the 16550
driver that comes with PB"
What is PB. (Is it Platform builder)

I am sorry for not being clearer in my first post about the COM ports.

Thanks.
ink
 
C

Chris Tacke, eMVP

Can this sort of thing be done in C# using something like the msdn serial
port example using the .net port.

This cannot be done in anything but native C. If you're not a C programmer,
you need to either find one or find anotehr 3rd party tool that does what
you need.
"Well I'd create the virtual driver and register it for indexes 5 and 6."
Would I use the like below to try and create the virtual driver?

Not sure what you're asking.
What are the indexes?

The number after the prefix. In "COM1: the prefix is "COM" the index is
"1". These are set in the registry for the driver so device.exe knows how
to expose them.
"To make things really simple I'd just start with the source for the 16550
driver that comes with PB"
What is PB. (Is it Platform builder)

Yes, PB is Platform Builder.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
R

r_z_aret

clip
I need it to be able to feed GPS data from the COM port to my application as
well as to TomTom.

Is the GPS Intermediate Driver from Microsoft relevant? I use it to
share one GPS receiver with two or three programs on a WM 5 Pocket PC
and a WM 6 Smartphone (now called "Standard").


clip
Thanks for any help.
ink

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

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com
 
I

ink

Thanks for the suggestions guys but as i mentioned in the first post Symbol
in there wisdom decided not to include it in there build of the OS for the
MC700 deceive.
That was in fact the first thing i tried and we can not just lump it on the
device or the devices are no longer covered buy the support agreement,
because it has not gone thought their UAT process.
But if it is something we have the source code for then we can support and
maintain it our selves.
 

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