[Pcsclite-muscle] Obtaining physical bus path of CCID devices via PC/SC?
laforge at gnumonks.org
Sun Sep 23 07:16:43 PDT 2018
I'm currently looking at building systems with a massive amount of chip
card slots attached to one given (Linux) system.
>From the specification point of view, every USB-CCID device can have up to
256 slots (real-world devices up to 5 slots are available off-the-shelf),
and pcsc-liste currently limits this by a preprocessor definition down to 16.
Tou can have many of such devices attached to any number of USB buses of a system.
Even with more frequently found single-slot devices, as soon as you have multiple
you will start to wonder how to access one specific of those devices from software.
As soon as you have several readers attached, particularly if it's the same
model/brand/firmware, the software is faced with the problem to disambiguate
them. If you want to access a given slot of a given reader, names like
"ACS ACR33 ICC Reader 01 04"
as provided by pcsc-lite + libccid are not very useful, as the "01" (number of
the ARC33 device in the system) depends on the order of USB enumeration.
In Linux systems, you can normally use the physical bus topology and hence
the bus path to understand in which port of which hub a given device is plugged.
This hierarchy is exposed in sysfs, and it is also exposed by libusb with
libusb_get_port_path() / libusb_get_port_numbers().
I was wondering if there is any method in pcsc-lite + libccid at this point
to obtain the physical bus path of a given reader/slot?
If not, would it be acceptable to submit patches to that regard? What would
be the preferred method to expose that bus path? I was thinking of something
like an attribute that could be queried via SCardGetAttrib()?
- Harald Welte <laforge at gnumonks.org> http://laforge.gnumonks.org/
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
More information about the pcsclite-muscle