Skip to content
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

CCID ID USB = Reader #26

Closed
joaoguariglia opened this issue Dec 19, 2016 · 5 comments
Closed

CCID ID USB = Reader #26

joaoguariglia opened this issue Dec 19, 2016 · 5 comments

Comments

@joaoguariglia
Copy link

joaoguariglia commented Dec 19, 2016

Good Morning!
I have a question about CCID, in the pcsc_scan program I can see the READER: number.
I would like to know if it is possible to identify the READER with the usb ID, when you give the command
-> # lsusb
Bus 001 Device 004: ID 1059: 0017
If it is possible to identify the Reader with this ID, or any other ID that is unique to that reader.

I know the newer readers come with serial number, but there are some older CCIDs that have nothing to identify, so I doubt it.

@arbego
Copy link

arbego commented Dec 19, 2016

Hello,

sadly the USB ID cannot be used to identify a reader. As soon as you plug your reader into an other USB port the USB ID will change. There is no way to distinguish between two identical readers when there is no serial number in the USB descriptor.
You can try to fetch the reader's friendly name (SCardGetAttrib(), take a look at SCARD_ATTR_DEVICE_FRIENDLY_NAME). But also in this case it is likely that your readers get a differnt friendly name each time it reconnects from/to a USB port. You will have to try it.

Regards.

@joaoguariglia
Copy link
Author

Hi! Thank you very much for the quick response.
Just one more question, it is possible to identify where READER: number
Is it pointing to a physical USB?

@arbego
Copy link

arbego commented Dec 19, 2016

Reader 0: HID Global OMNIKEY 5022 Smart Card Reader [OK 5022 Smart Card Reader] 00 00

As far as I know "Reader 0" is only an internal enumeration index of the pcsc_scan tool. You can verify this by plugging the reader into USB port 1 and then into USB port 2. Both times it will get index 0.

@LudovicRousseau
Copy link
Owner

Hello,
You can find information in 2 blog articles:

The USB ID "Bus 001 Device 004", as in your example, is not available at the PC/SC level.

@joaoguariglia
Copy link
Author

Thank you very much for the answer, I'm going to read it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants