Closed bmoraine closed 7 months ago
Build issue when --enable-strict --enable-composite-as-multislot used for configuration is now fixed by last commit
Can you also give me the output of the following command for each kapelse readers please
lsusb -d 2947: -v | grep 'bInterfaceClass\|idVendor\|idProduct'
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 max_num_interfaces
is not the same as the number of "slots" as you suggested in your patch. The code you removed looked like a duplication but was not exactly the same.
Please find below the output of the command :
lsusb -d 2947: -v | grep 'bInterfaceClass\|idVendor\|idProduct'
When enumerating 3 CCID interfaces : $ lsusb -d 2947: -v | grep 'bInterfaceClass|idVendor|idProduct' idVendor 0x2947 idProduct 0x0105 bInterfaceClass 11 Chip/SmartCard bInterfaceClass 11 Chip/SmartCard bInterfaceClass 11 Chip/SmartCard
When enumerating 3 CCID interfaces and 1 CDC ACM Interface : $ lsusb -d 2947: -v | grep 'bInterfaceClass|idVendor|idProduct' idVendor 0x2947 idProduct 0x0105 bInterfaceClass 11 Chip/SmartCard bInterfaceClass 11 Chip/SmartCard bInterfaceClass 11 Chip/SmartCard bInterfaceClass 2 Communications bInterfaceClass 10 CDC Data
$ lsusb -d 2947: -v | grep 'bInterfaceClass|idVendor|idProduct' idVendor 0x2947 idProduct 0x0112 bInterfaceClass 11 Chip/SmartCard bInterfaceClass 3 Human Interface Device bInterfaceClass 2 Communications bInterfaceClass 10 CDC Data
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.
You now have to define 2 values: max_interface_number
and num_CCID_interfaces
.
Since the CCID interfaces on the kapelse readers are in the first interfaces num_CCID_interfaces
should contain the number of CCID interfaces (easy) and max_interface_number
should be num_CCID_interfaces -1
because it starts at 0.
Yes, I ask you to propose a Pull Request on this repo to add support of kapelse readers. I do not have any of the kapelse readers so I can't test the code myself. I don't want to publish untested code.
For information, I have created a Pull Request as recommended : https://github.com/LudovicRousseau/CCID-debug/pull/1
Good. have you checked your patches works fine on macOS with your readers?
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 :-)
I asked because your patch does not correctly set (I think) the max_interface_number
value.
pcsc-lite on GNU/Linux does support composite devices. So you can't check your code on Linux.
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.
The CCID driver has code to reset static_interface
value when all the CCID interfaces have been used, so the driver is ready to connect another "composite-as-multislot" reader.
https://github.com/LudovicRousseau/CCID/blob/master/src/ccid_usb.c#L732
@bmoraine you can also send me Kapelse sample readers so I can make tests on my side. Contact me by private email.
@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 : https://github.com/apple-oss-distributions/SmartcardCCID/ and never update the entire ccid driver source files.
In my undestanding, Apple applies patches on top of cdid driver and use specific parameters when configuring ccid project according : https://github.com/apple-oss-distributions/SmartcardCCID/blob/main/ccid/Makefile. I assume that if I replace ccid tar.gz with the content of CCID-debug and I execute the makefile, it should be OK. Do you confirm?
I assume that if I replace ccid tar.gz with the content of CCID-debug and I execute the makefile, it should be OK. Do you confirm?
I also assume it should work. I never used the Apple process to build my CCID driver on macOS, so you are the expert on this point.
What is your process to build CCID driver on macOS?
Fixed in 73d9d3a9bd9e2905912a76d7e4615a9729d83fc2 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