Multiple Monolithic Serial Drivers

is it possible to have multiple (monolithic) serial drivers installed and running on one machine? i’m assuming no because …

  1. i can’t get seem to get one installed without disabling the other
  2. the ISR would have to be different for the different ports/interrupts

any assistance is much appreciated…

Jason

Yes, it is possible ot have a different serial drivers on the machine at the same time. Each driver controls its own hardware though. You cannot have 2 drivers controlling the same device instance (like COM1), rather one controls COM1, another controls COM2.

d

Doron,

thanks for the reply. with renewed optimism i attacked the INF file again and the system now appears to have the desired result - my driver on COM1, standard ms driver on other com ports. however, i added a custom IOCTL in the driver so an application can confirm that it is installed and it seems to respond on all of the com ports. when i remove my driver the new IOCTL returns an error as expected. also, the driver install doesn’t really kick in until after a reboot, but the device manager doesn’t request one?

for the time being i’m installing via the device manager, though i’d like to do it programmatically eventually, which brings me to another question - how can i make UpdateDriverForPlugAndPlayDevices() update a driver for an existing port rather than adding a new one?

i’ve attached my INF file (slimmed down from msports.inf) for reference in case the problem lies there - thanks again!

; AMTSERIAL.INF
; Copyright (c) 2007 AmTote International

[version]
LayoutFile=layout.inf
signature=“$CHICAGO$”
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%AMT%
DriverVer=05/10/2007,0.1.2605.0

[DestinationDirs]
DefaultDestDir = 11 ;LDID_SYS
ComPort.NT.Copy = 12 ;DIRID_DRIVERS
SerialEnumerator.NT.Copy=12 ;DIRID_DRIVERS

; Install class “Ports”
;----------------------------------------------------------
[ClassInstall]
AddReg=PortsClass.AddReg

[PortsClass.AddReg]
HKR,%PortsClassName%

[ClassInstall32.NT]
AddReg=PortsClass.NT.AddReg

[PortsClass.NT.AddReg]
HKR,%PortsClassName%
HKR,Icon,“-23”
HKR,Installer32,“MsPorts.Dll,PortsClassInstaller”

[ControlFlags]
ExcludeFromSelect=MF\EISA_HWP1C10_DEV0,MF\EISA_HWP1C10_DEV1

; Drivers
;----------------------------------------------------------
[Manufacturer]
%Std%=Std

[Std]
%*PNP0500.DeviceDesc% = ComPort, *PNP0500, *PNP0501 ; Communications Port

; COM sections
;----------------------------------------------------------
[ComPort]
CopyFiles=ComPort.Copy
AddReg=ComPort.AddReg
LogConfig=c14,c1a,c23,c2a,c34,c3a,c43,c4a,caa

[ComPort.Copy]
serial.vxd
serialui.dll

[ComPort.AddReg]
HKR,PortSubClass,1,01

[ComPort.NT]
CopyFiles=ComPort.NT.Copy
AddReg=ComPort.AddReg, ComPort.NT.AddReg
LogConfig=c14,c1a,c23,c2a,c34,c3a,c43,c4a,caa
SyssetupPnPFlags = 1

[ComPort.NT.HW]
AddReg=ComPort.NT.HW.AddReg

[ComPort.NT.Copy]
amtserial.sys
serenum.sys

[ComPort.NT.AddReg]
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”
; Uncomment the following line if you want to override the advanced dialog for
; your device. See msports.h for protoype of OverrideAdvancedFunction
; HKR,EnumAdvancedDialog,“yourdll.dll,OverrideAdvancedFunction”

[ComPort.NT.HW.AddReg]
HKR,“UpperFilters”,0x00010000,“serenum”

; The serial enumerator by itself, so that other INFs can install serenum w/out amtserial.sys
; -------------------------------------------------------

[SerialEnumerator.NT]
CopyFiles=SerialEnumerator.NT.Copy

[SerialEnumerator.NT.Copy]
serenum.sys

;-------------- Service installation
; Port Driver (function driver for this device)
[ComPort.NT.Services]
AddService = Serial, 0x00000002, Serial_Service_Inst, Serial_EventLog_Inst
AddService = Serenum,Serenum_Service_Inst

[MultiComPort.NT.Services]
AddService = Serial, 0x00000002, Serial_Service_Inst, Serial_EventLog_Inst
AddService = Serenum,Serenum_Service_Inst

[SerialEnumerator.NT.Services]
AddService = Serenum,Serenum_Service_Inst

; -------------- Serial Port Driver install sections
[Serial_Service_Inst]
DisplayName = %Serial.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 1 ; SERVICE_SYSTEM_START (this driver may do detection)
ErrorControl = 0 ; SERVICE_ERROR_IGNORE
ServiceBinary = %12%\amtserial.sys
LoadOrderGroup = Extended base

; -------------- Serenum Driver install section
[Serenum_Service_Inst]
DisplayName = %Serenum.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\serenum.sys
LoadOrderGroup = PNP Filter

[Serial_EventLog_Inst]
AddReg = Serial_EventLog_AddReg

[Serial_EventLog_AddReg]
HKR,EventMessageFile,0x00020000,“%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\amtserial.sys”
HKR,TypesSupported,0x00010001,7

[*pnp0500.det]
AddReg=Ports.AddReg,DevMap.AddReg

; The following sections are COM port resource configs.
; Section name format means:
; Char 1 = c (COM port)
; Char 2 = I/O config: 1 (3f8), 2 (2f8), 3 (3e8), 4 (2e8), a (any)
; Char 3 = IRQ config: #, a (any)

[c14] ; COM1,IRQ4
ConfigPriority=HARDRECONFIG
IOConfig=3f8-3ff(3ff::slight_smile:
IRQConfig=S:4

[c1a] ; COM1, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=3f8-3ff(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c23] ; COM2, IRQ3
ConfigPriority=HARDRECONFIG
IOConfig=2f8-2ff(3ff::slight_smile:
IRQConfig=S:3

[c2a] ; COM2, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=2f8-2ff(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c34] ; COM3, IRQ4
ConfigPriority=HARDRECONFIG
IOConfig=3e8-3ef(3ff::slight_smile:
IRQConfig=S:4

[c3a] ; COM3, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=3e8-3ef(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c43] ; COM4, IRQ3
ConfigPriority=HARDRECONFIG
IOConfig=2e8-2ef(3ff::slight_smile:
IRQConfig=S:3,5

[c4a] ; COM4, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=2e8-2ef(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[caa] ; Any base, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=8@100-ffff%fff8(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

; End COM port LogConfig sections

[ComPort.PosDup]
*PNP0500,*PNP0501

[ComPort.NT.PosDup]
*PNP0500,*PNP0501

[DevMap.AddReg]
HKLM,hardware\devicemap\serialcomm,COM1,COM1
HKLM,hardware\devicemap\serialcomm,COM2,COM2

; “NoDrv” section: We do not yet support these port devices.
;----------------------------------------------------------
[NoDrv]

; User readable strings
;----------------------------------------------------------
[Strings]
AMT = “Amtote”
Std = “(Standard port types)”
PortsClassName = “Ports (COM & LPT)”

*PNP0500.DeviceDesc = “Communications Port”
Serial.SVCDESC = “Serial port driver”
Serenum.SVCDESC = “Serenum Filter Driver”

Don’t name your service “serial” (remember the name of the service does
not necessarily map 1:1 with the name of the binary). Change this

AddService = Serial, 0x00000002, Serial_Service_Inst,
Serial_EventLog_Inst

To
AddService = AmtSerial, 0x00000002, Serial_Service_Inst,
Serial_EventLog_Inst

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@Amtote.com
Sent: Thursday, May 10, 2007 12:20 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Multiple Monolithic Serial Drivers

Doron,

thanks for the reply. with renewed optimism i attacked the INF file
again and the system now appears to have the desired result - my driver
on COM1, standard ms driver on other com ports. however, i added a
custom IOCTL in the driver so an application can confirm that it is
installed and it seems to respond on all of the com ports. when i
remove my driver the new IOCTL returns an error as expected. also, the
driver install doesn’t really kick in until after a reboot, but the
device manager doesn’t request one?

for the time being i’m installing via the device manager, though i’d
like to do it programmatically eventually, which brings me to another
question - how can i make UpdateDriverForPlugAndPlayDevices() update a
driver for an existing port rather than adding a new one?

i’ve attached my INF file (slimmed down from msports.inf) for reference
in case the problem lies there - thanks again!

; AMTSERIAL.INF
; Copyright (c) 2007 AmTote International

[version]
LayoutFile=layout.inf
signature=“$CHICAGO$”
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%AMT%
DriverVer=05/10/2007,0.1.2605.0

[DestinationDirs]
DefaultDestDir = 11 ;LDID_SYS
ComPort.NT.Copy = 12 ;DIRID_DRIVERS
SerialEnumerator.NT.Copy=12 ;DIRID_DRIVERS

; Install class “Ports”
;----------------------------------------------------------
[ClassInstall]
AddReg=PortsClass.AddReg

[PortsClass.AddReg]
HKR,%PortsClassName%

[ClassInstall32.NT]
AddReg=PortsClass.NT.AddReg

[PortsClass.NT.AddReg]
HKR,%PortsClassName%
HKR,Icon,“-23”
HKR,Installer32,“MsPorts.Dll,PortsClassInstaller”

[ControlFlags]
ExcludeFromSelect=MF\EISA_HWP1C10_DEV0,MF\EISA_HWP1C10_DEV1

; Drivers
;----------------------------------------------------------
[Manufacturer]
%Std%=Std

[Std]
%*PNP0500.DeviceDesc% = ComPort, *PNP0500, *PNP0501 ; Communications
Port

; COM sections
;----------------------------------------------------------
[ComPort]
CopyFiles=ComPort.Copy
AddReg=ComPort.AddReg
LogConfig=c14,c1a,c23,c2a,c34,c3a,c43,c4a,caa

[ComPort.Copy]
serial.vxd
serialui.dll

[ComPort.AddReg]
HKR,PortSubClass,1,01

[ComPort.NT]
CopyFiles=ComPort.NT.Copy
AddReg=ComPort.AddReg, ComPort.NT.AddReg
LogConfig=c14,c1a,c23,c2a,c34,c3a,c43,c4a,caa
SyssetupPnPFlags = 1

[ComPort.NT.HW]
AddReg=ComPort.NT.HW.AddReg

[ComPort.NT.Copy]
amtserial.sys
serenum.sys

[ComPort.NT.AddReg]
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”
; Uncomment the following line if you want to override the advanced
dialog for
; your device. See msports.h for protoype of OverrideAdvancedFunction
; HKR,EnumAdvancedDialog,“yourdll.dll,OverrideAdvancedFunction”

[ComPort.NT.HW.AddReg]
HKR,“UpperFilters”,0x00010000,“serenum”

; The serial enumerator by itself, so that other INFs can install
serenum w/out amtserial.sys
; -------------------------------------------------------

[SerialEnumerator.NT]
CopyFiles=SerialEnumerator.NT.Copy

[SerialEnumerator.NT.Copy]
serenum.sys

;-------------- Service installation
; Port Driver (function driver for this device)
[ComPort.NT.Services]
AddService = Serial, 0x00000002, Serial_Service_Inst,
Serial_EventLog_Inst
AddService = Serenum,Serenum_Service_Inst

[MultiComPort.NT.Services]
AddService = Serial, 0x00000002, Serial_Service_Inst,
Serial_EventLog_Inst
AddService = Serenum,Serenum_Service_Inst

[SerialEnumerator.NT.Services]
AddService = Serenum,Serenum_Service_Inst

; -------------- Serial Port Driver install sections
[Serial_Service_Inst]
DisplayName = %Serial.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 1 ; SERVICE_SYSTEM_START (this driver may
do detection)
ErrorControl = 0 ; SERVICE_ERROR_IGNORE
ServiceBinary = %12%\amtserial.sys
LoadOrderGroup = Extended base

; -------------- Serenum Driver install section
[Serenum_Service_Inst]
DisplayName = %Serenum.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\serenum.sys
LoadOrderGroup = PNP Filter

[Serial_EventLog_Inst]
AddReg = Serial_EventLog_AddReg

[Serial_EventLog_AddReg]
HKR,EventMessageFile,0x00020000,“%%SystemRoot%%\System32\IoLogMsg.dll;%
%SystemRoot%%\System32\drivers\amtserial.sys”
HKR,TypesSupported,0x00010001,7

[*pnp0500.det]
AddReg=Ports.AddReg,DevMap.AddReg

; The following sections are COM port resource configs.
; Section name format means:
; Char 1 = c (COM port)
; Char 2 = I/O config: 1 (3f8), 2 (2f8), 3 (3e8), 4 (2e8), a (any)
; Char 3 = IRQ config: #, a (any)

[c14] ; COM1,IRQ4
ConfigPriority=HARDRECONFIG
IOConfig=3f8-3ff(3ff::slight_smile:
IRQConfig=S:4

[c1a] ; COM1, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=3f8-3ff(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c23] ; COM2, IRQ3
ConfigPriority=HARDRECONFIG
IOConfig=2f8-2ff(3ff::slight_smile:
IRQConfig=S:3

[c2a] ; COM2, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=2f8-2ff(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c34] ; COM3, IRQ4
ConfigPriority=HARDRECONFIG
IOConfig=3e8-3ef(3ff::slight_smile:
IRQConfig=S:4

[c3a] ; COM3, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=3e8-3ef(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c43] ; COM4, IRQ3
ConfigPriority=HARDRECONFIG
IOConfig=2e8-2ef(3ff::slight_smile:
IRQConfig=S:3,5

[c4a] ; COM4, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=2e8-2ef(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[caa] ; Any base, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=8@100-ffff%fff8(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

; End COM port LogConfig sections

[ComPort.PosDup]
*PNP0500,*PNP0501

[ComPort.NT.PosDup]
*PNP0500,*PNP0501

[DevMap.AddReg]
HKLM,hardware\devicemap\serialcomm,COM1,COM1
HKLM,hardware\devicemap\serialcomm,COM2,COM2

; “NoDrv” section: We do not yet support these port devices.
;----------------------------------------------------------
[NoDrv]

; User readable strings
;----------------------------------------------------------
[Strings]
AMT = “Amtote”
Std = “(Standard port types)”
PortsClassName = “Ports (COM & LPT)”

*PNP0500.DeviceDesc = “Communications Port”
Serial.SVCDESC = “Serial port driver”
Serenum.SVCDESC = “Serenum Filter Driver”


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

DOH! made the change, tried it out - ran into “the name is alrady in use as either a service name or a service display name”. sounds like i’ve got some residual junk. so i rolled back the driver to the standard ms driver, removed the file from the drivers directory, searched the registry for amtserial and removed a few suspicious items, rebooted, used sc query amtserial to confirm driver not loaded and tried again - same problem. i’d hate to have to wipe the machine to get a clean attempt - am i missing something obvious (again)?

Jason

The error is telling you what to change. the description of your driver matches another descriiption on the maching. Uninstall the amtserial service (easiest way is to delete the key in the registry and the reboot (rebooting is required!)). Change the service description in the INF

from
Serial.SVCDESC = “Serial port driver”

to
Serial.SVCDESC = “AMT Serial port driver”

make sure your old INF is gone, try again w/the new INF

d

Makes perfect sense, thanks. Unfortunately when I tried this I got back to the initial problem - the driver installs OK, forces a reboot, my com port is ok, but the others (with the normal serial driver) are non-functional. i thought about what else could conflict as I made the bare minimum number of changes to the WDM serial driver sample and realized I didn’t change the GUID. i went ahead and did that, uninstalled the driver, removed AMTserial stuff from the registry, rebooted, and tried the install again. still no luck - windows still doesn’t want to let both drivers run [on diff. ports]. “sc query” shows that amtserial is running and serial is stopped.

any other suggestions for what could cause this? i attached modified INF in case there are still problems there…

; AMTSERIAL.INF
; Copyright (c) 2007 AmTote International

[version]
LayoutFile=layout.inf
signature=“$CHICAGO$”
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%AMT%
DriverVer=05/10/2007,0.1.2605.0

[DestinationDirs]
DefaultDestDir = 11 ;LDID_SYS
ComPort.NT.Copy = 12 ;DIRID_DRIVERS
SerialEnumerator.NT.Copy=12 ;DIRID_DRIVERS

; Install class “Ports”
;----------------------------------------------------------
[ClassInstall]
AddReg=PortsClass.AddReg

[PortsClass.AddReg]
HKR,%PortsClassName%

[ClassInstall32.NT]
AddReg=PortsClass.NT.AddReg

[PortsClass.NT.AddReg]
HKR,%PortsClassName%
HKR,Icon,“-23”
HKR,Installer32,“MsPorts.Dll,PortsClassInstaller”

[ControlFlags]
ExcludeFromSelect=MF\EISA_HWP1C10_DEV0,MF\EISA_HWP1C10_DEV1

; Drivers
;----------------------------------------------------------
[Manufacturer]
%Std%=Std

[Std]
%*PNP0500.DeviceDesc% = ComPort, *PNP0500, *PNP0501 ; Communications Port

; COM sections
;----------------------------------------------------------
[ComPort]
CopyFiles=ComPort.Copy
AddReg=ComPort.AddReg
LogConfig=c14,c1a,c23,c2a,c34,c3a,c43,c4a,caa

[ComPort.Copy]
serial.vxd
serialui.dll

[ComPort.AddReg]
HKR,PortSubClass,1,01

[ComPort.NT]
CopyFiles=ComPort.NT.Copy
AddReg=ComPort.AddReg, ComPort.NT.AddReg
LogConfig=c14,c1a,c23,c2a,c34,c3a,c43,c4a,caa
SyssetupPnPFlags = 1

[ComPort.NT.HW]
AddReg=ComPort.NT.HW.AddReg

[ComPort.NT.Copy]
amtserial.sys
serenum.sys

[ComPort.NT.AddReg]
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”
; Uncomment the following line if you want to override the advanced dialog for
; your device. See msports.h for protoype of OverrideAdvancedFunction
; HKR,EnumAdvancedDialog,“yourdll.dll,OverrideAdvancedFunction”

[ComPort.NT.HW.AddReg]
HKR,“UpperFilters”,0x00010000,“serenum”

; The serial enumerator by itself, so that other INFs can install serenum w/out amtserial.sys
; -------------------------------------------------------

[SerialEnumerator.NT]
CopyFiles=SerialEnumerator.NT.Copy

[SerialEnumerator.NT.Copy]
serenum.sys

;-------------- Service installation
; Port Driver (function driver for this device)
[ComPort.NT.Services]
AddService = AMTSerial, 0x00000002, Serial_Service_Inst, Serial_EventLog_Inst
AddService = Serenum,Serenum_Service_Inst

[SerialEnumerator.NT.Services]
AddService = Serenum,Serenum_Service_Inst

; -------------- Serial Port Driver install sections
[Serial_Service_Inst]
DisplayName = %Serial.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 1 ; SERVICE_SYSTEM_START (this driver may do detection)
ErrorControl = 0 ; SERVICE_ERROR_IGNORE
ServiceBinary = %12%\amtserial.sys
LoadOrderGroup = Extended base

; -------------- Serenum Driver install section
[Serenum_Service_Inst]
DisplayName = %Serenum.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\serenum.sys
LoadOrderGroup = PNP Filter

[Serial_EventLog_Inst]
AddReg = Serial_EventLog_AddReg

[Serial_EventLog_AddReg]
HKR,EventMessageFile,0x00020000,“%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\amtserial.sys”
HKR,TypesSupported,0x00010001,7

[*pnp0500.det]
AddReg=Ports.AddReg,DevMap.AddReg

; The following sections are COM port resource configs.
; Section name format means:
; Char 1 = c (COM port)
; Char 2 = I/O config: 1 (3f8), 2 (2f8), 3 (3e8), 4 (2e8), a (any)
; Char 3 = IRQ config: #, a (any)

[c14] ; COM1,IRQ4
ConfigPriority=HARDRECONFIG
IOConfig=3f8-3ff(3ff::slight_smile:
IRQConfig=S:4

[c1a] ; COM1, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=3f8-3ff(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c23] ; COM2, IRQ3
ConfigPriority=HARDRECONFIG
IOConfig=2f8-2ff(3ff::slight_smile:
IRQConfig=S:3

[c2a] ; COM2, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=2f8-2ff(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c34] ; COM3, IRQ4
ConfigPriority=HARDRECONFIG
IOConfig=3e8-3ef(3ff::slight_smile:
IRQConfig=S:4

[c3a] ; COM3, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=3e8-3ef(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c43] ; COM4, IRQ3
ConfigPriority=HARDRECONFIG
IOConfig=2e8-2ef(3ff::slight_smile:
IRQConfig=S:3,5

[c4a] ; COM4, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=2e8-2ef(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[caa] ; Any base, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=8@100-ffff%fff8(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

; End COM port LogConfig sections

[ComPort.PosDup]
*PNP0500,*PNP0501

[ComPort.NT.PosDup]
*PNP0500,*PNP0501

[DevMap.AddReg]
HKLM,hardware\devicemap\serialcomm,COM1,COM1
HKLM,hardware\devicemap\serialcomm,COM2,COM2

; “NoDrv” section: We do not yet support these port devices.
;----------------------------------------------------------
[NoDrv]

; User readable strings
;----------------------------------------------------------
[Strings]
AMT = “Amtote”
Std = “(Standard port types)”
PortsClassName = “Ports (COM & LPT)”

*PNP0500.DeviceDesc = “Communications Port”

Serial.SVCDESC = “AMT Serial port driver”
Serenum.SVCDESC = “Serenum Filter Driver”

Did you make sure that the inbox serial service is back in its original
state? For instance, is the imagepath for the serial.sys service still
pointing to serial.sys? You might want to flatten and reinstall the box
b/c who knows what leftover bits from previous failed installs are on
the machine and now disrupting your efforts to install your driver.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@Amtote.com
Sent: Friday, May 11, 2007 7:03 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Multiple Monolithic Serial Drivers

Makes perfect sense, thanks. Unfortunately when I tried this I got back
to the initial problem - the driver installs OK, forces a reboot, my com
port is ok, but the others (with the normal serial driver) are
non-functional. i thought about what else could conflict as I made the
bare minimum number of changes to the WDM serial driver sample and
realized I didn’t change the GUID. i went ahead and did that,
uninstalled the driver, removed AMTserial stuff from the registry,
rebooted, and tried the install again. still no luck - windows still
doesn’t want to let both drivers run [on diff. ports]. “sc query” shows
that amtserial is running and serial is stopped.

any other suggestions for what could cause this? i attached modified
INF in case there are still problems there…

; AMTSERIAL.INF
; Copyright (c) 2007 AmTote International

[version]
LayoutFile=layout.inf
signature=“$CHICAGO$”
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%AMT%
DriverVer=05/10/2007,0.1.2605.0

[DestinationDirs]
DefaultDestDir = 11 ;LDID_SYS
ComPort.NT.Copy = 12 ;DIRID_DRIVERS
SerialEnumerator.NT.Copy=12 ;DIRID_DRIVERS

; Install class “Ports”
;----------------------------------------------------------
[ClassInstall]
AddReg=PortsClass.AddReg

[PortsClass.AddReg]
HKR,%PortsClassName%

[ClassInstall32.NT]
AddReg=PortsClass.NT.AddReg

[PortsClass.NT.AddReg]
HKR,%PortsClassName%
HKR,Icon,“-23”
HKR,Installer32,“MsPorts.Dll,PortsClassInstaller”

[ControlFlags]
ExcludeFromSelect=MF\EISA_HWP1C10_DEV0,MF\EISA_HWP1C10_DEV1

; Drivers
;----------------------------------------------------------
[Manufacturer]
%Std%=Std

[Std]
%*PNP0500.DeviceDesc% = ComPort, *PNP0500, *PNP0501 ; Communications
Port

; COM sections
;----------------------------------------------------------
[ComPort]
CopyFiles=ComPort.Copy
AddReg=ComPort.AddReg
LogConfig=c14,c1a,c23,c2a,c34,c3a,c43,c4a,caa

[ComPort.Copy]
serial.vxd
serialui.dll

[ComPort.AddReg]
HKR,PortSubClass,1,01

[ComPort.NT]
CopyFiles=ComPort.NT.Copy
AddReg=ComPort.AddReg, ComPort.NT.AddReg
LogConfig=c14,c1a,c23,c2a,c34,c3a,c43,c4a,caa
SyssetupPnPFlags = 1

[ComPort.NT.HW]
AddReg=ComPort.NT.HW.AddReg

[ComPort.NT.Copy]
amtserial.sys
serenum.sys

[ComPort.NT.AddReg]
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”
; Uncomment the following line if you want to override the advanced
dialog for
; your device. See msports.h for protoype of OverrideAdvancedFunction
; HKR,EnumAdvancedDialog,“yourdll.dll,OverrideAdvancedFunction”

[ComPort.NT.HW.AddReg]
HKR,“UpperFilters”,0x00010000,“serenum”

; The serial enumerator by itself, so that other INFs can install
serenum w/out amtserial.sys
; -------------------------------------------------------

[SerialEnumerator.NT]
CopyFiles=SerialEnumerator.NT.Copy

[SerialEnumerator.NT.Copy]
serenum.sys

;-------------- Service installation
; Port Driver (function driver for this device)
[ComPort.NT.Services]
AddService = AMTSerial, 0x00000002, Serial_Service_Inst,
Serial_EventLog_Inst
AddService = Serenum,Serenum_Service_Inst

[SerialEnumerator.NT.Services]
AddService = Serenum,Serenum_Service_Inst

; -------------- Serial Port Driver install sections
[Serial_Service_Inst]
DisplayName = %Serial.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 1 ; SERVICE_SYSTEM_START (this driver may
do detection)
ErrorControl = 0 ; SERVICE_ERROR_IGNORE
ServiceBinary = %12%\amtserial.sys
LoadOrderGroup = Extended base

; -------------- Serenum Driver install section
[Serenum_Service_Inst]
DisplayName = %Serenum.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\serenum.sys
LoadOrderGroup = PNP Filter

[Serial_EventLog_Inst]
AddReg = Serial_EventLog_AddReg

[Serial_EventLog_AddReg]
HKR,EventMessageFile,0x00020000,“%%SystemRoot%%\System32\IoLogMsg.dll;%
%SystemRoot%%\System32\drivers\amtserial.sys”
HKR,TypesSupported,0x00010001,7

[*pnp0500.det]
AddReg=Ports.AddReg,DevMap.AddReg

; The following sections are COM port resource configs.
; Section name format means:
; Char 1 = c (COM port)
; Char 2 = I/O config: 1 (3f8), 2 (2f8), 3 (3e8), 4 (2e8), a (any)
; Char 3 = IRQ config: #, a (any)

[c14] ; COM1,IRQ4
ConfigPriority=HARDRECONFIG
IOConfig=3f8-3ff(3ff::slight_smile:
IRQConfig=S:4

[c1a] ; COM1, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=3f8-3ff(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c23] ; COM2, IRQ3
ConfigPriority=HARDRECONFIG
IOConfig=2f8-2ff(3ff::slight_smile:
IRQConfig=S:3

[c2a] ; COM2, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=2f8-2ff(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c34] ; COM3, IRQ4
ConfigPriority=HARDRECONFIG
IOConfig=3e8-3ef(3ff::slight_smile:
IRQConfig=S:4

[c3a] ; COM3, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=3e8-3ef(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[c43] ; COM4, IRQ3
ConfigPriority=HARDRECONFIG
IOConfig=2e8-2ef(3ff::slight_smile:
IRQConfig=S:3,5

[c4a] ; COM4, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=2e8-2ef(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

[caa] ; Any base, any IRQ
ConfigPriority=HARDRECONFIG
IOConfig=8@100-ffff%fff8(3ff::slight_smile:
IRQConfig=S:3,4,5,7,9,10,11,12,14,15

; End COM port LogConfig sections

[ComPort.PosDup]
*PNP0500,*PNP0501

[ComPort.NT.PosDup]
*PNP0500,*PNP0501

[DevMap.AddReg]
HKLM,hardware\devicemap\serialcomm,COM1,COM1
HKLM,hardware\devicemap\serialcomm,COM2,COM2

; “NoDrv” section: We do not yet support these port devices.
;----------------------------------------------------------
[NoDrv]

; User readable strings
;----------------------------------------------------------
[Strings]
AMT = “Amtote”
Std = “(Standard port types)”
PortsClassName = “Ports (COM & LPT)”

*PNP0500.DeviceDesc = “Communications Port”

Serial.SVCDESC = “AMT Serial port driver”
Serenum.SVCDESC = “Serenum Filter Driver”


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

i checked the imagepath in the registry and it looks good - System32\DRIVERS\serial.sys

i’ll try to get my hands on another machine with multiple com ports or wipe the one i’ve got. in the meantime, i’d like to pose a semi-hypothetical question - if i took the serial.sys driver, copied the file and renamed it xxxserial.sys, created an ini file just like the one in prev. msg in this list thread, would i be able to install it on just one com port or would anything else need to be done? i have a suspicion i’ve got multiple newbie blunders going on… :slight_smile:

-----Original Message-----
Did you make sure that the inbox serial service is back in its original
state? For instance, is the imagepath for the serial.sys service still
pointing to serial.sys? You might want to flatten and reinstall the box
b/c who knows what leftover bits from previous failed installs are on
the machine and now disrupting your efforts to install your driver.

d

I think so, but your proposal is not big on details. Copying the file
name is not enough you need to install the service itself via the INF
and then install that service on the 2nd com port.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@Amtote.com
Sent: Friday, May 11, 2007 10:51 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Multiple Monolithic Serial Drivers

i checked the imagepath in the registry and it looks good -
System32\DRIVERS\serial.sys

i’ll try to get my hands on another machine with multiple com ports or
wipe the one i’ve got. in the meantime, i’d like to pose a
semi-hypothetical question - if i took the serial.sys driver, copied the
file and renamed it xxxserial.sys, created an ini file just like the one
in prev. msg in this list thread, would i be able to install it on just
one com port or would anything else need to be done? i have a suspicion
i’ve got multiple newbie blunders going on… :slight_smile:

-----Original Message-----
Did you make sure that the inbox serial service is back in its original
state? For instance, is the imagepath for the serial.sys service still
pointing to serial.sys? You might want to flatten and reinstall the box
b/c who knows what leftover bits from previous failed installs are on
the machine and now disrupting your efforts to install your driver.

d


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Doron, et al:

tried it on a different machine and had the same problem - both services don’t want to run at the same time. i didn’t bother trying to get it onto a valid comport, just let a quick install create a new com port and startup the service. “sc query xxx” tells me that one service, such as amtserial.sys, is running, while the other, serial.sys, is stopped. event log says that it won’t start and returns error code 31. i can issue “sc start serial.sys” and then it says they are both running but the com ports don’t seem to pick up on it.

it seems to me that if it is possible to get both services coming up at startup, then there must still be something wrong with my .INF file.

any other ideas?

thanx,
Jason

ps - as to hypothetical proposal - yes, i meant copying the [serial driver] file and performing installation using the INF file i listed in previous post.

-----Original Message-----
I think so, but your proposal is not big on details. Copying the file
name is not enough you need to install the service itself via the INF
and then install that service on the 2nd com port.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@Amtote.com
Sent: Friday, May 11, 2007 10:51 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Multiple Monolithic Serial Drivers

i checked the imagepath in the registry and it looks good -
System32\DRIVERS\serial.sys

i’ll try to get my hands on another machine with multiple com ports or
wipe the one i’ve got. in the meantime, i’d like to pose a
semi-hypothetical question - if i took the serial.sys driver, copied the
file and renamed it xxxserial.sys, created an ini file just like the one
in prev. msg in this list thread, would i be able to install it on just
one com port or would anything else need to be done? i have a suspicion
i’ve got multiple newbie blunders going on… :slight_smile:

-----Original Message-----
Did you make sure that the inbox serial service is back in its original
state? For instance, is the imagepath for the serial.sys service still
pointing to serial.sys? You might want to flatten and reinstall the box
b/c who knows what leftover bits from previous failed installs are on
the machine and now disrupting your efforts to install your driver.

d