-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add kapelse readers support in COMPOSITE_AS_MULTISLOT mode #118
Add kapelse readers support in COMPOSITE_AS_MULTISLOT mode #118
Conversation
Build issue when --enable-strict --enable-composite-as-multislot used for configuration is now fixed by last commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed your fist commit with changes in https://github.com/LudovicRousseau/CCID-debug/
Please re-submit your patch in this -debug
repo.
|
||
case KAPELSE_KAPLIN2 : | ||
/* KAP&LINK2 : only 3 first interfaces are ccid ones */ | ||
if(config_desc->bNumInterfaces > 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this test?
In my list the KAP-LINK2 has 3 CCID interfaces https://ccid.apdu.fr/ccid/shouldwork.html#0x29470x0105
Do you have another model with a different configuration but using the same idProduct
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is needed as KAP-LINK2 is a USB composite device presenting either 3 CCID interfaces or 3 CCID interfaces (the 3 first ones) and a CDC-ACM interface according user configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
It should work fine if you something like use:
max_interface_number = 3; /* up to 4 interfaces */
num_CCID_interfaces = 3; /* 3 CCID interfaces */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bmoraine Is it possible for the KAP-LINK2 to NOT have 3 CCID interfaces?
Why can't we use max_interface_number = 2;
in all cases without checking the value of config_desc->bNumInterfaces
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LudovicRousseau Effectively, KAP-LINK2 has always 3 CCID interfaces (the 3 first ones) and an optional 4th CDC-ACM interface. So, you are right, we can use max_interface_number = 2; in all cases without checking the value of config_desc->bNumInterfaces
Can you also give me the output of the following command for each kapelse readers please
I need to know what other interfaces are present and in which position. For example the Gemalto Prox DU reader has 2 CCID interfaces and 1 HID interface. The HID interface is in the first position so |
Please find below the output of the command :
$ lsusb -d 2947: -v | grep 'bInterfaceClass|idVendor|idProduct'
|
It's unclear for me. Do you want me to submit Kapelse reader suport in COMPOSITE_AS_MULTISLOT mode patch in this -debug repo? If yes, via a pull request? |
I made modifications to your first patch in the CCID-debug repo. Since the CCID interfaces on the kapelse readers are in the first interfaces Yes, I ask you to propose a Pull Request on this repo to add support of kapelse readers. |
For information, I have created a Pull Request as recommended : |
Good. |
No, I tested only on linux using "./configure --enable-strict --enable-composite-as-multislot " before compiling and installing driver. In my understanding, driver should behave the same as on macos. |
I was expecting an answer like that :-) You have to use macOS to test your changes work fine on macOS. Please also test connecting 2 Kapelse readers and check all the CCID interfaces are visible using pcsctest. |
@bmoraine you can also send me Kapelse sample readers so I can make tests on my side. |
@LudovicRousseau I will test Kapelse readers on macOS Sonoma and ,in the same time, send you some readers. Regarding ccid driver generatioin on macos, I always slightly modified ccid driver source in SmartcardCCID : In my undestanding, Apple applies patches on top of cdid driver and use specific parameters when configuring ccid project according : |
I also assume it should work. |
What is your process to build CCID driver on macOS? |
Fixed in 73d9d3a and later patches |
Hello,
Please find 2 patches regarding COMPOSITE_AS_MULTISLOT mode to simplify its implementation and to add support for Kapelse readers supports.
Best Regards
Baptiste Moraine