Increasing connected smart card reader count limit

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

Increasing connected smart card reader count limit

Vincas Dargis
Hi,

We in our company have unusual use case, so that we need to have a lot
of smart cards permanently connected and ready to be used 24/7.

I've seen patch [1] that reduced PCSCLITE_MAX_READERS_CONTEXTS down to
16 (currently, we need >20 and growing).

Is this only constant that would be enough to be increased if needed?

I've seen [2] some "interesting" constants like
PCSC_MAX_CONTEXT_THREADS, PCSC_MAX_CONTEXT_CARD_HANDLES and
PCSC_MAX_READER_HANDLES  but these are set to 200 which is more than
enough if I want to increase PCSCLITE_MAX_READERS_CONTEXTS up to 127
(AFAIK max USB devices, well minus hubs but whatever), right?

There aren't any concurrent transaction limit? We would have single
daemon that will connect to pcscd and _may_ have lot's of transactions
for different cards opened when needed.

P.S. maybe someone have seen USB smart card reader "bank" with lot's of slots?

Thanks !

[1] https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=pcsclite/PCSC.git;a=blobdiff;f=src/PCSC/pcsclite.h.in;h=91ba548f90a45588e532dee7962ae2ed382bdf03;hp=9092fb313d41cf71a0df12c968b52948963ec61a;hb=9e2bb05d9f08250866afc2389afdd9b08d58b25a;hpb=261f54328d05a69707f19c788da7c2b81bedf12c

[2] https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=pcsclite/PCSC.git;a=blob;f=src/pcscd.h.in;h=3ebc0e66c43495a33c55faa47b5ed379f3a0b6b2;hb=HEAD#l56

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Increasing connected smart card reader count limit

Ludovic Rousseau
2016-05-03 8:32 GMT+02:00 Vincas Dargis <[hidden email]>:
Hi,

Hello,
 

We in our company have unusual use case, so that we need to have a lot
of smart cards permanently connected and ready to be used 24/7.

I've seen patch [1] that reduced PCSCLITE_MAX_READERS_CONTEXTS down to
16 (currently, we need >20 and growing).

Is this only constant that would be enough to be increased if needed?

No. You also need to change CCID_DRIVER_MAX_READERS in the CCID driver (if you use this driver)
https://github.com/LudovicRousseau/CCID/blob/master/src/ccid_ifdhandler.h#L50

This is a known "feature" reported in [1].
Contact me if you want to help fix this limitation.
 

I've seen [2] some "interesting" constants like
PCSC_MAX_CONTEXT_THREADS, PCSC_MAX_CONTEXT_CARD_HANDLES and
PCSC_MAX_READER_HANDLES  but these are set to 200 which is more than
enough if I want to increase PCSCLITE_MAX_READERS_CONTEXTS up to 127
(AFAIK max USB devices, well minus hubs but whatever), right?

There aren't any concurrent transaction limit? We would have single
daemon that will connect to pcscd and _may_ have lot's of transactions
for different cards opened when needed.

P.S. maybe someone have seen USB smart card reader "bank" with lot's of slots?

No. Not yet.
Can you share a picture of such reader?
Or a picture of your setup?

I could wrote a blog article [1] about supporting a large number of readers. having pictures to illustrate the article would be good.

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Increasing connected smart card reader count limit

Bruno Jesus
On Tue, May 3, 2016 at 3:51 PM, Ludovic Rousseau
<[hidden email]> wrote:

>> P.S. maybe someone have seen USB smart card reader "bank" with lot's of
>> slots?
>
>
> No. Not yet.
> Can you share a picture of such reader?
> Or a picture of your setup?
>
> I could wrote a blog article [1] about supporting a large number of readers.
> having pictures to illustrate the article would be good.

I worked in a company where we used around 200 card slots per computer
(around 108 dual readers due to the 128 usb limit), this is a not so
good picture but illustrates a bit a piece of the hardware:
http://www.planeta.inf.br/site/img_produtos.php?codigo=43

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Increasing connected smart card reader count limit

Ludovic Rousseau
2016-05-03 10:22 GMT+02:00 Bruno Jesus <[hidden email]>:
On Tue, May 3, 2016 at 3:51 PM, Ludovic Rousseau
<[hidden email]> wrote:
>> P.S. maybe someone have seen USB smart card reader "bank" with lot's of
>> slots?
>
>
> No. Not yet.
> Can you share a picture of such reader?
> Or a picture of your setup?
>
> I could wrote a blog article [1] about supporting a large number of readers.
> having pictures to illustrate the article would be good.

I worked in a company where we used around 200 card slots per computer
(around 108 dual readers due to the 128 usb limit), this is a not so
good picture but illustrates a bit a piece of the hardware:
http://www.planeta.inf.br/site/img_produtos.php?codigo=43

That is a good start. But it does not show enough details :-(

I would like pictures like the ones in my "Smart card reader p0rn pictures" [1] article.

[1] http://ludovicrousseau.blogspot.fr/2015/04/smart-card-reader-p0rn-pictures.html

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Increasing connected smart card reader count limit

Vincas Dargis
In reply to this post by Ludovic Rousseau
2016-05-03 10:51 GMT+03:00 Ludovic Rousseau <[hidden email]>:
> No. You also need to change CCID_DRIVER_MAX_READERS in the CCID driver (if
> you use this driver)
> https://github.com/LudovicRousseau/CCID/blob/master/src/ccid_ifdhandler.h#L50

When I disconnect HID Omnikey reader, in syslog appears:
pcscd: ccid_usb.c:660:WriteUSB() write failed (1/8): -4 No such device

That means CCID is in fact used, so I will have to modify libccid
package also, right?

We're going to use Debian (instead of two Windows machines, yay! :-)
), so I am planing to create local repo for modified packages I guess.

> This is a known "feature" reported in [1].
> Contact me if you want to help fix this limitation.

Oh, so Idea is to use update codebase to use list instead? I wish I
could help, but I kinda doubt I could provide quality C when having
experienced mainly with C++ only.

>> P.S. maybe someone have seen USB smart card reader "bank" with lot's of
>> slots?
>
>
> No. Not yet.
> Can you share a picture of such reader?
> Or a picture of your setup?

Sorry for not being clear, as English is not my native language... I
wanted to ask if anyone knows USB device that could be bought that has
lot's of smart card slots bundled in it.

Thanks for reply, Ludovic

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Increasing connected smart card reader count limit

Ludovic Rousseau


2016-05-03 12:09 GMT+02:00 Vincas Dargis <[hidden email]>:
2016-05-03 10:51 GMT+03:00 Ludovic Rousseau <[hidden email]>:
> No. You also need to change CCID_DRIVER_MAX_READERS in the CCID driver (if
> you use this driver)
> https://github.com/LudovicRousseau/CCID/blob/master/src/ccid_ifdhandler.h#L50

When I disconnect HID Omnikey reader, in syslog appears:
pcscd: ccid_usb.c:660:WriteUSB() write failed (1/8): -4 No such device

That means CCID is in fact used, so I will have to modify libccid
package also, right?

Probably yes.

You can check by generated a complete pcscd log as described in http://pcsclite.alioth.debian.org/ccid.html#support

Bye

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Increasing connected smart card reader count limit

Vincas Dargis
In reply to this post by Bruno Jesus
2016-05-03 11:22 GMT+03:00 Bruno Jesus <[hidden email]>:
> I worked in a company where we used around 200 card slots per computer
> (around 108 dual readers due to the 128 usb limit), this is a not so
> good picture but illustrates a bit a piece of the hardware:
> http://www.planeta.inf.br/site/img_produtos.php?codigo=43

That's interesting peace of hardware. Thanks for sharing!

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle