-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
SCardConnect returns SCARD_E_PROTO_MISMATCH if SCARD_PROTOCOL_RAW was used in previous connection #49
Comments
I don't think it is a bug in pcsclite.
instead of:
You can't (re)connect using a different protocol without powering off or reseting the card first. Have you tried your program on Windows? |
Here is the result on Windows: Establishing the context... It seems that Windows does not support raw protocol. |
Another test you can make on Windows is to use a card with support of both T=0 and T=1. |
Yes, I can reproduce the result on Windows. |
I found a problem when using
SCardConnect
withSCARD_PROTOCOL_RAW
. It always returnsSCARD_E_PROTO_MISMATCH
ifSCARD_PROTOCOL_RAW
was used in previous connection.Please insert a card before running testraw.
After running testraw, it will generate the following output:
Establishing the context...
Getting reader names...
Reader 0: ACS ACR 38U-CCID 00 00
Select reader: 0
Connecting to the reader (shared, T=0 or T=1)...
Disconnecting the reader...
Connecting to the reader (direct, raw)...
Disconnecting the reader...
Connecting to the reader (shared, T=0 or T=1)...
Error: SCardConnect failed with error 0x8010000F
Connecting to the reader (shared, T=0 or T=1)...
Error: SCardConnect failed with error 0x8010000F
Connecting to the reader (shared, T=0 or T=1)...
Error: SCardConnect failed with error 0x8010000F
Connecting to the reader (shared, T=0 or T=1)...
Error: SCardConnect failed with error 0x8010000F
Connecting to the reader (shared, T=0 or T=1)...
Error: SCardConnect failed with error 0x8010000F
Connecting to the reader (shared, T=0 or T=1)...
Error: SCardConnect failed with error 0x8010000F
Connecting to the reader (shared, T=0 or T=1)...
Error: SCardConnect failed with error 0x8010000F
Connecting to the reader (shared, T=0 or T=1)...
Error: SCardConnect failed with error 0x8010000F
Connecting to the reader (shared, T=0 or T=1)...
Error: SCardConnect failed with error 0x8010000F
Connecting to the reader (shared, T=0 or T=1)...
Error: SCardConnect failed with error 0x8010000F
Releasing the context...
Here is the test code (testraw.c.txt).
Here is the log from pcscd (log.txt).
The text was updated successfully, but these errors were encountered: