New version of pcsc-lite: 1.9.3

I just released a new version of pcsc-lite 1.9.3.
pcsc-lite is a Free Software implementation of the PC/SC (or WinSCard) API for Unix systems.

Please do not use or deploy version 1.9.2 (the previous and bogus version) if you depend on systemd to start the pcscd process.


Changes:

1.9.3: Ludovic Rousseau
6 August 2021

  •  fix a stupid regression with systemd introduced in the previous version

pcsc-lite: configuration using /etc/default/pcscd

Version 1.9.2 of pcsc-lite adds a new configuration possibility: systemd EnvironmentFile

 

systemd EnvironmentFile

With systemd it is possible to configure a file that will contain definitions for the process started by systemd. In our case the started process is the daemon pcscd.

The file name is defined in pcscd.service and is, by default, /etc/default/pcscd. You can change the path using --sysconfdir= argument for ./configure.


pcscd environment variables

A first use case is to define environment variables to change the behaviour of pcscd.

For example you can add in this file:

PCSCLITE_FILTER_IGNORE_READER_NAMES="Twin"

so that readers with "Twin" in the name will be ignored.

See "Remove and/or customize PC/SC reader names" for more details and use cases.

You can also define other variables like:

 

pcscd arguments

pcscd is started with the extra parameter $PCSCD_ARGS. By default this variable is empty. But you can define PCSCD_ARGS in /etc/default/pcscd to add more arguments to pcscd.

For example you can use:

PCSCD_ARGS=--debug

to get debug messages in the systemd journal.

To see the pcscd logs in live use:

$ journalctl --unit pcscd --follow


Conclusion

/etc/default/pcscd is a user file so you can edit it as you like. It should not prevent a package upgrade for example.

It is also much simpler and safer than editing systemd files directly.

New version of pcsc-lite: 1.9.2

I just released a new version of pcsc-lite 1.9.2.
pcsc-lite is a Free Software implementation of the PC/SC (or WinSCard) API for Unix systems.

Changes:

1.9.2: Ludovic Rousseau
3 August 2021

  • improve NetBSD support
  • pcsc-spy: version 1.1
    • add option -t|--thread
    • x10 speed increase
    • correctly exit at end-of-file
    • remove, now useless, support of macOS
  • systemd:
    • use /etc/default/pcscd as EnvironmentFile
    • use $PCSCD_ARGS to specify more arguments
  • SetProtocol: Handle IFD_NOT_SUPPORTED from the driver
  • hotplug_libudev.c: sanitize interface name
  • pcsc_demo: change licence from GPLv3 to BSD
  • use Python 3 for Python scripts (psc-spy, UnitaryTests)
  • Some other minor improvements

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

PySCard 2.0.1 released

I just released a new version 2.0.1 of pyscard. PySCard is a python module adding smart cards support (PC/SC) to Python.

The PySCard project is available at:

 

    Changes:

     2.0.1 (June 2021)

    • Add .reconnect() method to high-level API
    • Handle removal of the last reader on Windows
    • Fix support of macOS Big Sur
    • Use Python3 by default
    • Handle bogus ACS ACR122U PICC reader

    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
    1 1s 203ms 0s 249ms 0s 53ms
    2 1s 246ms 0s 578ms 0s 95ms
    3 1s 274ms 0s 904ms 0s 191ms
    4 1s 332ms 1s 372ms 0s 219ms
    5 1s 455ms 1s 691ms 0s 293ms
    6 1s 549ms 1s 951ms 0s 510ms
    7 1s 646ms 2s 551ms 0s 424ms
    8 1s 832ms 3s 14ms 0s 538ms
    9 1s 906ms 3s 390ms 0s 645ms
    10 2s 79ms 3s 676ms 0s 883ms
    11 2s 232ms 4s 269ms 0s 830ms
    12 2s 419ms 4s 599ms 1s 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.

    Accessing a lot of smart cards?

    In "A lot of readers connected to a computer..." I presented a problem you can have when accessing many USB smart card readers.

    It is possible to access a lot of smart cards with a limited number of readers.


    Multislots readers

    As I explained in the previous article:

    One possible solution is to use a CCID reader that can handle many smart cards. The CCID specification defines a feature called "slot". A CCID smart card reader can support up to 256 slots or 256 smart cards.

    The number of slots of a CCID reader is available in the bMaxSlotIndex field. See "CCID descriptor statistics: bMaxSlotIndex". Many readers, 92.91% (in 2013 when I wrote the article), only have one slot.

    Readers may have 2 or more slots but not all the slots can be used at the same time. The maximum number of slots that are usable at the same time is available in the bMaxCCIDBusySlots field. See "CCID descriptor statistics: bMaxCCIDBusySlots". And 98.82% of the readers (again in 2013) are able to handle only 1 slot at a time.

    As of today, only 9 readers (1.53%) have bMaxCCIDBusySlots≥2 so can use 2 or more slots at the same time. But the situation changed since 2013.


    8 slots

    A smart card reader with 8 slots already exists. It is the sysmoOCTSIM I presented in "sysmoOCTSIM: 8 slots reader". This reader has 8 slots. So you can access 8 smart cards with the same USB device (using only 3 USB endpoints). And more importantly, you can access all the 8 slots at the same time.

    192 slots?

    Sysmocom also has the project to build the sysmoSIMBANK-96 and sysmoSIMBANK-192 units with 96 and 192 slots, respectively.

    One limitation is that you have to use Mini-SIM (2FF) format smart cards. But if you plan to use as many as 192 smart cards maybe you can use the adequate form factor for the smart card.


    Multi access performances

    Since I have a sysmoOCTSIM reader I wanted to make some performance tests using my usim_read.py Python program I presented in "Reading a SIM card phone book in Python". One benefit of using Python is that the PC/SC Python wrapper is available for GNU/Linux, macOS and Windows. So no need to port or recompile a program.

    I wanted to make tests on the reference platform for PC/SC and CCID i.e. Windows. I connect the sysmoOCTSIM reader and... nothing. The Windows CCID driver does not recognize the reader, not even the first slot. I am (again) very disappointed by Windows.

    So I will use a Debian GNU/Linux system.

    3 independent readers

    First I start with 3 independent "normal" USB readers:

    With the Cherry reader I get:

    $ time ./usim_read.py 1
    Available readers:
    - Gemalto PC Twin Reader 00 00
    - Cherry GmbH CHERRY SECURE BOARD 1.0 [CHERRY SECURE BOARD 1.0] (00000002JS0405948M3DOGKTHA) 01 00
    - Gemalto PC Twin Reader 02 00
    Using: Cherry GmbH CHERRY SECURE BOARD 1.0 [CHERRY SECURE BOARD 1.0] (00000002JS0405948M3DOGKTHA) 01 00
    Select MF
    Select DF Telecom
    Select EF ADN
    Get Response
    1: Name: Gilles Georges Aime, phone: 1216240521
    2: Name: Lucienne Aimee Bert, phone: 6613167868
    [...]
    249: Name: Loup Regis Laurent., phone: 6056648470
    
    real	0m6,068s
    user	0m0,103s
    sys	0m0,038s

    A total time of 6.068 seconds.

    With the Gemalto reader I get:

    $ time ./usim_read.py 0
    Available readers:
    - Gemalto PC Twin Reader 00 00
    - Cherry GmbH CHERRY SECURE BOARD 1.0 [CHERRY SECURE BOARD 1.0] (00000002JS0405948M3DOGKTHA) 01 00
    - Gemalto PC Twin Reader 02 00
    Using: Gemalto PC Twin Reader 00 00
    Select MF
    Select DF Telecom
    Select EF ADN
    Get Response
    1: Name: Juliette Claire Fra, phone: 0574007144
    2: Name: Luc Nicolas Regis.., phone: 3864760137
    [...]
    249: Name: Solange Marguerite , phone: 0569846150
    
    real	0m5,564s
    user	0m0,093s
    sys	0m0,046s

    A total time of 5.564 seconds.

    The Cherry reader is a bit slower (0.5 s) than the Gemalto reader. This can be explained by the different clock frequencies.
    The Gemalto default clock is: dwDefaultClock: 4.000 MHz
    The Cherry default clock is: dwDefaultClock: 3.685 MHz

    From the CCID driver logs you can see the different communication speeds used.

    For the Gemalto reader we have:

    00000012 [140389477558016] ifdhandler.c:847:IFDHSetProtocolParameters() Set speed to 250000 bauds

    For the Cherry reader we have:

    00000012 [140389477558016] ifdhandler.c:847:IFDHSetProtocolParameters() Set speed to 230312 bauds

    A difference of 8.5% in clock speed generates a difference of 8.5% in communication baud rate, and a difference of ~9% in execution time.

    The Cherry reader has a maximum clock speed of: dwMaximumClock: 14.320 MHz
    The Gemalto reader has a maximum clock speed of: dwMaximumClock: 4.000 MHz

    So the Cherry reader could be much faster. But the CCID driver does not yet support changing the clock speed. If you are interested by this change please contact me.


    Mixing accesses

    We now need to be able to run the usim_read.py program in parallel on the 3 readers. One very easy way to do that is to use the make command with this Makefile file:

    CMD=./usim_read.py
    
    all: 0.test 1.test 2.test
    
    %.test:
    	${CMD} $(@:.test=)
    

    Calling make 0.test will run ./usim_read 0. Calling make will run the 3 targets 0.test, 1.test and 2.test.

    By default make will run the 3 targets sequentially. But if you use make -j the 3 executions will be started in parallel.

     

    Results

    number of readers sequential exe parallel exe
    1 5.564s 5.564s
    2 11.099s 5.533s
    3 17.083s 6.049s

     

    As expected the time grows linearly in the sequential execution, but stays constant in the parallel execution.


    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

    The performance is a bit better on the sysmoOCTSIM reader (5.126s) than on the Gemalto reader (5.564s). I guess the reader is using a slightly higher clock frequency.

    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.

     

    Improving the CCID driver

    It is possible to access all the slots at the same time for the sysmoOCTSIM reader. But the CCID driver needs to be updated.

    If you need to access lots of SIM format smart card at the same time please contact me.


    Conclusion

    Connecting many smart cards to a single computer is possible.

    You can connect many readers but the USB architecture may limit you. Or you can use one or more multi-slot readers to limit the requirements on the USB bus.

    A lot of readers connected to a computer...

    I had planed to write about possible issues when connecting many readers and a new request "Connect 54 tokens in a usb hub" gives me the occasion to write this article.

    pcsc-lite limitation

    By default pcsc-lite is limited to 16 PC/SC readers. It is a known limitation, see "use a list instead of a fixed size array for 16 reader states".

    It is easy to change the value of PCSCLITE_MAX_READERS_CONTEXTS from 16 to whatever you want and rebuild pcsc-lite.


    libccid limitation

    By default my CCID driver also is limited to 16 slots. It is a known limitation, see "use a list instead of a fixed size array for 16 reader states".

    It is easy to change the value of CCID_DRIVER_MAX_READERS from 16 to whatever you want and rebuild libccid.


    USB hardware limitation

    The software limitations are easy to fix. Both pcsc-lite and libccid projects are Free Software for a good reason. You can adapt the software to your needs, within the respect of the software licence.

    The problem now is that the hardware is also limited. Thanks to Harald Welte for mentioning this limitation to me. I am not a PC compatible hardware specialist but I found some interesting information.

    From https://community.intel.com/t5/Embedded-Intel-Core-Processors/Hardware-limitations-on-USB-endpoints-XHCI/td-p/264556 "Hardware limitations on USB endpoints (XHCI)":

    I have spoken to the Linux kernal developers and they state that "Intel Ivy Bridge system xhci host, the 64 endpoint is a hardware limitation."

    From https://acroname.com/blog/how-many-usbs-can-i-connect-acroname "Why Can't I Connect More Usb 3.0 Devices To My System?":

    The XHCI specification allows for a massive 7,906 enpoints! However, common implementations of the XHCI controllers impose their own limit on the total number of endpoints to 96. The most notorious of these Intel's series 8 architectures. This means that the maximum number of common devices which use 3 endpoints able to be attached to an Intel series 8 XHCI host controller is actually 96 endpoints / 3 endpoints per device = 32 devices. This is a known limitation of Intel-based XHCI controllers.

    To make matters worse, USB 3.0 buses live in a strange dual existence with USB 2.0 devices. That is, they live in the similar yet separate tree architecture in parallel with USB 2.0 devices, but they share the same endpoints on XHCI controllers. USB 3.0 devices may implement endpoints on  both the USB 3.0 and 2.0 buses. This will even further reduce the number of devices which can be attached to a single XHCI host controller.

    So the real problem is with the USB controller you use.

    A CCID device uses 3 endpoints: Bulk IN, Bulk OUT and interrupt. If your xHCI controller can only handle 96 endpoints in total you can use a maximum of 96 / 3 = 32 readers. But I guess your computer do not have 32 USB ports available. So you will use one or more USB hubs. A USB hub consumes 4 or 5 endpoints for itself then you can use even less than 32 readers.

    In fact, the limitation to 16 readers in pcsc-lite and libccid is reasonable compared to the hardware limitation of USB controllers.


    Possible solutions

    Special CCID reader

    One possible solution is to use a CCID reader that can handle many smartcards. The CCID specification define a feature called "slot". A CCID smartcard reader can support up to 256 slots or 256 smartcards.

    A CCID reader with support of a high number of slot exists. I plan to write about it in another blog article.

     

    Enlarge your number of USB ports

    Another solution to the hardware limitation may be to add PCI cards with 4 (or more) USB ports.

    The description of such PCI card does not indicate the number of additional endpoints supported. So maybe you will find the controller supports even less than 96 endpoints.

     

    Conclusion

    I regularly get requests to support a "huge" number of smartcard readers. This article will serve as an answer now.

    If you have other solutions please share them.

    Reader Selection: new field "section", new operator "≠"

    In 2015 I presented the service Reader selection in the article "Reader Selection: find the smart card reader you search".

    This service allows you to selected specific readers my list of 589 CCID readers.


    Field "section"

    It is now possible to select readers according to the field "section". This field can have 4 values: supported, shouldwork, unsupported, disabled. It will restrict the search to readers in the selected section.

    For example if you want to list all the readers that can do PIN verification (pinpad readers) and that are in the supported list you use https://ccid.apdu.fr/select_readers/?section=supported&features=PIN%20Verification and you will get the 18 (as of now) readers that match these 2 criteria.


    Operator "≠"

    Previously, the possible operators were:

    • = strict equality (for number or string)
    • ~ match the head of a string
    • ≤ lesser or equal
    • ≥ greater or equal

    I added a new operator "≠" for different.

    For example if you want to list all the readers that can do PIN verification (pinpad readers) and that are NOT in the supported list you use https://ccid.apdu.fr/select_readers/?section%E2%89%A0supported&features=PIN%20Verification and you will get the 65 (as of now) readers that match these 2 criteria.

     

    Combination

    As before you can combine more than once the same selection field. If you want to list the pinpad readers that are NOT in the supported list and that are also NOT in the disabled list you use https://ccid.apdu.fr/select_readers/?section%E2%89%A0supported&features=PIN%20Verification&section%E2%89%A0disabled and you get the pinpad readers that are in the shouldwork list OR in the unsupported list.

    This "≠" operator is a way to get an OR combination that is otherwise not possible. If you have 4 values A, B, C or D and you want to use (A or B) then you can use (NOT C AND NOT D).


    Conclusion

    This service is very useful to select readers will a particularity. Of course you need to know what you are looking for.

    If you want to know more about each of the USB CCID fields I suggest you have a look at my articles from "CCID descriptor statistics". You will learn what each CCID field is used for.

    Writing a SIM card phone book in Python

    In the previous article "Reading a SIM card phone book in Python" I presented a program to read the phone book from a SIM card. I will now present the writing part.

     

    Source code

    The source code is in 2 parts: usim.py and usim_write.py files.

    usim.py is the exact same file as in the previous article.

    usim_write.py is:

    #!/usr/bin/env python3
    
    from smartcard.util import toBytes, padd
    import random
    import usim
    
    
    def get_name():
        # List of firstnames from https://www.data.gouv.fr/fr/datasets/liste-de-prenoms/
        with open(random.choice(['f', 'm'])) as fd:
            lines = list(map(str.strip, fd.readlines()))
        return " ".join([random.choice(lines), random.choice(lines),
                        random.choice(lines)])
    
    
    def get_number():
        numbers = "0123456789"
        phone = list()
        phone.append(random.choice(numbers) + random.choice(numbers))
        phone.append(random.choice(numbers) + random.choice(numbers))
        phone.append(random.choice(numbers) + random.choice(numbers))
        phone.append(random.choice(numbers) + random.choice(numbers))
        phone.append(random.choice(numbers) + random.choice(numbers))
        return " ".join(phone)
    
    
    def new_record(size):
        # size-14 characters for the name
        name = get_name()[0:size-14]
        phone = get_number()
        print("name:", name)
        print("phone:", phone)
        record = padd(list(map(ord, name)), size-14) \
            + padd(toBytes("06 A1 " + phone), 14)
        return record
    
    
    def usim_write(reader_nb):
        # Select the EF ADN
        (size, connection) = usim.usim(reader_nb)
    
        for nbr in range(1, 250):
            record = new_record(size)
            #  Update record
            header = [0xA0, 0xDC]
            record_idx = nbr
            cmd = header + [record_idx, 0x04, size] + record
            data, sw1, sw2 = connection.transmit(cmd)
            if (sw1, sw2) != (0x90, 0x00):
                return
    
    
    if __name__ == "__main__":
        import sys
        if 2 == len(sys.argv):
            reader_nb = int(sys.argv[1])
        else:
            reader_nb = 0
        usim_write(reader_nb)
    


    Comments

    I wanted to have reasonable names and phone numbers in my phone book. So I generate names by randomly selecting 3 first names from 2 lists: the 50 first (by frequency of use) male first names in French stored in the m file, and the 50 first female first names in French stored in the f file. I got the data from https://www.data.gouv.fr/fr/datasets/liste-de-prenoms/. The original list also contains first names from other languages.

    The first 10 lines of m are:

    Pierre
    Juste
    Julien
    Olivier
    Henri
    Jacques
    Philippe
    Nicolas
    Aime
    Antoine
    [...]

    The first 10 lines of f are:

    Marie
    Victoire
    Claire
    Marine
    Reine
    Virginie
    Vienne
    Solange
    Jolie
    Marguerite
    [...]

    For the phone number I just select a random 10-digits number.

    Maybe the entries I created are non functional in a real phone. First check it works for you if you want to reuse this code. Also if you plan to reuse my source code you must read "My blog source code license" first.


    Output

    $ ./usim_write.py 
    Available readers:
    - Gemalto PC Twin Reader
    Using: Gemalto PC Twin Reader
    connecting to Gemalto PC Twin Reader
    Select MF
    > A0 A4 00 00 02 3F 00
    <  [] 9F 22
    Select DF Telecom
    > A0 A4 00 00 02 7F 10
    <  [] 9F 22
    Select EF ADN
    > A0 A4 00 00 02 6F 3A
    <  [] 9F 0F
    Get Response
    > A0 C0 00 00 0F
    < 00 00 21 34 6F 3A 04 00 11 FF 22 01 02 01 22 90 00
    name: Juliette Claire Fran
    phone: 50 47 00 17 44
    > A0 DC 01 04 22 4A 75 6C 69 65 74 74 65 20 43 6C 61 69 72 65 20 46 72 61 6E 06 A1 50 47 00 17 44 FF FF FF FF FF FF FF
    <  [] 90 00
    name: Luc Nicolas Regis
    phone: 83 46 67 10 73
    > A0 DC 02 04 22 4C 75 63 20 4E 69 63 6F 6C 61 73 20 52 65 67 69 73 FF FF FF 06 A1 83 46 67 10 73 FF FF FF FF FF FF FF
    <  [] 90 00
    name: Julien Jeremie Serge
    phone: 89 07 17 20 07
    > A0 DC 03 04 22 4A 75 6C 69 65 6E 20 4A 65 72 65 6D 69 65 20 53 65 72 67 65 06 A1 89 07 17 20 07 FF FF FF FF FF FF FF
    <  [] 90 00
    [...]

    The output is truncated. I do not want to include all the 255 phone numbers.

    If I use usim_read.py (with debug disabled) I get:

    $ ./usim_read.py 
    Available readers:
    - Gemalto PC Twin Reader
    Using: Gemalto PC Twin Reader
    Select MF
    Select DF Telecom
    Select EF ADN
    Get Response
    1: Name: Juliette Claire Fra, phone: 0574007144
    2: Name: Luc Nicolas Regis.., phone: 3864760137
    3: Name: Julien Jeremie Serg, phone: 9870710270
    [...]

    Note that the phone numbers are reversed by group of 2 digits. 50 47 00 17 44 becomes 0574007144.


    Conclusion

    It is as easy to write than to read a SIM phone book.

    My goal here was to be able to write "realistic" phone book entries so that the usim_read.py has "real" data to read and display.

    usim_read.py will be used again in the next episode.