Hello,

I apologize in advance if my question(s) seem trivial. This is the
first time I've undertaken such a project and if possible I'd like
some pointers on where to get started.

I have a software application that expects to receive data from a
serial port. For example, COM1 (the serial port on the back of the
computer) has a device plugged into it that feeds telemetry data into
the serial port. The application running on the desktop (or laptop)
expects to receive data from this serial port.

WHAT I'D LIKE TO DO
Basically I'd like to accept the data via 802.11.b rather than the
serial interface by presenting a new COM port (let's say COM99) to the
software application. So in essence the application believes that
COM99 is a serial port however, underneath COM99 is really some type
of program (driver) that passes the data through from the 802.11b card
and presents the data as if it came from a serial port. Also, vice
versa. Any data transmitted by the application should appear as if it
were going out the serial port but in reality it is also getting
passed through out the 802.11b card.

I'm looking for pointers on how to get started. Any help would be
greatly appreciated. I have a copy of Microsoft's XP SP1 DDK and I've
been scouring the news groups for information on "Virtual Serial
Ports". But I must admit... I'm a bit overwhelmed so I was hoping
that this group might be able to provide me with some much needed
guidance.

Thanks,
Jay

Re: Virtual Serial Port: Help getting started? by Slobodan

Slobodan
Wed Aug 13 21:38:01 CDT 2003

Hi Jay,

Why virtual when you need to write simple COM driver. Programs can't tell
the difference.

You have example of serial driver in src\kernel\serial although it is
rather huge.

To create dummy COM driver it is rather simple.

In AddDevice you call IoCreateDevice after that you will have object that
you can associate with COM99 name using function IoCreateSymbolicLink

#define DOS_DEVICE_NAME L\\DosDevices\\COM99

You should implement most IRP_MAJOR codes for PNP, starting and stopping.
IRP_MJ_READ, IRP_MJ_WRITE // Should do the real work

In IRP_MJ_DEVICECONTROL all serial codes can be probably dummy implemented
IOCTL_SERIAL_GET_BAUD_RATE. Depending on user mode application.

Everything else is up to you 802.11 etc.

If you have written some drivers before you should have simple COM part
working in few days.


Best regards,
Slobodan
"Jay Murphy" <jwmurphy@iname.com> wrote in message
news:be2c9ecb.0308131623.622b250c@posting.google.com...
> Hello,
>
> I apologize in advance if my question(s) seem trivial. This is the
> first time I've undertaken such a project and if possible I'd like
> some pointers on where to get started.
>
> I have a software application that expects to receive data from a
> serial port. For example, COM1 (the serial port on the back of the
> computer) has a device plugged into it that feeds telemetry data into
> the serial port. The application running on the desktop (or laptop)
> expects to receive data from this serial port.
>
> WHAT I'D LIKE TO DO
> Basically I'd like to accept the data via 802.11.b rather than the
> serial interface by presenting a new COM port (let's say COM99) to the
> software application. So in essence the application believes that
> COM99 is a serial port however, underneath COM99 is really some type
> of program (driver) that passes the data through from the 802.11b card
> and presents the data as if it came from a serial port. Also, vice
> versa. Any data transmitted by the application should appear as if it
> were going out the serial port but in reality it is also getting
> passed through out the 802.11b card.
>
> I'm looking for pointers on how to get started. Any help would be
> greatly appreciated. I have a copy of Microsoft's XP SP1 DDK and I've
> been scouring the news groups for information on "Virtual Serial
> Ports". But I must admit... I'm a bit overwhelmed so I was hoping
> that this group might be able to provide me with some much needed
> guidance.
>
> Thanks,
> Jay