Skip to content
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

Update ifdhandler.c: wrong select protocol #113

Closed
wants to merge 1 commit into from

Conversation

DimkaM
Copy link

@DimkaM DimkaM commented Jun 29, 2023

wrong select protocol

@DimkaM
Copy link
Author

DimkaM commented Jun 29, 2023

T0 does not use bit 4.
With bit 4 == 1, the card generates an error.

Datasheet:
For T=0 ,B0 – 0b, B7-2 – 000000bB1 – Convention used (b1=0 for direct, b1=1 forinverse)

@LudovicRousseau
Copy link
Owner

What is your "Datasheet"?
Do you have the reference to ISO 7816-3 that document this part?

@DimkaM
Copy link
Author

DimkaM commented Jun 29, 2023

What is your "Datasheet"? Do you have the reference to ISO 7816-3 that document this part?

The bmTCCKST0 field on page 33 in https://www.usb.org/sites/default/files/DWG_Smart-Card_CCID_Rev110.pdf

@DimkaM
Copy link
Author

DimkaM commented Jun 29, 2023

T0 does not use bit 4. With bit 4 == 1, the card generates an error.

Datasheet: For T=0 ,B0 – 0b, B7-2 – 000000bB1 – Convention used (b1=0 for direct, b1=1 forinverse)

without a patch returns an error:
#define SCARD_E_NOT_TRANSACTED HRESULT_TYPEDEF(0x80100016L)

@LudovicRousseau
Copy link
Owner

The bmTCCKST0 field is set at https://github.com/LudovicRousseau/CCID/blob/master/src/ifdhandler.c#L1136

Your problem is different. Please provide a complete trace as described in https://ccid.apdu.fr/#support
It will help if you generates 2 traces: one with the current code, and one with your patch applied.

@DimkaM
Copy link
Author

DimkaM commented Jun 30, 2023

The bmTCCKST0 field is set at https://github.com/LudovicRousseau/CCID/blob/master/src/ifdhandler.c#L1136

Your problem is different. Please provide a complete trace as described in https://ccid.apdu.fr/#support It will help if you generates 2 traces: one with the current code, and one with your patch applied.

I made and attached logs

log_error.txt
log_ok.txt

@DimkaM
Copy link
Author

DimkaM commented Jun 30, 2023

I'm sorry.
Here are the logs from the latest source codes.
We have modified ccid_serial.c and commands.c to support AK9564 reader, there may be a bug in our code.
log_bad.txt
log_good.txt

@LudovicRousseau
Copy link
Owner

I can't support a driver you have modified.
But feel free to use this patch if is works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants