How to identify a smartcard reader serial number

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to identify a smartcard reader serial number

Jean-Michel Pouré - GOOZE
Dear all,

Simple question as usual.

Readers with smartcards have a serial number, i.e.:
opensc-tool --serial
Using reader with a card: Feitian ePass2003 01 00
68 35 10 17 17 05 12 01 h5......

But do smartcard readers without smartcard have serial numbers?
 
Running lsusb -v on hardware, I don't see any serial number for each
smartcard reader connected to a USB hub.

The reason for the question is that I would like to build a 8x8
smartcard readers bench when readers are numbered from 1 to 64. The
bench could be used for testing or mass initialization.

How to identify a smartcard reader plugged using USB
BEFORE a smartcard is inserted in the reader?

Kind regards,
--
                  Jean-Michel Pouré - Gooze - http://www.gooze.eu

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

smime.p7s (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to identify a smartcard reader serial number

Frank Morgner
Hi!

lsusb -v shows the field 'iSerial'. I have some readers which use '0'
for this field, which means they don't include a serial number. A value
bigger than 0 is the index to the USB string, which contains the actual
serial number.

You could try to use a hash of the full USB descriptor as identifier.
This works if readers of the same type differ in some fields. However, I
don't know if this will always work for any kind of reader family.

Cheers, Frank.

On Friday, November 09 at 09:38AM, Jean-Michel Pouré - GOOZE wrote:

> Dear all,
>
> Simple question as usual.
>
> Readers with smartcards have a serial number, i.e.:
> opensc-tool --serial
> Using reader with a card: Feitian ePass2003 01 00
> 68 35 10 17 17 05 12 01 h5......
>
> But do smartcard readers without smartcard have serial numbers?
>  
> Running lsusb -v on hardware, I don't see any serial number for each
> smartcard reader connected to a USB hub.
>
> The reason for the question is that I would like to build a 8x8
> smartcard readers bench when readers are numbered from 1 to 64. The
> bench could be used for testing or mass initialization.
>
> How to identify a smartcard reader plugged using USB
> BEFORE a smartcard is inserted in the reader?
>
> Kind regards,
> --
>                   Jean-Michel Pouré - Gooze - http://www.gooze.eu


> _______________________________________________
> opensc-devel mailing list
> [hidden email]
> http://www.opensc-project.org/mailman/listinfo/opensc-devel

--
Frank Morgner

Virtual Smart Card Architecture http://vsmartcard.sourceforge.net
OpenPACE                        http://openpace.sourceforge.net
IFD Handler for libnfc Devices  http://sourceforge.net/projects/ifdnfc

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

attachment0 (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to identify a smartcard reader serial number

Jean-Michel Pouré - GOOZE
Dear all,

> lsusb -v shows the field 'iSerial'. I have some readers which use '0'
> for this field, which means they don't include a serial number. A
> value
> bigger than 0 is the index to the USB string, which contains the
> actual
> serial number.

Thank you Frank and others for your answers.

> You could try to use a hash of the full USB descriptor as identifier.
> This works if readers of the same type differ in some fields. However,
> I
> don't know if this will always work for any kind of reader family.

I understand that iSerial is usually set to zero. If we mix all kind of
hardware, a value of zero will be more frequent. Anyway our hardware has
a value set to zero and we don't plan to buy new hardware. And we should
be able to test and add any kind of hardware.

Initially, I was planning to use the same bench for OpenSC regression
testing and initialization, but this is nonsense. Smartcards can be
initialized using a smartcard printer. Tokens should be initialized
one-by-one. Maybe using a cheap robot.

Regression testing is a different process:

For OpenSC regression testing, I am moving towards a farm with KVM
virtual systems running. One the one side there should be virtual
systems. On the other side a bench with 64 readers with cards inserted
and tokens plugged-in.

The bench should be flexible enough to test several systems (Windows XP,
Vista, 7 and 8) and variations (SP1, SP2, etc ...) and recent GNU/Linux
systems, deb or RPM variations.

USBip can be used as a glue to serve the readers to the system.

To simplify everything:
* There should be only one virtual system running at a time.
* Each system should be connecting to one remote smartcard only.

After booting the bench running Debian GNU/Linux, we can use a virtual
guest OS to identify each device:

First, we list all available devices:
usbip -l 10.8.0.100 (address of bench)

Then we attach each devices, query the reader and detach it.

opensc-tool -l returns the name of the smartcard reader.
opensc-tool --serial allows to identify the smartcard/token inserted.

As there is only ONE usb device connected at time, there should be no
conflict. Everytime a device is plugged-in, we need to run discovery
again.

The result is written to a text file and served to the farm using
Apache.

If you think of a more simple solution, please advise.

Kind regards,
--
                  Jean-Michel Pouré - Gooze - http://www.gooze.eu

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

smime.p7s (8K) Download Attachment