Why Smart card reader is not listed by the resource manager ?

Posted: 10-13-2006, 07:53 AM
Hi,

I have written a smart card reader driver using the ddk sample pscr for
WinXP. When the WinAPI 'SCardListReaders' is called, its not listing my
reader. But the installation and the registry entries for my reader
driver is perfect and as described by the DDK help. The resource manager
service has been started also. But one thing i have observed is, the
IRP's related to Power management are not coming to the driver (Is this
because, the member PowerMgmtSupport' in the card capabilities is not at
all initialized ?). IRP_MJ_START_DEVICE and other IRP's are coming and
also, another minor IRP, IRP_MN_QUERY_LEGACY_BUS_INFORMATION is
observed.. is this because i have set the 'Reader Type' member in the
reader capabilities to SCARD_READER_TYPE_VENDOR since its a PCI reader
and there is no specific type defined for PCI.

What should i do so that the resource manager recognizes our card reader ?

Regards
Esha
Reply With Quote

Responses to "Why Smart card reader is not listed by the resource manager ?"

Eliyas Yakub [MSFT]
Guest
Posts: n/a
 
Re: Why Smart card reader is not listed by the resource manager ?
Posted: 10-13-2006, 02:19 PM
Are you sure you have registered and enabled smartcard interface in your
driver? You can ignore IRP_MN_QUERY_LEGACY_BUS_INFORMATION. The only driver
that handles this IRP in the entire world is the ISA bus driver provided by
MS.

-Eliyas


Reply With Quote
Venusł˛
Guest
Posts: n/a
 
Re: Why Smart card reader is not listed by the resource manager ?
Posted: 10-22-2006, 08:22 PM

"Eshanye_kp" <esha@procsys.com> wrote in message
news:452F37EE.9040508@procsys.com...
> Hi,
>
> I have written a smart card reader driver using the ddk sample pscr for
> WinXP. When the WinAPI 'SCardListReaders' is called, its not listing my
> reader. But the installation and the registry entries for my reader driver
> is perfect and as described by the DDK help. The resource manager service
> has been started also. But one thing i have observed is, the IRP's related
> to Power management are not coming to the driver (Is this because, the
> member PowerMgmtSupport' in the card capabilities is not at all
> initialized ?). IRP_MJ_START_DEVICE and other IRP's are coming and also,
> another minor IRP, IRP_MN_QUERY_LEGACY_BUS_INFORMATION is observed.. is
> this because i have set the 'Reader Type' member in the reader
> capabilities to SCARD_READER_TYPE_VENDOR since its a PCI reader and there
> is no specific type defined for PCI.
>
> What should i do so that the resource manager recognizes our card reader ?
>
> Regards
> Esha
The problem is, your DDK sample driver may not have the code to handle
a Resource Information request. In this case, the device manager will not
be
able to display anything on its list for your sample driver. I can
explain why you see the listing for network driver, this is how it works: In
a network driver environment, the Device Manager will call
NdisMQueryAdapterResources() function, this functions is finally handled by
a miniport driver, it pulled information from the hardware and send the info
back to the caller (Device Manager) to be displayed. The Device manager
will display at its option simple or detailed information.

---------------------------------------------------------------------------------------------------------------------
a Device Manager will call this function:

NdisMQueryAdapterResources(&stat, WrapperConfigurationContext, resList,
&bufSize);

if (stat == NDIS_STATUS_SUCCESS){
PCM_PARTIAL_RESOURCE_DESCRIPTOR resDesc;
BOOLEAN haveIRQ = FALSE,
haveIOAddr = FALSE,
haveDma = FALSE;
UINT i;

for (resDesc = resList->PartialDescriptors, i = 0;
i < resList->Count;
resDesc++, i++){

switch (resDesc->Type){
case CmResourceTypePort:
if (thisDev->CardType==PC87108 &&
(resDesc->u.Port.Start.LowPart==0xEA ||
resDesc->u.Port.Start.LowPart==0x398 ||
resDesc->u.Port.Start.LowPart==0x150))
{
// This is an eval board and to config io base address

thisDev->portInfo.ConfigIoBasePhysAddr =
resDesc->u.Port.Start.LowPart;
}
else if (thisDev->CardType==PC87308 &&
(resDesc->u.Port.Start.LowPart==0x2E ||
resDesc->u.Port.Start.LowPart==0x15C))
{
// This is an eval board and to config io base address

thisDev->portInfo.ConfigIoBasePhysAddr =
resDesc->u.Port.Start.LowPart;
}






Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SCard reader driver is not getting registered properly hence notbeen recognised by the resource manager... Eshanye_kp Windows XP Device Drivers 0 10-11-2006 09:59 AM
smart card reader KMSterrett Windows XP Embedded 0 04-21-2004 04:48 PM
Smart Media Card Reader Jamedare Windows XP Photos 1 10-05-2003 08:08 PM
USM Smart Media card reader Stephie Windows XP Device Drivers 0 08-16-2003 11:06 PM
PC hangs when trying to preview pic from smart card reader John Inzer Windows XP Photos 0 07-06-2003 02:26 AM


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90