Important!

Blog moved to https://blog.apdu.fr/

I moved my blog from https://ludovicrousseau.blogspot.com/ to https://blog.apdu.fr/ . Why? I wanted to move away from Blogger (owne...

Showing posts with label ccid. Show all posts
Showing posts with label ccid. Show all posts

Tuesday, January 31, 2023

New version of libccid: 1.5.2

I just released version 1.5.2 of libccid the Free Software CCID class smart card reader driver. 

Changes:

1.5.2 - 31 January 2023, Ludovic Rousseau

  • Add support of
    • KAPELSE KAP-LINK
    • LDU LANDI
    • Sensyl SSC-HV Reader
    • TOKEN2 MFA NFC Reader
    • TOKEN2 Molto2
    • Thales RF Reader
  • Alcor Micro AU9560: Remove high speeds since they are not supported
  • Hack for AlcorMicro AU9560 and Acos-ID card
  • configure.ac: disable the use of --disable-usbdropdir


 

Saturday, December 17, 2022

AlcorMicro AU9560 reader and fast smart cards: help from crowd needed

The AlcorMicro AU9560 smart card reader has problems with high speed smart cards.

The reported problem

The same problem is already reported in different places:

Example of cards in reported problems

The reader is always the same but used with different cards.

The card must have a TA1 > 0x95. To know the TA1 of your smart card you need to get and parse the card's ATR, for example using pcsc_scan program from pcsc-tools.

The problem

The reader declares it can support card/reader communication speed up to 688 172 bps.
See dwMaxDataRate field in AlcorMicro_AU9560.txt.

It is fast but I have 4.5 % of readers in my list that declare to be faster (not including contactless readers).

But speeds above ~200 000 bps are problematic with the AlcorMicro AU9560. It works fine, until an APDU exchange fails with a "Hardware error" (for example) message from the reader:

00000009 APDU: 00 A4 00 00 02 3F 00 00
00000007 ifdhandler.c:1333:IFDHTransmitToICC() usb:058f/9540:libudev:0:/dev/bus/usb/001/002 (lun: 0)
00000006 commands.c:1670:CmdXfrBlockAPDU_extended() T=0 (extended): 8 bytes
00000017 -> 000000 6F 08 00 00 00 00 0E 00 00 00 00 A4 00 00 02 3F 00 00
02734396 <- 000000 80 00 00 00 00 00 0E 41 FB 00
00000025 commands.c:1563:CCID_Receive Hardware error
00000009 APDU: 00 A4 00 00 02 3F 00 00

Where are the bogus readers?

The AlcorMicro AU9560 is not a stand alone USB reader. It must be integrated in a laptop. For example it is present in these laptop models:

  • Lenovo Thinkpad P17
  • Lenovo Thinkpad L15
  • Lenovo X1 Extreme Gen 2
  • HP Zbook
  • HP EliteBook.

I guess the same AlcorMicro AU9560 reader is present in a lot of other Lenovo or HP laptops and also laptops from other brands. 

Patch

I worked on a patch to remove the highest speeds so that the CCID driver will negotiate a lower speed that is still supported by the reader. 

Problem with the patch

My patch works fine with one card I have (NXP JCOP 4). But it generates problems with another card (Acos-ID).

The error occurs when the driver set the communication speed. The Set Parameters commands fails and the driver gets a "Card absent or mute" error.

00000004 [140396399142464] commands.c:2324:SetParameters() length: 7 bytes
00000006 [140396399142464] -> 000000 61 07 00 00 00 00 07 01 00 00 95 10 FF 46 00 FE 00
01646726 [140396415927872] ccid_usb.c:1532:InterruptRead() after (0) (2)
00621370 [140396399142464] <- 000000 82 00 00 00 00 00 07 41 FE 00
00000025 [140396399142464] commands.c:2351:SetParameters Card absent or mute
00000005 [140396399142464] prothandler.c:141:PHSetProtocol() Set PTS failed (612)

I suspect the problem to be specific to this card. But I am not sure. That is why I need your help to test with as much possible combinations as possible.

Your help is welcome

 If your have:

  1. a laptop with the AlcorMicro AU9560 smart card reader
  2. a fast enough smart card (i.e. TA1 > 0x95)

then you can help me.

The AlcorMicro AU9560 and the AlcorMicro AU9540 both use the same USB idProduct value of 0x9540 even if the two readers are a bit different. So even if you have a AU9560 the PC/SC name will be "Alcor Micro AU9540 xx yy". If you do not know what reader you have just suppose you have a AU9560.

You can check the 2 conditions above (AlcorMicro and TA1 value) using the pcsc_scan tools. See

$ pcsc_scan 
Using reader plug'n play mechanism
Scanning present readers...
0: Alcor Micro AU9540 00 00
 
Sat Dec 17 11:02:51 2022
 Reader 0: Alcor Micro AU9540 00 00
  Event number: 0
  Card state: Card inserted, Shared Mode, 
  ATR: 3B DC 96 FF 81 11 FE 80 31 C8 54 43 56 35 07 73 FF A1 C0 3C

ATR: 3B DC 96 FF 81 11 FE 80 31 C8 54 43 56 35 07 73 FF A1 C0 3C
+ TS = 3B --> Direct Convention
+ T0 = DC, Y(1): 1101, K: 12 (historical bytes)
  TA(1) = 96 --> Fi=512, Di=32, 16 cycles/ETU
    250000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 312500 bits/s
  TC(1) = FF --> Extra guard time: 255 (special value)
  TD(1) = 81 --> Y(i+1) = 1000, Protocol T = 1 
-----
  TD(2) = 11 --> Y(i+1) = 0001, Protocol T = 1 
-----
  TA(3) = FE --> IFSC: 254
+ Historical bytes: 80 31 C8 54 43 56 35 07 73 FF A1 C0
[...]
+ TCK = 3C (correct checksum) Possibly identified card (using /home/rousseau/.cache/smartcard_list.txt): 3B DC 96 FF 81 11 FE 80 31 C8 54 43 56 35 07 73 FF A1 C0 3C NXP JCOP 4, J3R200P0X3U/0ZA16CP NXD6.2 (JavaCard)

Please do:

  1. download, build and install the patched version of the CCID driver from https://ccid.apdu.fr/files/ccid-1.5.1-3ac3a1a.tar.bz2
  2. test it fixes the problems you had with the previous CCID driver
  3. test it does not create new problems that were not present with the previous CCID driver
  4. if a new problem appears I would like you to report it including:
    1. the exact computer model you use
    2. the name and ATR of the smart card you use
    3. a complete pcscd trace as documented in How to get support
You can report your results using different channels:
  1. on the MUSCLE mailing list
  2. by email to me
  3. by creating a new issue on the CCID project

Conclusion

Your help will greatly improve support of this reader commonly found in laptops.

Thank you.

[Update: Jan, 20th 2023]

The patch is now included in the CCID driver and will be present in the CCID release 1.5.2 (to be released later).

[Update: Jan, 31th 2023]

The CCID driver version 1.5.2 is now available.

Support of the AlcorMicro AU9560 should be better now.

Monday, November 14, 2022

New version of libccid: 1.5.1

I just released version 1.5.1 of libccid the Free Software CCID class smart card reader driver.

Changes:

1.5.1 - 14 November 2022, Ludovic Rousseau
  • Add support of
    • Access IS ATR220 with idProduct: 0x0184
    • Alcor Link AK9567
    • Alcor Link AK9572
    • BLUTRONICS TAURUS NFC
    • CHERRY SmartTerminal ST-1144
    • CREATOR CRT-603(CZ1) CCR
    • Dexon Tecnologias Digitais LTDA DXToken
    • ESMART Reader ER433x ICC
    • ESMART Reader ER773x Dual & 1S
    • Flight system consulting Incredist
    • Ledger Nano S
    • Ledger Nano S Plus
    • Ledger Nano SP
    • Ledger Nano X
    • SafeNet eToken Fusion
    • Sensyl SSC-NFC Reader
  • Adjust USB drivers path at run-time via environment variable PCSCLITE_HP_DROPDIR
  • configure.ac: add --enable-strict option
  • Fix a problem with AUTO PPS readers and ATR convention inverse cards
  • examples/scardcontrol:
    • add support of 6A xx error codes
    • check WinSCard error early
    • parse wLcdLayout & bEntryValidationCondition
  • macOS: log non sensitive strings as "%{public}s"
  • Some other minor improvements

Monday, November 7, 2022

Updated CCID driver for UEFI

In 2015 (7 years ago) I ported my CCID driver to UEFI (Unified Extensible Firmware Interface). For example read "UEFI Smart Card Reader Protocol implementation" and "PCSC sample in C for UEFI".

New version

I now updated the driver to use:

The driver is no more a patch for edk2 but an independent UEFI driver in its own repository UEFI-SmartCardReader. It should now be easier to build.

I also updated my samples applications in UEFI-SmartCardReader-Samples.

Conclusion

This driver will not be used by a lot of people. The driver is for applications that are run in the UEFI (i.e. before the main operating system is started) and with a need to access smart cards.

If you use it and want to have new features, or just want to discuss, you can contact me. I am curious to know what people can do with it.

Tuesday, July 5, 2022

CCID Windows 10 driver?

Just a quick article to talk about something funny.

Google Search Console Team sent me an email with the top most Google searches used to arrive on my website https://ccid.apdu.fr/.

For the month of June 2022 the second top search is: "ccid driver windows 10".


Google "think" someone will find a Windows 10 driver on https://ccid.apdu.fr/?

The Windows CCID is so hard to find or to install or is so buggy that users are searching for an alternative?

On the last 12 months the result is less worrisome. The "ccid driver windows 10" search is only 7th in the list:


Conclusion

Please propose your own explanation of this result.

Maybe I should add "Windows 10" in the web site description metadata to confuse Google search a bit more? :-)

Thursday, January 27, 2022

Accessing a lot of smart cards? (part 2)

Last year in "Accessing a lot of smart cards?" I wrote about accessing many smart cards in parallel.

One of my test platform was the sysmoOCTSIM, an 8-slots reader I presented in "sysmoOCTSIM: 8 slots reader". One advantage of this reader is that the 8 slots can be used at the same time. But my CCID driver did not support simultaneous access of different slots of the same reader.

Extract from the previous article (March 2021):

sysmoOCTSIM

My CCID driver for Unix do support multi-slot readers. But only one slot can be used at the same time. It is a limitation of the driver.

Supporting accesses to 2 or more slots in parallel would imply a change from synchronous USB communication to asynchronous USB communication. That is a possible change but not an easy one.


Results

number of slots sequential exe parallel exe
1 5.126s 5.126s
2 10.273s 10.030s
3 15.321s 14.944s


You may note that in the case of parallel execution we have a linear growth. As I explained before only one slot can be used at the same time. So pcsc-lite (the PC/SC resource manager) has to serialize the accesses to the different slots from the different executions.

The parallel execution is a bit more efficient than the sequential execution because part of the execution can be executed in parallel. But not so much. 

 

Problem fixed

My CCID driver now (since version 1.5.0) has support of simultaneous access to the slots of a reader.

But not all multi-slots readers can support simultaneous access. The reader must declare that all the slots can be used the same time. The USB descriptor field bMaxCCIDBusySlots must have a value greater than 1. Ideally this value should correspond to the number of slots. My CCID driver enables simultaneous access only if bMaxCCIDBusySlots correspond to the number of slots i.e. bMaxSlotIndex +1.


Readers that should support this feature:

Not so many readers will benefit from this improvement. They are:

Performances

So what are the performances now?

With the sysmoOCTSIM 8-slots reader I now get:

# User Sys Clock
CPU
0 0,07 0,02 24,65 0 %
1 0,19 0,04 24,72 0 %
2 0,21 0,05 24,68 1 %
3 0,26 0,08 24,59 1 %
4 0,34 0,09 24,67 1 %
5 0,41 0,10 24,65 2 %
6 0,50 0,11 24,64 2 %
7 0,56 0,13 24,72 2 %

I used the GNU time command to measure the User, System and clock times.

As expected the user (and system) time grows with the number of cards (slots) used.


Also as expected the clock time is rather constant to 24.6 seconds in all cases instead of growing linearly as it was in the case in "Accessing a lot of smart cards?".

We can clearly see the effect of the simultaneous accesses here.

 

Results with 88 slots

I got (remote) access to a sysmoSIMBANK 96 with 96 slots. See "A reader for 96 smart cards? sysmoSIMBANK" for more details about the reader.

 

Performances

# User Sys Clock CPU
0 0,23 0,08 21,00 1 %
1 0,52 0,11 24,27 2 %
2 0,77 0,23 24,30 4 %
3 1,17 0,25 24,34 5 %
4 1,51 0,28 24,41 7 %
5 1,43 0,33 24,44 7 %
6 1,81 0,37 24,50 8 %
7 2,12 0,48 24,88 10 %
8 2,53 0,51 25,00 12 %
9 2,90 0,57 25,07 13 %
10 3,15 0,75 25,06 15 %
11 3,59 0,79 25,15 17 %
12 3,94 0,85 25,24 19 %
13 4,37 0,85 25,30 20 %
14 4,84 0,92 25,33 22 %
15 5,19 0,98 25,28 24 %
16 5,56 1,10 25,41 26 %
17 5,89 1,20 25,51 27 %
18 6,41 1,25 25,55 30 %
19 6,75 1,32 25,58 31 %
20 7,14 1,41 25,58 33 %
21 7,49 1,50 25,46 35 %
22 7,88 1,58 25,75 36 %
23 8,16 1,64 25,65 38 %
24 8,75 1,70 25,80 40 %
25 9,00 1,79 25,91 41 %
26 9,35 1,88 25,88 43 %
27 9,76 1,95 25,84 45 %
28 10,26 1,99 25,51 48 %
29 10,58 2,09 25,95 48 %
30 10,99 2,16 26,26 50 %
31 11,21 2,29 25,97 51 %
32 11,56 2,42 26,23 53 %
33 12,00 2,40 26,06 55 %
34 12,48 2,43 26,38 56 %
35 13,07 2,41 26,67 58 %
36 13,23 2,69 26,23 60 %
37 13,63 2,70 26,30 62 %
38 13,90 2,88 26,04 64 %
39 14,55 2,69 26,57 64 %
40 14,85 2,83 26,43 66 %
41 15,17 2,94 25,71 70 %
42 15,47 3,05 26,48 69 %
43 15,88 3,12 26,35 72 %
44 16,32 3,29 26,27 74 %
45 16,66 3,23 26,67 74 %
46 17,29 3,25 26,69 76 %
47 17,28 3,56 26,48 78 %
48 17,88 3,50 26,69 80 %
49 18,31 3,54 26,78 81 %
50 18,74 3,59 27,16 82 %
51 18,62 3,66 26,10 85 %
52 19,01 3,60 26,74 84 %
53 19,29 3,88 26,20 88 %
54 19,29 3,85 26,95 85 %
55 19,81 3,74 26,33 89 %
56 20,10 3,94 26,66 90 %
57 20,28 4,17 26,73 91 %
58 20,80 4,05 27,09 91 %
59 21,02 4,02 26,39 94 %
60 21,04 4,23 29,14 86 %
61 21,56 4,28 29,18 88 %
62 21,55 4,23 29,22 88 %
63 21,78 4,34 29,19 89 %
64 22,01 4,65 29,36 90 %
65 22,67 4,54 29,41 92 %
66 22,74 4,78 29,60 92 %
67 23,65 4,58 29,51 95 %
68 24,07 4,53 30,83 92 %
69 24,26 4,64 30,88 93 %
70 23,88 5,07 30,95 93 %
71 24,35 4,98 31,06 94 %
72 24,93 4,89 31,18 95 %
73 25,30 4,96 31,23 96 %
74 25,51 5,26 31,14 98 %
75 25,91 5,15 31,42 98 %
76 26,10 5,47 31,54 100 %
77 26,53 5,44 31,37 101 %
78 27,06 5,51 31,76 102 %
79 27,01 5,31 31,56 102 %
80 27,56 5,31 31,68 103 %
81 27,86 5,57 31,79 105 %
82 28,17 5,59 31,76 106 %
83 28,60 5,67 31,74 107 %
84 29,03 5,64 32,18 107 %
85 29,15 5,88 31,82 110 %
86 29,67 5,96 32,35 110 %
87 30,20 5,98 32,47 111 %

 

 Here again the user and system times grow linearly.


And again the total time is rather constant. The total time is multiplied by 1.5 while the number of cards goes from 1 to 88.

 

The CPU load is also growing linearly. The system has a 4-core CPU so it is not surprising to get more than 100% of CPU usage.

My sample test is not optimized for speed or CPU load at all. I use make -j to start one Python program usim_read.py per slot. So make has to start 88 Python processes in the case of 88 slots.
The goal was to use standard and simple tools.

I stopped at 88 slots instead of the expected 96 because one of the 12 sysmoOCTSIM reader (part of the sysmoSIMBANK 96 reader) was not working correctly at the time.


Conclusion

A big thank to Sysmocom for helping my work on this code.

I am very happy to see pcsc-lite and my CCID driver able to handle 88 APDU exchanges at the same time.

New version of libccid: 1.5.0

I just released version 1.5.0 of libccid the Free Software CCID class smart card reader driver.

Changes:

1.5.0 - 27 January 2022, Ludovic Rousseau
  • Add support of
    • ACS ACR1281U
    • Circle CCR7125 ICC
    • Circle CIR125 ICC
    • Circle CIR125-DOT ICC
    • Circle CIR215 CL with iProduct 0x2100
    • Circle CIR315 DI
    • Circle CIR315 with idProduct: 0x0324
    • Circle CIR315 with idProduct: 0x7004
    • Circle CIR415 CL
    • Circle CIR515 ICC
    • Circle CIR615 CL
    • Circle CIR615 CL & 1S
    • ELYCTIS CL reader
    • Nitrokey Nitrokey 3
    • Thales Shield M4 Reader
  • Add support of simultaneous slot access on multi slots readers
  • Use FeliCa instead of Felica on SONY request
  • Fix SafeNet eToken 5110 SC issue
  • Allow vendor control commands for Omnikey 5427 CK
  • Always compute readTimeout to use a value greater than default 3 seconds
  • Check the bSeq value when receiving a CCID frame
  • Avoid logging errors when a reader is removed
  • Some other minor improvements

Friday, January 21, 2022

Multi-thread and Atomic

Multi-thread programming seams easy but it is difficult to write correct multi-threading code.

For example pcsc-lite and my CCID driver use threads and are not (yet) perfect. One problem in particular is the access to the same variable from different threads.

C11 standard defines the Atomic types to make multi-thread programming easier.

Source code

This source code exhibits the problem.

#include <pthread.h>
#include <stdio.h>

enum CONSTANTS {
    NUM_THREADS = 1000,
    NUM_ITERS = 1000
};

_Atomic int global_a = 0;
int global = 0;

static void* main_thread(void *arg)
{
    (void)arg;

    int i;
    for (i = 0; i < NUM_ITERS; ++i)
    {
        global_a++;
        global++;
    }
    return NULL;
}

int main(void)
{
    int i;
    pthread_t threads[NUM_THREADS];

    for (i = 0; i < NUM_THREADS; ++i)
        pthread_create(&threads[i], NULL, main_thread, NULL);
    for (i = 0; i < NUM_THREADS; ++i)
        pthread_join(threads[i], NULL);

    printf("global_a %d %s\n", global_a,
        global_a == NUM_THREADS * NUM_ITERS ? "OK" : "FAIL");

    printf("global   %d %s\n", global,
        global == NUM_THREADS * NUM_ITERS ? "OK" : "FAIL");

    return 0;
}

Result

If I compile and run the sample code I get:

global_a 1000000 OK
global   660409 FAIL
or, with another execution:
global_a 1000000 OK
global   691552 FAIL

You can see that the variable global that is NOT declared with _Atomic does not have the expected value. Some updates of the variable value failed (were skipped).

Another option if you do not want or can't use _Atomic is to use pthread_mutex_lock() and pthread_mutex_unlock() to protect the accesses to the variable. But the code is then harder to read.

Impact on pcsc-lite and libccid

The problem was reported by andrei-datcu in the pull request No data races in EHStatusHandlerThread.

I then fixed different problems in these changes (non-exhautive list):

And simplified the code by removing a mutex in Remove mutex and use _Atomic instead.

Conclusion

The next versions of pcsc-lite and libccid will be safer and more correct.

Tuesday, October 12, 2021

No more error logs when a USB reader is removed

When a USB reader was removed you got error logs from the CCID driver. Something like:

00000000 [140295925790464] ccid_usb.c:871:WriteUSB() write failed (1/22): -4 LIBUSB_ERROR_NO_DEVICE
00000506 [140295934183168] ccid_usb.c:871:WriteUSB() write failed (1/22): -4 LIBUSB_ERROR_NO_DEVICE

 

Why?

The first error is because IFDHICCPresence() sends the CCID command PC_to_RDR_GetSlotStatus to know if a card is present.

The second error is because IFDHCloseChannel() sends the CCID command PC_to_RDR_IccPowerOff to power off the card.

But since the USB device has been removed these 2 CCID commands fails and logs the error.  

 

Solution

I had to modify both pcsc-lite (the middleware) and libccid (the smart card reader driver) so they both cooperate to fix the problem.

Now when pcscd detects that a reader has been removed it uses IFDHSetCapabilities() with the new tag TAG_IFD_DEVICE_REMOVED to indicate to the driver that the reader has been removed and that there is no point in trying to send commands to a no more connected reader.

 

Bug reports

The problem has been initially reported by a Fedora user at "Bug 2011128 - pcscd spam syslog when the laptop is undocked and the reader is connected through the dock".

Then Jakub Jelen from RedHat forwarded the bug upstream (to me) at "Reader disconnects are noisy in journal/logs #110" so I am aware of the problem.

The problem was then fixed 5 days later in "Use TAG_IFD_DEVICE_REMOVED when the reader is removed" for pcsc-lite and "Avoid logging errors when a reader is removed" for libccid.

Report upstream

The important point here is that users must reports bugs to their distribution. And distributions must report the problems upstream. It works well (in general).

What does not work is if you know of a problem and the problem does not come to me. For example this bug "Memory leak in pcscd" has been reported to pfSense 3 months ago and no one from pfSense took the time to report the bug upstream (to me). They just discussed about how to remove/disable pcsc-lite from pfSense instead.

I don't have a pfSense account so I can't comment on their bug tracker. I can't create an account on the bug trackers of every project that use my software. That is not how it is supposed to work. Distributors should forward bugs to the upstream projects.

I don't know if the problem is because pfSense is a commercial product or if it is because it uses FreeBSD. (be careful, a troll may be hidden in the previous sentence).


Conclusion

Don't be shy, report bugs.

Don't be shy, forward bugs upstream.

Monday, August 30, 2021

New version of libccid: 1.4.36

I just released version 1.4.36 of libccid the Free Software CCID class smart card reader driver.

Changes:

1.4.36 - 30 August 2021, Ludovic Rousseau

  • Add support of
    • Lenovo Lenovo Smartcard Wired Keyboard II
    • REINER SCT tanJack USB
    • SafeNet eToken 5110+ FIPS
    • SafeNet eToken 5300 C
    • jSolutions s.r.o. Multi SIM card reader 4/8
  • parse: fix check when bNumDataRatesSupported = 0

Sunday, July 25, 2021

New version of libccid: 1.4.35

I just released version 1.4.35 of libccid the Free Software CCID class smart card reader driver. 

Changes:

1.4.35 - 25 July 2021, Ludovic Rousseau

  • Add support of
    • ArkSigner Connect2Sign
    • Circle CCR7115 ICC
    • Circle CCR7315
    • Circle CIR215 CL
    • Circle CIR215 PICC
    • Circle CIR315
    • Circle CIR315 (idProduct: 0x3100)
    • Circle CIR315 CL
    • Circle CIR315 Dual & 1S
    • Circle CIR415 CL & 1S
    • Circle Idaxis SecurePIV
    • DUALi DE-ABCM6 RFRW
    • Feitian R701
    • Generic EMV Smartcard Reader (0x058C:0x9590)
    • INMAX DWR18 HC
    • INMAX DWR18 HPC
    • Identiv Identiv uTrust 4711 F CL + SAM Reader
    • Identiv uTrust 3721 Contactless Reader
    • Infocrypt HWDSSL DEVICE
    • Infocrypt Token++ lite
    • MK Technology KeyPass D1
    • SONY Felica RC-S300/P
    • SONY Felica RC-S300/S
    • SONY Felica RC-S660/U
    • SYNNIX CL-2100R
    • SoloKeys Solo 2
    • Spyrus Inc PocketVault P-3X (idProduct: 0x3203)
  • parse: use "ICCD token" for ICCD tokens
  • Support 4 card slots with Feitian R502 C9
  • ccid_usb: ask for bNumDataRatesSupported data rates
  • Solve a performance issue with T=1 and CCID_CLASS_AUTO_PPS_PROP
  • Fix a possible buffer overflow in T0ProcACK
  • IFDHSetProtocolParameters: set IFSC/IFSD only for TPDU readers
  • CCID serial: Reset buffers on failed read
  • Fix yylex missing symbol
  • Gemalto pinpad: fix incorrect bEntryValidationCondition for SecurePINVerify and SecurePINModify
  • Fix bit4id miniLector-EVO pinpad support
  • The Kobil TriBank reader does NOT support extended APDU

Friday, June 4, 2021

A reader for 96 smart cards? sysmoSIMBANK

In a previous article "Accessing a lot of smart cards?" I presented a reader with 8 slots.

The same company, sysmocom, was also working or a reader with 96 slots. The reader is now available.

sysmoSIMBANK

The product web page contains technical details and documentation.

The sysmoSIMBANK familly has two members:

  • 96 slots in 2U 19” rack mount form-factor

  • 192 slots in 4U 19” rack mount form-factor

The 96 slots reader is composed of 12 sysmoOCTSIM readers of 8 slots each so a total of 12 x 8 = 96 slots.

 On the USB bus the reader looks like 12 sysmoOCTSIM CCID devices connected by some USB hubs.

# lsusb -t
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 1: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 3: Dev 12, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 3: Dev 12, If 0, Class=Chip/SmartCard, Driver=, 12M
                |__ Port 3: Dev 12, If 3, Class=Application Specific Interface, Driver=, 12M
                |__ Port 3: Dev 12, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 1: Dev 7, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 1: Dev 7, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 1: Dev 7, If 0, Class=Chip/SmartCard, Driver=, 12M
                |__ Port 1: Dev 7, If 3, Class=Application Specific Interface, Driver=, 12M
                |__ Port 4: Dev 15, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 4: Dev 15, If 0, Class=Chip/SmartCard, Driver=, 12M
                |__ Port 4: Dev 15, If 3, Class=Application Specific Interface, Driver=, 12M
                |__ Port 4: Dev 15, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 2: Dev 9, If 3, Class=Application Specific Interface, Driver=, 12M
                |__ Port 2: Dev 9, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 2: Dev 9, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 2: Dev 9, If 0, Class=Chip/SmartCard, Driver=, 12M
            |__ Port 2: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 1: Dev 8, If 3, Class=Application Specific Interface, Driver=, 12M
                |__ Port 1: Dev 8, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 1: Dev 8, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 1: Dev 8, If 0, Class=Chip/SmartCard, Driver=, 12M
                |__ Port 2: Dev 11, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 2: Dev 11, If 0, Class=Chip/SmartCard, Driver=, 12M
                |__ Port 2: Dev 11, If 3, Class=Application Specific Interface, Driver=, 12M
                |__ Port 2: Dev 11, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 3: Dev 14, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 3: Dev 14, If 0, Class=Chip/SmartCard, Driver=, 12M
                |__ Port 3: Dev 14, If 3, Class=Application Specific Interface, Driver=, 12M
                |__ Port 3: Dev 14, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 4: Dev 17, If 0, Class=Chip/SmartCard, Driver=, 12M
                |__ Port 4: Dev 17, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 4: Dev 17, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 4: Dev 17, If 3, Class=Application Specific Interface, Driver=, 12M
            |__ Port 3: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 2: Dev 13, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 2: Dev 13, If 0, Class=Chip/SmartCard, Driver=, 12M
                |__ Port 2: Dev 13, If 3, Class=Application Specific Interface, Driver=, 12M
                |__ Port 2: Dev 13, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 3: Dev 16, If 3, Class=Application Specific Interface, Driver=, 12M
                |__ Port 3: Dev 16, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 3: Dev 16, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 3: Dev 16, If 0, Class=Chip/SmartCard, Driver=, 12M
                |__ Port 1: Dev 10, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 1: Dev 10, If 0, Class=Chip/SmartCard, Driver=, 12M
                |__ Port 1: Dev 10, If 3, Class=Application Specific Interface, Driver=, 12M
                |__ Port 1: Dev 10, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 4: Dev 18, If 3, Class=Application Specific Interface, Driver=, 12M
                |__ Port 4: Dev 18, If 1, Class=Communications, Driver=cdc_acm, 12M
                |__ Port 4: Dev 18, If 2, Class=CDC Data, Driver=cdc_acm, 12M
                |__ Port 4: Dev 18, If 0, Class=Chip/SmartCard, Driver=, 12M

Each sysmoOCTSIM is composed of 4 interfaces and one interface is the CCID reader (Class=Chip/SmartCard). Here we see 3 USB hubs each connected to 4 sysmoOCTSIM. So a total of 12 sysmoOCTSIM readers.


pcsc_scan output

With 96 readers the output of the pcsc_scan command is impressive.

Using reader plug'n play mechanism
Scanning present readers...
0: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 00
1: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 01
2: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 02
3: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 03
4: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 04
5: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 05
6: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 06
7: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 07
8: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 00
9: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 01
10: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 02
11: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 03
12: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 04
13: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 05
14: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 06
15: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 07
16: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 00
17: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 01
18: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 02
19: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 03
20: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 04
21: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 05
22: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 06
23: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 07
24: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 00
25: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 01
26: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 02
27: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 03
28: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 04
29: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 05
30: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 06
31: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 07
32: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 00
33: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 01
34: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 02
35: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 03
36: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 04
37: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 05
38: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 06
39: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 07
40: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 00
41: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 01
42: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 02
43: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 03
44: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 04
45: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 05
46: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 06
47: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 07
48: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 00
49: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 01
50: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 02
51: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 03
52: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 04
53: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 05
54: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 06
55: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 07
56: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 00
57: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 01
58: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 02
59: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 03
60: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 04
61: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 05
62: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 06
63: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 07
64: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 00
65: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 01
66: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 02
67: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 03
68: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 04
69: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 05
70: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 06
71: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 07
72: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 00
73: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 01
74: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 02
75: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 03
76: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 04
77: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 05
78: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 06
79: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 07
80: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 00
81: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 01
82: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 02
83: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 03
84: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 04
85: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 05
86: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 06
87: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 07
88: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 00
89: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 01
90: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 02
91: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 03
92: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 04
93: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 05
94: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 06
95: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 07
 
Fri Jun  4 18:13:48 2021
  Reader 0: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 1: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B FF 95 00 FF C0 0A 1F 43 80 31 E0 73 36 21 13 57 4A 33 20 07 33 41 41 1F
  Reader 2: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 01 01 01 01 45
  Reader 3: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 03
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9A 94 00 92 02 75 93 11 00 01 02 02 19
  Reader 4: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9D 94 80 1F C3 80 63 AF 03 A0 73 1A 21 1B 83 0F 90 00 F5
  Reader 5: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 94 80 1F C7 80 31 E0 73 FE 21 1B 64 07 07 31 00 82 90 00 F2
  Reader 6: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 1B 65 24 01 09 01 00 81 05 7B
  Reader 7: sysmocom sysmoOCTSIM [CCID] (835a971733353553202020341b1f15ff) 00 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F C7 80 31 A0 73 BE 21 13 67 43 20 07 18 00 00 01 A5
  Reader 8: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 9: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 10: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 11: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 03
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 12: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 13: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 14: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 15: sysmocom sysmoOCTSIM [CCID] (6b44014933353553202020341b3815ff) 01 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 16: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 17: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 18: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 19: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 03
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9A 94 00 92 02 75 93 11 00 01 02 02 10
  Reader 20: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9A 94 00 92 02 75 93 11 00 01 02 02 10
  Reader 21: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9A 94 00 92 02 75 93 11 00 01 02 02 19
  Reader 22: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9A 94 00 92 02 75 93 11 00 01 02 02 19
  Reader 23: sysmocom sysmoOCTSIM [CCID] (9582a74433353553202020341b3315ff) 02 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3D 94 00 2B 04 02 56 00 00 86 60 54 A0 80 00 07
  Reader 24: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 25: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 26: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 27: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 03
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 28: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 29: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 16 94 D0 00 2B 06 F0 00
  Reader 30: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3D 94 00 2B 04 02 56 00 00 86 60 54 A0 80 00 07
  Reader 31: sysmocom sysmoOCTSIM [CCID] (11850ae933353553202020341b3415ff) 03 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 32: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 33: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3F 94 00 80 69 AF 03 45 00 CD 00 00 00 0E 83 18 9F 16
  Reader 34: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 16 94 D0 00 2B 06 F0 00
  Reader 35: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 03
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 36: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 37: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 16 94 D0 00 2B 06 F0 00
  Reader 38: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 39: sysmocom sysmoOCTSIM [CCID] (b4360eaa3335355320202034433215ff) 04 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3D 94 00 2B 04 02 56 00 00 86 60 54 A0 80 00 07
  Reader 40: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 41: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3F 94 00 80 69 AF 03 45 00 CD 00 00 00 0E 83 18 9F 16
  Reader 42: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 43: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 03
  Event number: 0
  Card state: Card removed, 
  Reader 44: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 45: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 16 94 D0 00 2B 06 F0 00
  Reader 46: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3D 94 00 2B 04 02 56 00 00 86 60 54 A0 80 00 07
  Reader 47: sysmocom sysmoOCTSIM [CCID] (f9604bd73335355320202034122c15ff) 05 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3F 94 00 80 69 AF 03 45 00 CD 00 00 00 0E 83 18 9F 16
  Reader 48: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 49: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 94 80 1F C3 80 31 E0 73 FE 21 1B 66 D0 00 2B 18 02 00 37
  Reader 50: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 51: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 03
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3D 94 00 2B 04 02 56 00 00 86 60 54 A0 80 00 07
  Reader 52: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 94 80 1F C3 80 31 E0 73 FE 21 1B 66 D0 00 2B 18 02 00 37
  Reader 53: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 94 80 1F C3 80 31 E0 73 FE 21 1B 66 D0 00 2B 18 02 00 37
  Reader 54: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3D 94 00 2B 04 02 56 00 00 86 60 54 A0 80 00 07
  Reader 55: sysmocom sysmoOCTSIM [CCID] (67c6627c33353553202020341a0515ff) 06 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 94 80 10 C3 80 31 E0 73 FE 21 1B 66 D0 00 2B 18 02 00
  Reader 56: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 57: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 94 80 1F C3 80 31 E0 73 FE 21 1B 66 D0 00 2B 18 02 00 37
  Reader 58: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3D 94 00 2B 04 02 56 00 00 86 60 54 A0 80 00 07
  Reader 59: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 03
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F C3 80 31 E0 73 FE 21 1B B3 E2 02 7E 83 0F 90 00 82
  Reader 60: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 95 80 1F C7 80 31 E0 73 FE 21 1B 66 D0 01 7B 91 0D 00 E5
  Reader 61: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 95 80 1F C7 80 31 A0 73 BE 21 13 67 D0 02 04 09 01 00 00 05
  Reader 62: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 16 96 41 73 74 72 69 64
  Reader 63: sysmocom sysmoOCTSIM [CCID] (c8bf40c433353553202020341b1215ff) 07 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 7D 94 00 00 55 55 53 0A 74 86 93 0B 24 7C 4D 54 68
  Reader 64: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 65: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 1C 94 47 44 23 01 00 01 00 00 03 01 00 00
  Reader 66: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 1B 65 7E 01 09 01 02 81 05 23
  Reader 67: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 03
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B AA 00 40 14 47 47 32 45 54 35 53 34 38 30
  Reader 68: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F C7 80 31 A0 73 BE 21 13 67 43 20 07 18 00 00 01 A5
  Reader 69: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 95 80 1F C7 80 31 E0 73 FE 21 1B 66 D0 01 6C 04 0D 00 67
  Reader 70: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 94 80 10 C3 80 31 E0 73 FE 21 1B 66 D0 00 2B 18 02 00
  Reader 71: sysmocom sysmoOCTSIM [CCID] (183c363033353553202020341b2b15ff) 08 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 72: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 73: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 96 80 1F C3 80 31 E0 73 FE 21 1B 66 D0 01 6C 04 0D 00 60
  Reader 74: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 93 30 01 07 02 01 03 7D
  Reader 75: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 03
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 95 80 1F C7 80 31 E0 73 FE 21 1B 66 D0 01 6C 04 0D 00 67
  Reader 76: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 95 80 1F C7 80 31 E0 73 FE 21 1B 63 E2 0A AA 83 0F 90 00 89
  Reader 77: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B FF 95 00 00 C0 0A 1F 43 80 31 E0 73 36 21 13 57 4A 33 0E 02 31 41 00 88
  Reader 78: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3F 94 00 80 69 AF 03 07 06 68 00 7F 0A 0E 83 3E 9F 16
  Reader 79: sysmocom sysmoOCTSIM [CCID] (5dea892433353553202020341b0f15ff) 09 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 94 00 91 16 91 08 00 01 25 01 00
  Reader 80: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 81: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 96 80 1F C7 80 31 E0 73 FE 21 1B 66 D0 01 7B 5C 0E 00 28
  Reader 82: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 43 80 31 E0 73 36 21 13 57 4A 33 0E 0C 31 41 00 AF
  Reader 83: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 03
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B FF 95 00 00 C0 0A 1F 43 80 31 E0 73 36 21 13 57 4A 33 0E 02 31 41 00 88
  Reader 84: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3F 95 00 80 69 AF 03 0F 02 80 FF FF 06 0E 83 3E 9F 16
  Reader 85: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 11 63 07 52 12 83 07 90 00 8D
  Reader 86: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B BC 94 00 40 14 47 47 33 53 30 35 31 53 31 30 31 30
  Reader 87: sysmocom sysmoOCTSIM [CCID] (9a5f16b433353553202020341b4115ff) 0A 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 95 80 1F C7 80 31 E0 73 FE 21 13 57 4A 33 05 2D 32 34 00 BC
  Reader 88: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
  Reader 89: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 01
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9F 96 80 1F C7 80 31 E0 73 F6 21 13 67 4D 45 01 00 32 01 01 EB
  Reader 90: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 02
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 3D 95 00 80 67 AF 03 0F 01 7C 06 0E 83 3E 9F 16
  Reader 91: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 03
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 9E 95 80 1F C7 80 31 E0 73 FE 21 1B 66 D0 01 6C 04 0D 00 67
  Reader 92: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 04
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 93: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 05
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 7D 94 00 00 55 55 53 0A 74 86 93 0B 24 7C 4D 54 68
  Reader 94: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 06
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 99 18 00 11 88 22 33 44 55 66 77 60
  Reader 95: sysmocom sysmoOCTSIM [CCID] (196a76f633353553202020341b3b15ff) 0B 07
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B 7D 94 00 00 55 55 53 0A 74 86 93 0B 24 7C 4D 54 68

You can see that not all the cards are identical. Some are faster (TA1=96) than other (TA1=95 or TA1=94).

The PC/SC reader name is composed of the constant part "sysmocom sysmoOCTSIM [CCID]", then the USB serial number of the sysmoOCTSIM (like "(196a76f633353553202020341b3b15ff)"), followed by the reader number and slot number.

We have 12 readers so from number 00 to 0B (0x0B = 11). Each sysmoOCTSIM has 8 slots so the slot number is from 00 to 07.

The maximum would be 256 readers with 256 slots each so a total of 65536 cards.

See "What is in a PC/SC reader name?" for more details about PC/SC reader names.


Performances

The 12 internal sysmoOCTSIM readers are independant readers so can be accessed simultaneously. Because of a limitation of my CCID driver with multi-slots readers I discussed in "Accessing a lot of smart cards?" it is not possible to access 2 slots of the same reader at the same time. The accesses to slots of a same reader are serialized even if the reader could allow simultaneous accesses.

I used the same code as in "Accessing a lot of smart cards?" to test the performances. I used only the first slot of each of the 12 sysmoOCTSIM reader

Results

I used the time(1) command to measure the time. Example with 1 card:
$ time make -j 0.test > /dev/null 

real    0m1.203s
user    0m0.249s
sys 0m0.053s
The measures are:
# of cards real user sys
11s 203ms0s 249ms0s 53ms
21s 246ms0s 578ms0s 95ms
31s 274ms0s 904ms0s 191ms
41s 332ms1s 372ms0s 219ms
51s 455ms1s 691ms0s 293ms
61s 549ms1s 951ms0s 510ms
71s 646ms2s 551ms0s 424ms
81s 832ms3s 14ms0s 538ms
91s 906ms3s 390ms0s 645ms
102s 79ms3s 676ms0s 883ms
112s 232ms4s 269ms0s 830ms
122s 419ms4s 599ms1s 73ms

We get the graph:


The system has a 4-core CPU so it is expected that the "real" time is/can be lower than the "user" time.

What is important is that the "real" time grows much slower than the number of readers. The time should even be constant in all cases since the 12 readers can work in parallel, but I guess we have a contention on the USB bus since all the accesses are using the same USB connection. So some serialization has to be done at the USB level.

You can note that to handle 12 cards is it only 2.01 times slower than to handle 1 card. We have a speedup of 6 here.

The reader also has 3 Gigabit Ethernet interfaces (RJ45) so the USB limitation may not be a problem. Note that my CCID driver does not know how to talk to this reader using a network protocol.


Conclusion

Both pcsc-lite and my CCID driver work fine with 96 slots/cards. That is good to know because that is not a setup I used to test and debug the software. I guess it is not a very common setup 😀.

I have no problem making "advertising" for sysmocom products because the company is on the Free Software side of the force. All the software they provide, including the sysmoSIMBANK reader firmware, is Free Software (GNU GPL v2+) and I am happy to give them some visibility.

Thanks to sysmocom for giving me access to the reader.