-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pcsc-lite 1.9.1: memory card connection failed #103
Comments
Can you reconfigure pcsc-lite using |
Here is the updated log:
|
The card is T=0, the reader works with T=0, the application is requesting T=1 or T=0. I don't think that is a bug in pcsc-lite. Or I don't know what I could do. What I propose: in the ACS driver, you add a special case for memory cards and return |
I ran Here is the log: macOS 11.4
I found that
Is it a good approach to fix this issue? |
macOS has the same behaviour than pcsc-lite before the patch you mentioned. If your driver wants to accept memory cards then |
It seems that Is there any reason to modify the original design? |
Good point. Try with this patch: diff --git a/src/prothandler.c b/src/prothandler.c
index 1e21264..56c00ea 100644
--- a/src/prothandler.c
+++ b/src/prothandler.c
@@ -114,9 +114,9 @@ DWORD PHSetProtocol(struct ReaderContext * rContext,
protocol = ucChosen;
break;
- case IFD_NOT_SUPPORTED:
case IFD_PROTOCOL_NOT_SUPPORTED:
case IFD_ERROR_NOT_SUPPORTED:
+ /* protocol not supported */
if (protocol != dwPreferred)
{
Log3(PCSC_LOG_INFO,
@@ -131,6 +131,12 @@ DWORD PHSetProtocol(struct ReaderContext * rContext,
}
break;
+ case IFD_NOT_SUPPORTED:
+ /* command not supported */
+ Log3(PCSC_LOG_INFO, "Set PTS failed (%ld). Using T=%d", rv,
+ (SCARD_PROTOCOL_T0 == protocol) ? 0 : 1);
+ break;
+
default:
Log2(PCSC_LOG_INFO, "Set PTS failed (%ld)", rv); And tell me if it solved the problem. |
The patch fixes the issue. Thanks! Here is the log:
|
If the driver returns IFD_NOT_SUPPORTED from the function IFDHSetProtocolParameters() it indicates the "command" is not supported. It is different from IFD_PROTOCOL_NOT_SUPPORTED that indicates the "prorocol" is not supported. The problem was with a ACR38U CCID and a memory card. The SetParameters() fails but the card can still be used using the default protocol. The behaviour is identical to what we had before the commit 5d58577. Thanks to Godfrey Chung for the bug report "pcsc-lite 1.9.1: memory card connection failed #103" #103
Fixed. |
I was using ACR38U CCID reader and found that the program cannot connect memory card on Debian 11.
Here is the log:
Debian 11
pcsc-lite 1.9.1
ccid 1.4.34
Debian 10
pcsc-lite 1.8.24
ccid 1.4.30
You will see that pcsc-lite 1.9.1 prints different log message.
pcsc-lite 1.9.1
pcsc-lite 1.8.24
According to the log message, it seems that the commit 5d58577 changes the way to validate the result.
The text was updated successfully, but these errors were encountered: