Technically, you can write a simple pass through driver which enumerates
a device interface which the app listens for. Once opened, the driver
just passes all reads/writes/IOCTLs down to the serial port. This can
be done, I don’t recommend it though … somewhat like a hammer to kill
a snail.
The bigger issues here is the detection of the device insertion.
Serenum (the serial enumerator) does not poll the port regularly. It
scans the port when asked (via device manager) and during boot up. So,
if you just randomly plug in the device after boot, it won’t be detected
by serenum (and, thus, the driver described above would not even load).
Your app needs to basically already be running and poll the port itself.
If this is a dedicated system, then it can just open the port at startup
and periodically poll. If this is an open system and the port can be
used for other purposes, the app should periodically open the port,
poll, then close it.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
Sent: Friday, March 04, 2005 11:58 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] PNP Serial Port device
The most difficult part I can see is starting an app simply because the
diveice is connected to the serial cable. You have to have something
running
that has an open handle to the COM port that can receive the
notification
from the serial driver of a change in state of DSR, DCD, CTS or even
maybe
RI. Basically you need the app already running and have requested
notification of the appropriate state change.
I see no need for driver work to be done. 1200 bps is snail slow and
should
provide no problems for the out of the box serial support provided by
XP.
–
The personal opinion of
Gary G. Little
“Alex John” wrote in message news:xxxxx@ntdev…
> Hi All,
> We have developed a device which could be connected
> to the serial port,the device is plugnPlay capable.The
> device sends data thrugh the serial port in 1200 baud
> rate.
>
> Now our requirement is once the device is plugged in
> an application should be started which opens the com
> port and starts reading the data from the device
> through the serial port.
>
>
> 1) How can we acheive this ?
> 2) Do we really require a driver for this ?
> 3) If a driver is required then what kind of
> driver should we write ?
> 4) Are there any references With example source
> code ?
>
>
> Expecting your valuable comments,Itz pretty urgent so
> mail your ideas as soon as possible.
>
> Thanx,
> Alex.
>
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com