[Pcsclite-muscle] How to Identify USB devices on linux/ubuntu/debian

Ludovic Rousseau ludovic.rousseau at gmail.com
Fri Jan 27 19:07:31 UTC 2017


2017-01-27 16:58 GMT+01:00 Uv Wildner <uv.wildner.ext at openlimit.com>:

> Hello,
>

Hello,


>
> I need to identify the USB device to which a card reader with a specific
> card is connected.
> I am pulling my hair out but cannot find any API call that provides this
> information.
>
> on Ludovic's blog I find this:
> https://ludovicrousseau.blogspot.de/2010/05/what-is-
> in-pcsc-reader-name.html
>
> That does not work on my system though!
> ubuntu xenial 4.4.0-59-generic x86_64
>
> When I list my card readers I get the list of readers like this from
> SCardListReaders():
>
> SCM Microsystems Inc. SCR 3310 00 00
> SCM Microsystems Inc. SCR 3310 01 00
>
> OK, so the readers are enumerated.
> However, I need to know the *usb device id* to be able to connect the
> reader with the right card to the correct virtualization environment.
>
> Bus 002 Device 008: ID 04e6:5116 SCM Microsystems, Inc. SCR331-LC1 /
> SCR3310 SmartCard Reader
> Bus 001 Device 005: ID 04e6:5116 SCM Microsystems, Inc. SCR331-LC1 /
> SCR3310 SmartCard Reader
>
> I only know that the usb device id can change easily.
>
> How do I find which USB device has been connected to the the instance of
> the SCardReader????
>
> Any pointers greatly welcome.
>

If your 2 readers are the exact same model and do not provide a serial
number then I don't see a solution to differrentiate them.

My question: why do you need to do that?

If you know the ATR of your "specific card" then you can get the ATR from
your 2 readers and know in which reader your card is present.
If you use 2 cards with the same ATR in each reader then this will not work.

Bye

-- 
 Dr. Ludovic Rousseau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20170127/39bf5a77/attachment.html>


More information about the Pcsclite-muscle mailing list