1*bbf21555SRichard Lowe.\" 2*bbf21555SRichard Lowe.\" This file and its contents are supplied under the terms of the 3*bbf21555SRichard Lowe.\" Common Development and Distribution License ("CDDL"), version 1.0. 4*bbf21555SRichard Lowe.\" You may only use this file in accordance with the terms of version 5*bbf21555SRichard Lowe.\" 1.0 of the CDDL. 6*bbf21555SRichard Lowe.\" 7*bbf21555SRichard Lowe.\" A full copy of the text of the CDDL should have accompanied this 8*bbf21555SRichard Lowe.\" source. A copy of the CDDL is also available via the Internet at 9*bbf21555SRichard Lowe.\" http://www.illumos.org/license/CDDL. 10*bbf21555SRichard Lowe.\" 11*bbf21555SRichard Lowe.\" 12*bbf21555SRichard Lowe.\" Copyright 2019 Joyent, Inc. 13*bbf21555SRichard Lowe.\" 14*bbf21555SRichard Lowe.Dd September 12, 2020 15*bbf21555SRichard Lowe.Dt CCIDADM 8 16*bbf21555SRichard Lowe.Os 17*bbf21555SRichard Lowe.Sh NAME 18*bbf21555SRichard Lowe.Nm ccidadm 19*bbf21555SRichard Lowe.Nd CCID administration utility 20*bbf21555SRichard Lowe.Sh SYNOPSIS 21*bbf21555SRichard Lowe.Nm 22*bbf21555SRichard Lowe.Cm list 23*bbf21555SRichard Lowe.Nm 24*bbf21555SRichard Lowe.Cm atr 25*bbf21555SRichard Lowe.Op Fl pvx 26*bbf21555SRichard Lowe.Op Ar device 27*bbf21555SRichard Lowe.Nm 28*bbf21555SRichard Lowe.Cm reader 29*bbf21555SRichard Lowe.Op Ar device 30*bbf21555SRichard Lowe.Sh DESCRIPTION 31*bbf21555SRichard LoweThe 32*bbf21555SRichard Lowe.Nm 33*bbf21555SRichard Loweutility can be used to list the CCID controllers and their slots known to the 34*bbf21555SRichard Lowe.Xr ccid 4D 35*bbf21555SRichard Lowedriver, query the features and capabilities of a CCID controller, and print 36*bbf21555SRichard Lowethe ATR of an ICC (integrated circuit card) that is inserted in a slot on an 37*bbf21555SRichard LoweCCID controller. 38*bbf21555SRichard Lowe.Pp 39*bbf21555SRichard LoweThe information returned by the hardware is printed by 40*bbf21555SRichard Lowe.Nm 41*bbf21555SRichard Lowein a human-readable form where applicable. 42*bbf21555SRichard Lowe.Sh ARGUMENTS 43*bbf21555SRichard Lowe.Nm 44*bbf21555SRichard Loweexpects the following kinds of arguments: 45*bbf21555SRichard Lowe.Bl -tag -width "device" 46*bbf21555SRichard Lowe.It Ar command 47*bbf21555SRichard LoweAny command 48*bbf21555SRichard Lowe.Nm 49*bbf21555SRichard Loweunderstands. 50*bbf21555SRichard LoweSee section 51*bbf21555SRichard Lowe.Sx COMMANDS 52*bbf21555SRichard Lowefor more information. 53*bbf21555SRichard Lowe.It Ar device 54*bbf21555SRichard LoweSpecifies a CCID reader or a slot, either as absolute path to the device node 55*bbf21555SRichard Loweor in a short-hand form. 56*bbf21555SRichard LoweThe short-hand form consists of the reader instance, specified by the driver 57*bbf21555SRichard Lowename 58*bbf21555SRichard Lowe.Qq ccid 59*bbf21555SRichard Lowefollowed by the instance number of the reader, and optionally a slot instance 60*bbf21555SRichard Loweseparated by a 61*bbf21555SRichard Lowe.Qq / , 62*bbf21555SRichard Loweconsisting of the word 63*bbf21555SRichard Lowe.Qq slot 64*bbf21555SRichard Lowefollowed by the slot number. 65*bbf21555SRichard LoweHere's an example for slot 1 on ccid reader 5: 66*bbf21555SRichard Lowe.Qq ccid5/slot1 67*bbf21555SRichard Lowe.El 68*bbf21555SRichard Lowe.Sh COMMANDS 69*bbf21555SRichard Lowe.Bl -tag -width "" 70*bbf21555SRichard Lowe.It Xo 71*bbf21555SRichard Lowe.Nm 72*bbf21555SRichard Lowe.Cm list 73*bbf21555SRichard Lowe.Xc 74*bbf21555SRichard LoweLists the CCID controllers and their slots known to the system and prints their 75*bbf21555SRichard Loweproduct name, device node, card state, and the transport protocol in use. 76*bbf21555SRichard Lowe.It Xo 77*bbf21555SRichard Lowe.Nm 78*bbf21555SRichard Lowe.Cm atr 79*bbf21555SRichard Lowe.Op Fl pvx 80*bbf21555SRichard Lowe.Op Ar device 81*bbf21555SRichard Lowe.Xc 82*bbf21555SRichard LowePrints the ATR of an ICC that is inserted in the specified slot. 83*bbf21555SRichard LoweIf a device is specified it must refer to a certain slot. 84*bbf21555SRichard LoweIf no device is specified the command will print the ATR of all inserted slots 85*bbf21555SRichard Lowein the system. 86*bbf21555SRichard LoweA human-readable summary of the ATR data is printed when no flags are given. 87*bbf21555SRichard LoweThe following options can be used to alter the output of the 88*bbf21555SRichard Lowe.Cm atr 89*bbf21555SRichard Lowecommand: 90*bbf21555SRichard Lowe.Bl -tag -width Ds 91*bbf21555SRichard Lowe.It Fl v 92*bbf21555SRichard LoweVerbose output, the individual bytes of the ATR are printed and decoded 93*bbf21555SRichard Lowein a human-readable form. 94*bbf21555SRichard LoweAdditionally the historic data in the ATR is printed as a hexadecimal dump. 95*bbf21555SRichard Lowe.It Fl x 96*bbf21555SRichard LoweThe complete ATR is printed as a hexadecimal dump. 97*bbf21555SRichard Lowe.El 98*bbf21555SRichard Lowe.It Xo 99*bbf21555SRichard Lowe.Nm 100*bbf21555SRichard Lowe.Cm reader 101*bbf21555SRichard Lowe.Op Ar device 102*bbf21555SRichard Lowe.Xc 103*bbf21555SRichard LowePrint the capabilities of the specified CCID reader. 104*bbf21555SRichard LoweSpecifying slot number is not required but can optionally be specified. 105*bbf21555SRichard LoweIf no device is given, the command will print the capabilities of all attached 106*bbf21555SRichard LoweCCID readers. 107*bbf21555SRichard Lowe.El 108*bbf21555SRichard Lowe.Sh EXIT STATUS 109*bbf21555SRichard LoweThe 110*bbf21555SRichard Lowe.Nm 111*bbf21555SRichard Loweutility exits 0 on success, 1 on any error opening or accessing the device, and 112*bbf21555SRichard Lowe2 if no command or an unknown command are given. 113*bbf21555SRichard Lowe.Sh EXAMPLES 114*bbf21555SRichard Lowe.Bl -tag -width "" 115*bbf21555SRichard Lowe.It Sy Example 1: List all CCID devices 116*bbf21555SRichard Lowe.Bd -literal 117*bbf21555SRichard Lowe# ccidadm list 118*bbf21555SRichard LowePRODUCT DEVICE CARD STATE TRANSPORT SUPPORTED 119*bbf21555SRichard LoweYubikey 4 OTP+U2F+CCID ccid0/slot0 activated APDU (T=1) supported 120*bbf21555SRichard LoweYubikey 4 OTP+U2F+CCID ccid1/slot0 unactivated APDU supported 121*bbf21555SRichard LoweSmart Card Reader USB ccid2/slot0 missing TPDU unsupported 122*bbf21555SRichard LoweSmart Card Reader USB ccid3/slot0 unactivated TPDU unsupported 123*bbf21555SRichard Lowe.Ed 124*bbf21555SRichard Lowe.It Sy Example 2: Get the ATR of a Yubikey 125*bbf21555SRichard Lowe.Bd -literal 126*bbf21555SRichard Lowe# ccidadm atr ccid0/slot0 127*bbf21555SRichard LoweATR for ccid0/slot0 (18 bytes): 128*bbf21555SRichard LoweICC supports protocol(s): T=1 129*bbf21555SRichard LoweCard protocol is negotiable; starts with default T=1 parameters 130*bbf21555SRichard LoweReader will run ICC at ICC's Di/Fi values 131*bbf21555SRichard LoweT=1 properties that would be negotiated: 132*bbf21555SRichard Lowe + Fi/Fmax Index: 1 (Fi 372/Fmax 5 MHz) 133*bbf21555SRichard Lowe + Di Index: 3 (Di 4) 134*bbf21555SRichard Lowe + Checksum: LRC 135*bbf21555SRichard Lowe + Extra Guardtime: 0 136*bbf21555SRichard Lowe + BWI: 1 137*bbf21555SRichard Lowe + CWI: 5 138*bbf21555SRichard Lowe + Clock Stop: 0 (disallowed) 139*bbf21555SRichard Lowe + IFSC: 254 140*bbf21555SRichard Lowe + CCID Supports NAD: no 141*bbf21555SRichard Lowe.Ed 142*bbf21555SRichard Lowe.It Sy Example 2: Get capabilities of a Smart Card Reader 143*bbf21555SRichard Lowe.Bd -literal 144*bbf21555SRichard Lowe# ccidadm reader ccid3 145*bbf21555SRichard LoweReader ccid3, CCID class v1.0 device: 146*bbf21555SRichard Lowe Product: Smart Card Reader USB 147*bbf21555SRichard Lowe Serial: <unknown> 148*bbf21555SRichard Lowe Slots Present: 1 149*bbf21555SRichard Lowe Maximum Busy Slots: 1 150*bbf21555SRichard Lowe Supported Voltages: 151*bbf21555SRichard Lowe + 5.0 V 152*bbf21555SRichard Lowe + 3.0 V 153*bbf21555SRichard Lowe + 1.8 V 154*bbf21555SRichard Lowe Supported Protocols: 155*bbf21555SRichard Lowe + T=0 156*bbf21555SRichard Lowe + T=1 157*bbf21555SRichard Lowe Default Clock: 3.69 MHz 158*bbf21555SRichard Lowe Maximum Clock: 3.69 MHz 159*bbf21555SRichard Lowe Supported Clock Rates: 1 160*bbf21555SRichard Lowe Default Data Rate: 9.92 Kbps 161*bbf21555SRichard Lowe Maximum Data Rate: 318 Kbps 162*bbf21555SRichard Lowe Supported Data Rates: 19 163*bbf21555SRichard Lowe Maximum IFSD (T=1 only): 254 164*bbf21555SRichard Lowe Synchronous Protocols Supported: 165*bbf21555SRichard Lowe + 2-Wire Support 166*bbf21555SRichard Lowe + 3-Wire Support 167*bbf21555SRichard Lowe + I2C Support 168*bbf21555SRichard Lowe Device Features: 169*bbf21555SRichard Lowe + Automatic ICC clock frequency change 170*bbf21555SRichard Lowe + Automatic baud rate change 171*bbf21555SRichard Lowe + Automatic PPS made by CCID 172*bbf21555SRichard Lowe + CCID can set ICC in clock stop mode 173*bbf21555SRichard Lowe + NAD value other than zero accepted 174*bbf21555SRichard Lowe + TPDU support 175*bbf21555SRichard Lowe Maximum Message Length: 271 bytes 176*bbf21555SRichard Lowe.Ed 177*bbf21555SRichard Lowe.El 178*bbf21555SRichard Lowe.Sh INTERFACE STABILITY 179*bbf21555SRichard LoweThe command line interface of 180*bbf21555SRichard Lowe.Nm 181*bbf21555SRichard Loweis 182*bbf21555SRichard Lowe.Sy Evolving . 183*bbf21555SRichard LoweThe output of 184*bbf21555SRichard Lowe.Nm 185*bbf21555SRichard Loweis 186*bbf21555SRichard Lowe.Sy Not-an-Interface 187*bbf21555SRichard Loweand may change any time. 188*bbf21555SRichard Lowe.Sh SEE ALSO 189*bbf21555SRichard Lowe.Xr ccid 4D , 190*bbf21555SRichard Lowe.Xr cfgadm 8 191