Re: MODEM driver
- From: Jakob Bohm <jb@xxxxxxxxxx>
- Date: Fri, 22 May 2009 14:41:50 +0200
jituelect wrote:
Hi all,Real and emulated serial-port-like drivers are supposed to just return
I am Working on a CDC ACM interface and using WDF.
While installing Modem Driver TAPI sends ATQ0E0V1 . My continous reader on
bulk read is getting response 0xd 0xa 0x41 0x54 0xd 0xa (OK) i.e 6 bytes.
Now TAPI reads the data single byte at a time. but instead of 6 it is
sending seven 7 request and my driver is hanging as7th read request is
pending .
the available bytes (but at least 1) in this situation, then wait for
the caller to call back again for more. This is true both on most
Windows and non-Windows systems.
Thus when a port is in active use, there is usually always a pending
read waiting for the buffer to grow beyond 0 bytes and then returning
with whatever it has as soon as something arrives. This way the reading
thread is blocked in the driver and the system can wait at 0% CPU for
the next character to arrive, maybe in a millisecond, maybe in a year.
The classic example is a service modem which is listening for an
incoming call from a service technician. TAPI (or some other process)
will be waiting for a read of the first byte of the "RING" message, and
will be blocked in that wait until someone calls the modem, which only
happens in a rare emergency.
--
Jakob Bøhm, M.Sc.Eng. * jb@xxxxxxxxxx * direct tel:+45-45-90-25-33
Netop Solutions A/S * Bregnerodvej 127 * DK-3460 Birkerod * DENMARK
http://www.netop.com * tel:+45-45-90-25-25 * fax:+45-45-90-25-26
Information in this mail is hasty, not binding and may not be right.
Information in this posting may not be the official position of Netop
Solutions A/S, only the personal opinions of the author.
.
- References:
- MODEM driver
- From: jituelect
- MODEM driver
- Prev by Date: Re: Code injection & Memory Overflow
- Next by Date: Dads & Grads Superstore
- Previous by thread: Re: MODEM driver
- Next by thread: Re: MODEM driver
- Index(es):
Relevant Pages
|
Loading