grabbing an RS232 port from serial.sys

I am trying to port a NT 4.0 driver to Win2k. The NT 4.0 driver grabbed a COM port hardware before Serial.sys had a chance to run.
I understand that I can’t use this technique with Win2k, but don’t understand how to do an equivelent in Win2K. My best guess is that I need to somehow tell with serenum.sys to release the rs232 port I want then have a custom enumerator grab the port for my driver. I am still a bit fuzzy on the concepts.

I need to have direct access to the hardware because my ISR needs to do some special time critical operations.

Can someone help me out?

Larry

It is possible to acquire the port on Win2k using a root-enumerated driver
that runs before serial.sys, and disabling the port so that serial.sys knows
to ignore it. Unfortunately, that will work only on APM machines, not ACPI.
With ACPI, disabling the port causes the ACPI filter to actually power down
the port, which causes your attached device to stop working.

The solution is to conform to the new serial architecture used in Win2k and
rewrite your driver as a client of serial.sys. This will work for both APM
and ACPI machines. You can issue read/write commands to the serial port from
your driver, similar to the way that sermouse.sys does (the new rewritten
version of sermouse for Win2k).

Lori

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Larry Harmon
Sent: Tuesday, November 28, 2000 7:05 AM
To: NT Developers Interest List
Subject: [ntdev] grabbing an RS232 port from serial.sys

I am trying to port a NT 4.0 driver to Win2k. The NT 4.0 driver grabbed a
COM port hardware before Serial.sys had a chance to run.
I understand that I can’t use this technique with Win2k, but don’t
understand how to do an equivelent in Win2K. My best guess is that I need
to somehow tell with serenum.sys to release the rs232 port I want then have
a custom enumerator grab the port for my driver. I am still a bit fuzzy on
the concepts.

I need to have direct access to the hardware because my ISR needs to do some
special time critical operations.

Can someone help me out?

Larry

You are currently subscribed to ntdev as: xxxxx@pstech.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Lori,
Thanks for the reply.
We had tried using the NT 4.0 serial.sys, but my driver requires data to
be acknowledged in 8 milliseconds and calling another driver or even using a
DPC didn’t work. We were forced to do this in the ISR. This is why I need
to grab the uart hardware for my driver.

Larry

----- Original Message -----
From: “Lori Pape”
To: “NT Developers Interest List”
Sent: Tuesday, November 28, 2000 7:33 PM
Subject: [ntdev] RE: grabbing an RS232 port from serial.sys

> It is possible to acquire the port on Win2k using a root-enumerated driver
> that runs before serial.sys, and disabling the port so that serial.sys
knows
> to ignore it. Unfortunately, that will work only on APM machines, not
ACPI.
> With ACPI, disabling the port causes the ACPI filter to actually power
down
> the port, which causes your attached device to stop working.
>
> The solution is to conform to the new serial architecture used in Win2k
and
> rewrite your driver as a client of serial.sys. This will work for both APM
> and ACPI machines. You can issue read/write commands to the serial port
from
> your driver, similar to the way that sermouse.sys does (the new rewritten
> version of sermouse for Win2k).
>
> Lori
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Larry Harmon
> Sent: Tuesday, November 28, 2000 7:05 AM
> To: NT Developers Interest List
> Subject: [ntdev] grabbing an RS232 port from serial.sys
>
>
> I am trying to port a NT 4.0 driver to Win2k. The NT 4.0 driver grabbed a
> COM port hardware before Serial.sys had a chance to run.
> I understand that I can’t use this technique with Win2k, but don’t
> understand how to do an equivelent in Win2K. My best guess is that I need
> to somehow tell with serenum.sys to release the rs232 port I want then
have
> a custom enumerator grab the port for my driver. I am still a bit fuzzy
on
> the concepts.
>
> I need to have direct access to the hardware because my ISR needs to do
some
> special time critical operations.
>
> Can someone help me out?
>
> Larry
> —
> You are currently subscribed to ntdev as: xxxxx@pstech.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@hrdcorp.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>

Can you live with working with APM only (not ACPI)? If so, try this:

a) Make your driver a root-enumerated driver
b) Have it start at Boot time (standard reg entries) so it can grab the
resources for the port’s IRQ and I/O range.
c) Set the desired comx port to Disabled via the registry (DisablePort
REG_DWORD 1)
d) Have your driver create an FDO, and respond to the PnP and power Irps as
you would expect for a full blown PnP driver.

That worked for me but only for APM machines, and allowed the driver to have
its own ISR and access the UART directly. Unfortunately, my client needed
their device to work on both APM and ACPI so I was not able to use this.

Hope this helps,
Lori

xxxxx@pstech.com http://www.pstech.com

Lori,
Thanks for the reply.
We had tried using the NT 4.0 serial.sys, but my driver requires data to
be acknowledged in 8 milliseconds and calling another driver or even using a
DPC didn’t work. We were forced to do this in the ISR. This is why I need
to grab the uart hardware for my driver.

Larry

----- Original Message -----
From: “Lori Pape”
To: “NT Developers Interest List”
Sent: Tuesday, November 28, 2000 7:33 PM
Subject: [ntdev] RE: grabbing an RS232 port from serial.sys

> It is possible to acquire the port on Win2k using a root-enumerated driver
> that runs before serial.sys, and disabling the port so that serial.sys
knows
> to ignore it. Unfortunately, that will work only on APM machines, not
ACPI.
> With ACPI, disabling the port causes the ACPI filter to actually power
down
> the port, which causes your attached device to stop working.
>
> The solution is to conform to the new serial architecture used in Win2k
and
> rewrite your driver as a client of serial.sys. This will work for both APM
> and ACPI machines. You can issue read/write commands to the serial port
from
> your driver, similar to the way that sermouse.sys does (the new rewritten
> version of sermouse for Win2k).
>
> Lori
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Larry Harmon
> Sent: Tuesday, November 28, 2000 7:05 AM
> To: NT Developers Interest List
> Subject: [ntdev] grabbing an RS232 port from serial.sys
>
>
> I am trying to port a NT 4.0 driver to Win2k. The NT 4.0 driver grabbed a
> COM port hardware before Serial.sys had a chance to run.
> I understand that I can’t use this technique with Win2k, but don’t
> understand how to do an equivelent in Win2K. My best guess is that I need
> to somehow tell with serenum.sys to release the rs232 port I want then
have
> a custom enumerator grab the port for my driver. I am still a bit fuzzy
on
> the concepts.
>
> I need to have direct access to the hardware because my ISR needs to do
some
> special time critical operations.
>
> Can someone help me out?
>
> Larry
> —
> You are currently subscribed to ntdev as: xxxxx@pstech.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@hrdcorp.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>


You are currently subscribed to ntdev as: xxxxx@bsi.si
To unsubscribe send a blank email to $subst(‘Email.Unsub’)
–WWWh_tE(–

–WWWpyBZTc-,l='n–hDpfz9j/R+4N5FZUQRx4c,–

It is possible to acquire the port on Win2k using a root-enumerated driver
that runs before serial.sys, and disabling the port so that serial.sys knows
to ignore it. Unfortunately, that will work only on APM machines, not ACPI.
With ACPI, disabling the port causes the ACPI filter to actually power down
the port, which causes your attached device to stop working.

The solution is to conform to the new serial architecture used in Win2k and
rewrite your driver as a client of serial.sys. This will work for both APM
and ACPI machines. You can issue read/write commands to the serial port from
your driver, similar to the way that sermouse.sys does (the new rewritten
version of sermouse for Win2k).

Lori

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Larry Harmon
Sent: Tuesday, November 28, 2000 7:05 AM
To: NT Developers Interest List
Subject: [ntdev] grabbing an RS232 port from serial.sys

I am trying to port a NT 4.0 driver to Win2k. The NT 4.0 driver grabbed a
COM port hardware before Serial.sys had a chance to run.
I understand that I can’t use this technique with Win2k, but don’t
understand how to do an equivelent in Win2K. My best guess is that I need
to somehow tell with serenum.sys to release the rs232 port I want then have
a custom enumerator grab the port for my driver. I am still a bit fuzzy on
the concepts.

I need to have direct access to the hardware because my ISR needs to do some
special time critical operations.

Can someone help me out?

Larry

You are currently subscribed to ntdev as: xxxxx@pstech.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)


You are currently subscribed to ntdev as: xxxxx@bsi.si
To unsubscribe send a blank email to $subst(‘Email.Unsub’)
–WWWaPaw/+P2HxD97ZfBr–

–WWWie9–

I know that, compared to other operating systems, NT’s interrupt handling is
rather sloppy and slow, but to not be able to acknowledge a serial port
within 8ms within a DPC sound rather bizarre. Why can’t the DPC execute
within this time period?

Greg

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Larry Harmon
Sent: Wednesday, November 29, 2000 2:56 AM
To: NT Developers Interest List
Subject: [ntdev] RE: grabbing an RS232 port from serial.sys

Lori,
Thanks for the reply.
We had tried using the NT 4.0 serial.sys, but my driver
requires data to
be acknowledged in 8 milliseconds and calling another driver or
even using a
DPC didn’t work. We were forced to do this in the ISR. This is
why I need
to grab the uart hardware for my driver.

Larry