Re: How to Identify USB devices on linux/ubuntu/debian
Ludovic Rousseau <[email protected]> Fri, 27 Jan 2017 20:07:31 +0100
| Newsgroups | gmane.comp.lib.muscle |
|---|---|
| Message-ID | <CAGstE8C4wYVN03_7EPjbfAW9mGizOFQCa3P-79LUyde7ernRLQ@mail.gmail.com> |
2017-01-27 16:58 GMT+01:00 Uv Wildner <[email protected]>: > 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 _______________________________________________ Pcsclite-muscle mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle