PLT-03273 A.2 - OMNIKEY 5023 Software Developer Guide
PLT-03273 A.2 - OMNIKEY 5023 Software Developer Guide
hidglobal.com
Copyright
© 2018-2024 HID Global Corporation/ASSA ABLOY AB. All rights reserved.
This document may not be reproduced, disseminated or republished in any form without the prior written
permission of HID Global Corporation.
Trademarks
HID GLOBAL, HID, the HID Brick logo, the Chain Design, ICLASS, ICLASS SE, SEOS and OMNIKEY are
trademarks or registered trademarks of HID Global, ASSA ABLOY AB, or its affiliate(s) in the US and other
countries and may not be used without permission. All other trademarks, service marks, and product or
service names are trademarks or registered trademarks of their respective owners.
MIFARE, MIFARE Classic, MIFARE DESFire, MIFARE DESFire EV1, MIFARE PLUS and MIFARE Ultralight are
registered trademarks of NXP B.V. and are used under license.
Revision history
Date Description Revision
February 2024 Updated Secure session model introduction. A.2
July 2018 Removed support for MIFARE Ultralight/Ultralight C using PC/SC. A.1
August 2017 Initial release. A.0
Contacts
For additional offices around the world, see www.hidglobal.com/contact/corporate-offices
2 February 2024
Contents
Section 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1 Product description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Key features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Command execution behavior. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Reference documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Abbreviations and definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Section 2: Host interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1 USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Section 3: Contactless card interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.1 Polling mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Section 4: Contactless protocol support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1 ISO/IEC 14443 Type A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2 ISO/IEC 14443 Type B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3 iCLASS 15693 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.4 FeliCa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Section 5: Contactless card communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.1 PC/SC commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.1.1 Command set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.1.2 0xCA – Get Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
5.1.3 0x82 – Load Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
5.1.4 0x86 – General Authenticate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.1.5 0xB0 – Read Binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.1.6 0xD6 – Update Binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.1.7 0xC2 – Increment / Decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.2 User key locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.3 OMNIKEY specific commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.3.1 Response APDU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.3.2 Error response. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.3.3 Reader Information API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.4 Communication examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.4.1 MIFARE Classic 1K/4K example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
February 2024 3
PLT-03273, Rev. A.2
4 February 2024
PLT-03273, Rev. A.2
7.3.12 numberOfAntennas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.3.13 vendorName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.3.14 exchangeLevel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.3.15 serialNumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.3.16 hfControllerType. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.3.17 sizeOfUserEEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61
7.3.18 firmwareLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61
7.4 Contactless configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.4.1 Baud rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.4.1.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
7.4.1.2 Default values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
7.4.2 Common parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
7.4.3 ISO/IEC 14443 Type A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
7.4.4 ISO/IEC 14443 Type B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
7.4.5 FeliCa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
7.4.6 iCLASS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
7.5 Reader EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
7.5.1 EEPROM read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
7.5.2 EEPROM write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
7.6 Reader Configuration Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
7.6.1 applySettings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
7.6.2 restoreFactoryDefaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
7.6.3 rebootDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Section 8: ICAO test commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.1 Command set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.1.1 ICAO commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.1.2 0x92 - ISO/IEC 14443-2: ISO/IEC 14443-2 command APDU . . . . . . . . . . . . . . . . . . . . . . 71
8.1.3 ISO/IEC 14443-2 P1 coding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.1.4 ISO/IEC 14443-2 response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.1.5 0x94 - Transmit Pattern command APDU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.1.6 ICAO Transmit Pattern P1 coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.1.7 ICAO Transmit Pattern P2 coding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.1.8 ICAO Transmit Pattern SW1SW2 response bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.1.9 0x96 - ISO/IEC 14443-3 command APDU. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.1.10 ISO/IEC 14443-3 P1 coding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
8.1.11 ISO/IEC 14443-3 P2 coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
8.1.12 ISO/IEC 14443-3 SW1SW2 response bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
February 2024 5
PLT-03273, Rev. A.2
6 February 2024
Section 1
1 Introduction
February 2024 7
Introduction PLT-03273, Rev. A.2
Note: HID Global is not allowed to support proprietary card layer protocols that may be implemented in the
host device/application. For example, FeliCa application developers must contact Sony and MIFARE
branded products must contact NXP to obtain these card layer protocols. HID Global is constantly
expanding credential support in the reader, so, some card technologies support only the chip UID.
8 February 2024
PLT-03273, Rev. A.2 Introduction
February 2024 9
Introduction PLT-03273, Rev. A.2
10 February 2024
Section 2
2 Host interfaces
The OMNIKEY® 5023 reader supports the following host interface:
■ USB 2.0 Full Speed (12 Mbit/s) Device Port
2.1 USB
The device enumerates as a single device. The OMNIKEY 5023 USB protocol stack implements the following
device class:
■ CCID (Integrated Circuit Cards Interface Device, v1.1)
The USB CCID interface can be used to send Application Protocol Data Unit (APDU) to the reader. The
OMNIKEY 5023 supports the standard PC/SC API (for example, SCardConnect, SCardDisconnect,
SCardTransmit). Consequently, any application software using the PC/SC API commands should be able to
communicate with the reader.
February 2024 11
Host interfaces PLT-03273, Rev. A.2
12 February 2024
Section 3
3 Contactless card interface
The OMNIKEY® 5023 reader is compliant with CCID specifications. Data exchange with a host is done via
Extended APDUs. Since the CCID specification does not define contactless protocols, T=1 protocol is
emulated.
February 2024 13
Contactless card interface PLT-03273, Rev. A.2
Polling operation
Card
Detected
Sniff Card
Reset Command
Reset RF Field
Set Protocol
Wake Card
Anticollision
Active Protocol
Continue to check
for card present Sniff Card
Card Removed
14 February 2024
Section 4
4 Contactless protocol support
Item Description
iso14443aEnable Enables or disables support for ISO/IEC 14443 Type A.
iso14443aRxTxBaudRate Sets the maximum baud rate in the PCD to PICC/PICC to PCD direction.
mifareKeyCache Enable or disable MIFARE key caching.
mifarePreferred Prefers MIFARE mode of a card.
February 2024 15
Contactless protocol support PLT-03273, Rev. A.2
Item Description
iso14443bEnable Enables or disables support for ISO/IEC 14443 Type B.
iso14443bRxTxBaudRate Sets the maximum baud rate in the PCD to PICC/PICC to PCD direction.
Item Description
iCLASS15693Enable Enables or disables support for iCLASS 15693 card polling.
iCLASS15693DelayTime Sets minimum chip response to reader command delay.
iCLASS15693Timeout Sets time to wait for response to a command.
iCLASSActallTimeout Sets time to wait for response to ACT/ACTALL.
4.4 FeliCa
FeliCa support is limited to card selection with only one card present (no anti-collision) and IDm retrieval.
Configurable FeliCa parameters:
Item Description
felicaEnable Enables FeliCa card polling.
felicaRxTxBaudRate Sets the maximum baud rate in both directions.
16 February 2024
Section 5
5 Contactless card communication
Before communicating with a contactless card, it will be necessary to select the card and in some cases,
authenticate with a known key. For a USB-connected host with an operating system the card selection is done
automatically. To enhance the user experience OMNIKEY® 5023 supports so-called key caching that reduces
the number of authentication calls required to access certain areas of a card that use the same key. Key
caching is disabled by default.
Communication with MIFARE Classic, MIFARE Plus (SL1) and iCLASS® credentials is normally done using the
PC/SC APDUs described in the next section. However, MIFARE DESFire cards are only supported using T=CL
pass through commands and the user must handle all of these details of the encryption, authentication,
reading writing etc., in their application code. The following sections include the PC/SC commands required
to communicate with a card. Examples of communication with some specific card types are included in the
next chapter.
February 2024 17
Contactless card communication PLT-03273, Rev. A.2
SW1SW2 Definition
0x9000 Operation successful.
0x6700 Wrong length (Lc or Le).
0x6A81 Function not supported.
0x6B00 Wrong parameter (P1 or P2).
0x6F00 Operation failed.
General: Works with any type of card, unless P1 = 0x01 (see below)
Get Data command response
Note:
■ For the ISO/IEC 14443 Type A Innovision Jewel card, the data field is 7 bytes of 0x00.
■ The number of historical bytes returned is limited to 15.
18 February 2024
PLT-03273, Rev. A.2 Contactless card communication
General: will work with any card type or can be sent using SCardControl().
Load Keys P1 coding (key structure)
b7 b6 b5 b4 b3 b2 b1 b0 Description
0 -- RFU ---- Card key.
1 -- ---- Reader key.
-- 0 --- ---- Fixed to 0. Plain transmission.
-- 0 ---- Stored in volatile memory.
-- 1 ---- Stored in non-volatile memory.
--- 0000 Fixed value 000.
February 2024 19
Contactless card communication PLT-03273, Rev. A.2
Response APDU:
General Authenticate response
20 February 2024
PLT-03273, Rev. A.2 Contactless card communication
b7 b6 b5:0 Description
b5 b4 b3 b2:0
0 0 000 Read block number (P2) without SELECT.
0 0
RFU
1 0 xxx Read block number (P2) with SELECT book 0, page xxx.
1 1 xxx Read block number (P2) with SELECT book 1, page xxx.
0 1 Rread with DES decrypted.
1 0 000000 RFU.
1 1 Read with 3-DES decrypted.
Using P1 to indicate the targeted book and page allows reading the addressed block numbers without a
dedicated prior authentication command. This is only applicable for free accessible blocks e.g. block 0-2 and
5. The most significant bits 6 and 7 of P1 indicate whether the IFD is forced to either read the data in plain or
to decrypt the data using DES or 3DES.
February 2024 21
Contactless card communication PLT-03273, Rev. A.2
Note: If the media is readable then the IFD always returns the number of data bytes according to the Le
value. If Le is less than block size, the data field is cut off the Le position and the return code is 6Cxx,
where xx is the real block size. If Le is greater than the available block size, the IFD returns the number
of available bytes and the return code 6282 (warning end of data reached before Le bytes). If the
application requests a multiple of media block size in the Le field, then the IFD returns all requested
bytes and the return code is 9000. This ensures a high performance particularly for media with "Read
Multiple Blocks" support.
Read Binary SW1SW2 values
22 February 2024
PLT-03273, Rev. A.2 Contactless card communication
Note: iCLASS update binary - selecting the book and page is not necessary because the write operation
requires a prior authentication command. The most significant bits 6 and 7 of P1 indicate whether the
IFD is forced to either write data in plain or to encryption the data using DES or 3DES.
Update Binary response
February 2024 23
Contactless card communication PLT-03273, Rev. A.2
Value Description
0xAx Tag = Operation to be performed:
A0 = Increment
A1 = Decrement
0x09 Length to end of command = 9.
0x80 Tag = Block index.
0x01 Length of value = 1.
0xxx Value = Index of block to be incremented or decremented (1 byte).
0x81 Tag = Value to be added or subtracted.
0x04 Length of value = 4.
xxxxxxxx Value = Value to be added or subtracted from the source block (4 bytes, LSB first).
Increment/Decrement response
24 February 2024
PLT-03273, Rev. A.2 Contactless card communication
February 2024 25
Contactless card communication PLT-03273, Rev. A.2
26 February 2024
PLT-03273, Rev. A.2 Contactless card communication
The IFD supports the INS Byte 70 for vendor specific commands.
P1 and P2 constitute the vendor ID. For OMNIKEY products is the VID = 0x076B. The data field is constructed
as ASN.1 objects/items.
Response for OMNIKEY specific commands
OIDs are organized as a leaf tree under an invisible root node. The following table shows the first root nodes.
Vendor payload command types
The following description explains the DER TLV coded data field.
Note: The L field uses the definite form. For the definite form, the length octets consist of one or more octets,
short form or long form. For the long form, the IFD uses the version with two subsequent octets.
February 2024 27
Contactless card communication PLT-03273, Rev. A.2
Two last bytes of response frame are always the return code, SW1SW2.
In cases of an ISO 7816 violation, the return code is according to ISO 7816-4 and the data field may be empty.
In cases of positive processing or internal errors, the IFD returns SW1SW2 = 9000 and the data field is
encapsulated in the response TAG (9Dh or BDh) or error response TAG (9Eh).
The response includes more than one leaf, depending on the request. Each leaf is encapsulated in the leaf tag.
9E 02 xx yy 90 00
Value Description
0x9E Tag = Error Response.
(0x0E) + (Class Context Specific) + (Primitive)
0x02 Len = 2.
cycle Value byte 1: Cycle in which the error is occurred. See Error Cycle, below.
error Value byte 2: Error code. See Error Code, below.
SW1 0x90
SW2 0x00
Error cycle
28 February 2024
PLT-03273, Rev. A.2 Contactless card communication
Error code
February 2024 29
Contactless card communication PLT-03273, Rev. A.2
Command: 90 5A 00 00 03 xx xx xx 00
Response: 91 00
Read 10 bytes of file xx (the file to be read), starting at byte 0:
Command: 90 BD 00 00 07 xx 00 00 00 0A 00 00 00
Response: xx xx xx xx xx xx xx xx xx xx 91 00
The xx bytes in the response are the data from the file.
For full details of all DESFire commands, refer to the NXP data sheets.
30 February 2024
PLT-03273, Rev. A.2 Contactless card communication
Example 2: Decrement MIFARE block 5 (value = 100) and increment block 6 (value = 2)
FF C2 00 03 16
A1 09 // decrement
80 01 05 // block 5
81 04 64 00 00 00 // value = 100
A0 09 // increment
80 01 06 // block 6
81 04 02 00 00 00 // value = 2
February 2024 31
Contactless card communication PLT-03273, Rev. A.2
Where the data is a DER TLV coded SE processor command. See the following sections for example
commands.
Wrapped SE processor response
Where the data is a DER TLV coded SE processor command. See the following sections for example
commands.
Wrapped SE processor response SW1SW2 bytes
32 February 2024
PLT-03273, Rev. A.2 Contactless card communication
Value Description
0xA0 Tag = SE processor command.
xx Length to end of command.
0xA5 Tag = Process card API.
xx Length to end of command.
0xA5 Tag = Card API Load Key.
xx Length to end of command.
0x80 Tag = Is Persistent.
0x01 Length of value = 1.
0x0x Value = Persistent or volatile flag:
00 = Volatile
01 = Persistent
0x81 Tag = Key Reference OID.
xx....xx Value = Key reference (one of the following):
User key OID (3 bytes, first byte must be 03).
Key reference OID of predefined Secure Channel key (1 byte).
Full OID of user defined Secure Channel key (x bytes).
0x82 Tag = Key Value.
xx Length of the value = x.
xx....xx Value = Value of the key.
There are further optional parameters for Secure Session Key loading. See the iCLASS SE Processor User
Guide (6700-902).
Load Key response
The normal response is just the SW1SW2 code. There is additional data in some error conditions. See the
iCLASS SE Processor User Guide (6700-902).
Load Key example
Load Key OID 03 01 01:
FF 70 07 6B 20 A0 1E A5 1C A5 1A 80 01 01 81 03 03 01 01 82 01 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
Successful response:
90 00
February 2024 33
Contactless card communication PLT-03273, Rev. A.2
Value Description
0xA0 Tag = SE processor command.
xx Length to end of command.
0xA5 Tag = Process card API.
xx Length to end of command.
0xA2 Tag = Card API DESFire.
xx Length to end of command.
0xA1 Tag = DESFire Authenticate Native.
xx Length to end of command.
0x80 Tag = Key number.
0x01 Length of value = 1.
xx Value = Number of the key to be used for authentication (Application Key or Master Key of the DESFire
card).
0x81 Tag = Key reference OID.
0x03 Length of value = 3.
xxxxxx Value = Reference OID of the Key (3 bytes, first byte must be 03).
There are further optional parameters for key diversification. For more details refer to the iCLASS SE
Processor User Guide (6700-902).
DESFire Authenticate Native response
There is no data in the response to this command, just the SW1SW2 code.
DESFire Authenticate Native example
DESFire Authenticate Native:
FF 70 07 6B 10 A0 0E A5 0C A2 0A A1 08 80 01 00 81 03 03 01 01
Successful response:
90 00
34 February 2024
PLT-03273, Rev. A.2 Contactless card communication
Value Description
0xA0 Tag = SE processor command.
0x6 Length to end of command.
0xA5 Tag = Process card API.
0x04 Length to end of command.
0xA2 Tag = Card API DESFire.
0x02 Length to end of command.
0x93 Tag = DESFire Format.
0x00 Length of value = 0.
Value = NULL (no parameters).
February 2024 35
Contactless card communication PLT-03273, Rev. A.2
Value Description
0xA0 Tag = SE processor command.
0x11 Length to end of command.
0xA5 Tag = Process card API.
0x0F Length to end of command.
0xA2 Tag = Card API DESFire.
0x0D Length to end of command.
0xA6 Tag = DESFire Create Application.
0x0B Length to end of command.
0x80 Tag = Application number.
0x03 Length of value = 3.
xxxxxx Value = Application number (3 bytes, MSB first).
0x81 Tag = Key setting 1.
0x01 Length of value = 1.
xx Value = Application master key settings (1 byte).
0x82 Tag = Key setting 2.
0x01 Length of value = 1.
xx Value = Number of keys (1 byte).
36 February 2024
PLT-03273, Rev. A.2 Contactless card communication
Value Description
0xA0 Tag = SE processor command.
0x0B Length to end of command.
0xA5 Tag = Process card API.
0x09 Length to end of command.
0xA2 Tag = Card API DESFire.
0x07 Length to end of command.
0xA0 Tag = DESFire Select Application.
0x05 Length to end of command.
0x80 Tag = Application number.
0x03 Length of value = 3.
xxxxxx Value = Application number (3 bytes, MSB first).
February 2024 37
Contactless card communication PLT-03273, Rev. A.2
Value Description
0xA0 Tag = SE processor command.
xx Length to end of command.
0xA5 Tag = Process card API.
xx Length to end of command.
0xA2 Tag = Card API DESFire.
xx Length to end of command.
0xA8 Tag = DESFire Create Standard Data File.
xx Length to end of command.
0x80 Tag = File number.
0x01 Length of value = 1.
xx Value = Number of file to be created (1 byte):
00 to 0F
(00 to 1F for MIFARE DESFire EV1 cards)
0x82 Tag = Communication Settings.
0x01 Length of value = 1.
0x0x Value = Communication mode of the file (1 byte):
00 = Plain
01 = MAC
03 = Encrypt
0x83 Tag = Access Rights.
xx Length of value = x.
xx...xx Value = Access rights of the file (x bytes).
0x84 Tag = File Size.
0x03 Length of value = 3.
xxxxxx Value = Size of file (3 bytes, MSB first).
38 February 2024
PLT-03273, Rev. A.2 Contactless card communication
Value Description
0xA0 Tag = SE processor command.
xx Length to end of command.
0xA5 Tag = Process card API.
xx Length to end of command.
0xA2 Tag = Card API DESFire.
xx Length to end of command.
0xA4 Tag = DESFire Write Data.
xx Length to end of command.
0x80 Tag = File number.
0x01 Length of value = 1.
xx Value = Number of file to be written (1 byte):
00 to 0F for Standard Data Files
00 to 07 for Backup Data Files
(00 to 1F for MIFARE DESFire EV1 cards)
0x81 Tag = Offset.
0x0x Length of value = x (1 or 2).
xx...xx Value = Offset into file to start writing (1 or 2 bytes).
0x82 Tag = Data Length.
xx Length of value = x.
xx...xx Value = File data to be written.
0x83 Tag = Mode.
0x01 Length of value = 1.
xx Value = Communication mode of the operation (1 byte):
00 = Plain
01 = MAC
03 = Encrypt
0x84 Tag = Commit.
0x01 Length of value = 1.
xx Value = Commit flag (1 byte):
00 = No commit
01 = Commit
February 2024 39
Contactless card communication PLT-03273, Rev. A.2
Value Description
0xA0 Tag = SE processor command.
xx Length to end of command.
0xA5 Tag = Process card API.
xx Length to end of command.
0xA2 Tag = Card API DESFire.
xx Length to end of command.
0xA3 Tag = DESFire Read Data.
xx Length to end of command.
0x80 Tag = File number.
0x01 Length of value = 1.
xx Value = Number of file to be read (1 byte):
00 to 0F for Standard Data Files
00 to 07 for Backup Data Files
(00 to 1F for MIFARE DESFire EV1 cards)
0x81 Tag = Offset.
0x0x Length of value = x (1 or 2).
xx...xx Value = Offset into file to start reading (1 or 2 bytes).
0x82 Tag = Data Length.
0x01 Length of value = 1.
xx...xx Value = File data to be read.
0x83 Tag = Mode.
0x01 Length of value = 1.
xx Value = Communication mode of the operation (1 byte):
00 = Plain
01 = MAC
03 = Encrypt
40 February 2024
PLT-03273, Rev. A.2 Contactless card communication
Value Description
xx...xx Value = File data to be read (255 bytes max)
Value Description
0xA0 Tag = SE processor command.
xx Length to end of command.
0xBE Tag = Get Content Element 2.
xx Length to end of command.
0x80 Tag = Content Element.
0x01 Length of value = 1.
0x04 Value = Physical Access Bits.
February 2024 41
Contactless card communication PLT-03273, Rev. A.2
Value Description
0xA0 Tag = Get Content Element Data.
xx Length to end of command.
0x80 Tag = Get Element Data.
xx Length of value = xx.
xx...xx Value = Content Element Data (e.g. PACS).
0x81 Tag = Secure Object OID.
xx Length of value = xx.
xx...xx Value = OID of the Secure Object containing the returned Content Element.
0x82 Tag = Secure Object Media Edge Type.
0x01 Length of value = 1.
xx Value = Type of media containing the Secure Object:
0 = Unknown
1 = DESFire
2 = MIFARE
3 = iCLASS (PicoPass)
4 = ISO14443AL4
6 = MIFARE Plus
7 = Seos®
42 February 2024
Section 6
6 Secure session model
The secure session model provides a secure way of communicating with the iCLASS SE® processor for
loading keys and reading credentials, etc. As the commands are encrypted, this helps to prevent snooping
of messages between the host application and the reader. In addition to providing a secure way of
communicating with the device, the secure session manages access to data objects. The secure session
model allows for access to certain objects to be conditional, based on the access rights of the user using the
secure session. These access rights are established based on the key used to establish the secure session and
on the access conditions for the particular object being accessed. Although at present the access conditions
are predefined, it is planned that in future firmware versions the user will change these conditions provided
they have administration rights.
Note that the state of the secure session is independent of the CCID state. If a card is removed, powered off
or reset, the secure session will not be reset. Similarly when talking to the reader via PC/SC service, the
secure session will not be closed when the host application closes the connection to the reader.
February 2024 43
Secure session model PLT-03273, Rev. A.2
44 February 2024
PLT-03273, Rev. A.2 Secure session model
February 2024 45
Secure session model PLT-03273, Rev. A.2
APDU Padding
FF B0 00 06 08 80 00 00 00 00 00 00 00 00 00 00
46 February 2024
PLT-03273, Rev. A.2 Secure session model
APDU Padding
FF 70 07 6B 04 A1 02 A2 00 80 00 00 00 00 00 00
Encrypted message:
FF 70 07 6B
20
xx xx xx xx xx xx xx xx // xx = Enc(APDU+PADDING, S-ENC)
xx xx xx xx xx xx xx xx
yy yy yy yy yy yy yy yy // yy = C-MAC
yy yy yy yy yy yy yy yy
00
Response APDU:
Terminate Secure Session response APDU
Note: Up to version 1.0, the iCLASS SE processor does not support the PC/SC command; it works only with
the iCLASS SE processor internal SAM command samCommandSecureChannelTerminate.
iCLASS SE processor internal secure channel terminate command
February 2024 47
Secure session model PLT-03273, Rev. A.2
48 February 2024
PLT-03273, Rev. A.2 Secure session model
As the command header is not sent when using a secure session, the part that must be encrypted and
sent through the secure session is:
February 2024 49
Secure session model PLT-03273, Rev. A.2
50 February 2024
Section 7
7 Reader configuration
All OMNIKEY® 5023 configurable items are identified by a unique ASN.1 leaf. A full description is given below,
including default values and example APDU commands to get and set.
February 2024 51
Reader configuration PLT-03273, Rev. A.2
52 February 2024
PLT-03273, Rev. A.2 Reader configuration
February 2024 53
Reader configuration PLT-03273, Rev. A.2
Root Branch
readerCapabilities (0x02) tlvVersion (0x00)
deviceID (0x01)
productName (0x02)
productPlatform (0x03)
enabledCLFeatures (0x04)
firmwareVersion (0x05)
hfControllerVersion (0x08)
hardwareVersion (0x09)
hostInterfacesFlags (0x0A)
numberOfContactSlots (0x0B)
numberOfContactlessSlots (0x0C)
numberOfAntennas (0x01)
vendorName (0x01)
exchangeLevel (0x01)
serialNumber (0x01)
hfControllerType (0x01)
sizeOfUserEEProm (0x01)
firmwareLabel (0x01)
7.3.1 tlvVersion
Tag 0x00
Access Read-only.
Type INTEGER.
Length 1 byte.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 80 00 00
Sample response BD 03 80 01 01 90 00
54 February 2024
PLT-03273, Rev. A.2 Reader configuration
7.3.2 deviceID
Tag 0x01
Access Read-only.
Length 2 bytes.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 81 00 00
Sample response BD 04 81 02 00 06 90 00
7.3.3 productName
Tag 0x02
Access Read-only.
Length Variable.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 82 00 00
Sample response BD 0F 82 0D 4F 4D 4E 49 4B 45 59 20 35 30 32 33 00 90 00
7.3.4 productPlatform
Tag 0x03
Access Read-only.
Length Variable.
Description The name of the platform on which the product is based, “AViatoR” for OMNIKEY 5023.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 83 00 00
Sample response BD 0A 83 08 41 56 69 61 74 6F 52 00 90 00
February 2024 55
Reader configuration PLT-03273, Rev. A.2
7.3.5 enabledCLFeatures
Tag 0x04
Access Read-only.
Length 2 bytes.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 84 00 00
Sample response BD 04 84 02 0B 91 90 00
CL features:
0x0001 – FeliCa support.
0x0002 – EMVCo support.
0x0004 – Calypso support.
0x0008 – NFC P2P support.
0x0010 – SIO processor available.
0x0020 – SDR (LF processor) available.
0x0040 – Native FW Secure Engine.
0x0080 – T=CL support.
0x0100 – ISO 14443 A support.
0x0200 – ISO 14443 B support.
0x0800 – PicoPass 15693-2 support.
0x1000 – PicoPass 14443B-2 support.
0x2000 – PicoPass 14443A-3 support.
0x4000 – RFU.
0x8000 – RFU.
56 February 2024
PLT-03273, Rev. A.2 Reader configuration
7.3.6 firmwareVersion
Tag 0x05
Access Read-only.
Length 3 bytes.
Description The version number of the reader’s firmware. 1st byte is Major, 2nd byte is Minor, 3rd byte
is revision number.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 85 00 00
Sample response BD 05 85 03 01 00 00 90 00
7.3.7 hfControllerVersion
Tag 0x08
Access Read-only.
Length 1 byte.
Description The version of the HF front end used for controlling high frequency credentials.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 88 00 00
Sample response BD 03 88 01 18 90 00
7.3.8 hardwareVersion
Tag 0x09
Access Read-only.
Length Variable.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 89 00 00
Sample response BD 11 89 0F 50 43 42 2D 30 30 30 34 34 20 52 45 56 32 00 90 00
February 2024 57
Reader configuration PLT-03273, Rev. A.2
7.3.9 hostInterfaceFlags
Tag 0x0A
Access Read-only.
Length 1 byte.
Description Provides information on the interfaces supported by the reader for communication with
the host. Bit 1 (0x02) = USB interface.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 8A 00 00
Sample response BD 03 8A 01 02 90 00
7.3.10 numberOfContactSlots
Tag 0x0B
Access Read-only.
Length 1 byte.
Description Number of contact slots supported by the reader. 0 for OMNIKEY 5023.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 8B 00 00
Sample response BD 03 8B 01 00 90 00
58 February 2024
PLT-03273, Rev. A.2 Reader configuration
7.3.11 numberOfContactlessSlots
Tag 0x0C
Access Read-only.
Length 1 byte.
Description The number of contactless PCSC slots supported by the reader. 1 for OMNIKEY 5023.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 8C 00 00
Sample response BD 03 8C 01 01 90 00
7.3.12 numberOfAntennas
Tag 0x0D
Access Read-only.
Length 1 byte.
Description The number of antennas the reader contains. 1 for OMNIKEY 5023.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 8D 00 00
Sample response BD 03 8D 01 01 90 00
7.3.13 vendorName
Tag 0x0F
Access Read-only.
Length 1 byte.
Description The vendor of the reader, “HID Global” for OMNIKEY 5023.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 8F 00 00
Sample response BD 0D 8F 0B 48 49 44 20 47 6C 6F 62 61 6C 00 90 00
February 2024 59
Reader configuration PLT-03273, Rev. A.2
7.3.14 exchangeLevel
Tag 0x11
Access Read-only.
Length 1 byte.
Value Bit mask. 0x01 – TPDU, 0x02 – APDU, 0x04 – Extended APDU.
Description Provides information about the different APDU levels supported by the reader. 0x04 for
OMNIKEY 5023 (Extended APDU).
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 91 00 00
Sample response BD 03 91 01 02 90 00
7.3.15 serialNumber
Tag 0x12
Access Read-only.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 92 00 00
Sample response BD 19 92 17 4B 54 2D 30 38 36 33 30 30 33 30 2D 31 36 31 30 2D 30 30 30 31 31 34 90
00
7.3.16 hfControllerType
Tag 0x13
Access Read-only.
Description The IC used for control of HF credentials. “RC663” for OMNIKEY 5023.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 93 00 00
Sample response BD 08 93 06 52 43 36 36 33 00 90 00
60 February 2024
PLT-03273, Rev. A.2 Reader configuration
7.3.17 sizeOfUserEEPROM
Tag 0x14
Access Read-only.
Length 2 bytes.
Description The amount of user EEPROM memory available. For OMNIKEY 5023 1024 bytes.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 94 00 00
Sample response BD 04 94 02 04 00 90 00
7.3.18 firmwareLabel
Tag 0x16
Access Read-only.
Length Variable.
Get APDU FF 70 07 6B 08 A2 06 A0 04 A0 02 96 00 00
Sample response BD 35 96 33 4F 4B 35 30 32 32 2D 31 2E 30 2E 30 2E 32 37 30 2D 32 30 31 36 30 31 32
36 54 31 35 32 30 32 34 2D 30 36 43 41 35 34 31 46 30 38 32 41 2D 46 4C 41 53 48 90
00
February 2024 61
Reader configuration PLT-03273, Rev. A.2
Root Branch
contactlessSlotConfiguration contactlessCommon pollingSearchOrder (0x09)
(0x04) (0x00)
emdSuppresionEnable (0x07)
iso14443aConfig (0x02) iso14443aEnable (0x00)
iso14443aRxTxBaudRate (0x01)
mifareKeyCache (0x03)
mifarePreferred (0x04)
iso14443bConfig (0x03) iso14443bEnable(0x00)
iso14bRxTxBaudRate (0x01)
felicaConfig (0x05) felicaEnable (0x00)
felicaRxTxBaudRate (0x01)
iClassConfig (0x06) iClass15693Enable (0x03)
iClass15693DelayTime (0x04)
iClass15693Timeout (0x05)
iClassActallTimeout (0x06)
62 February 2024
PLT-03273, Rev. A.2 Reader configuration
7.4.1.1 Examples
0x00 – 106 kbps for Rx and Tx
0x23 – 106 and 424 kbps for Rx and 106, 212, 424 kbps for Tx
0x71 – 106, 212, 424, 848 kbps for Rx and 106, 212 kbps for Tx
Tag 0x09
Access Read/write.
Length 5 bytes.
Set APDU FF 70 07 6B 0F A2 0D A1 0B A4 09 A0 07 89 05 xx xx xx xx xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A0 02 89 00 00
Sample response BD 07 89 05 xx xx xx xx xx 90 00
The command expects 5 bytes which indicate polling order. Byte position sets priority of the protocol.
Protocol on the first byte is checked first and protocol on 5th byte as the last one. Values assigned to
protocols:
0x00 – none
0x02 – ISO/IEC 14443 Type A
0x03 – ISO/IEC 14443 Type B
0x04 – iCLASS® ISO/IEC 15693
0x06 – FeliCa
For example 02 03 04 06 means order: ISO/IEC 14443 Type A, ISO/IEC 14443 Type B, iCLASS ISO/IEC 15693,
FeliCa. To support only ISO/IEC 14443 Type A protocol use: 02 00 00 00 00.
Note: If a protocol is not included in the search order table, the card will not be recognized even if the
specific protocol is enabled.
February 2024 63
Reader configuration PLT-03273, Rev. A.2
emdSupressionEnable
Tag 0x07
Access Read/write.
Type INTEGER.
Length 1 byte.
Set APDU FF 70 07 6B 0B A2 09 A1 07 A4 05 A0 03 87 01 xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A0 02 87 00 00
Sample response BD 03 87 01 xx 90 00
Tag 0x00
Access Read/write.
Type INTEGER.
Length 1 byte.
Set APDU FF 70 07 6B 0B A2 09 A1 07 A4 05 A2 03 80 01 xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A2 02 80 00 00
Sample response BD 03 80 01 xx 90 00
iso14443aRxTxBaudRate
Tag 0x01
Access Read/write.
Type INTEGER.
Length 1 byte.
Description Sets supported baud rates for ISO/IEC 14443 Type A cards.
Set APDU FF 70 07 6B 0B A2 09 A1 07 A4 05 A2 03 81 01 xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A2 02 81 00 00
Sample response BD 03 81 01 xx 90 00
64 February 2024
PLT-03273, Rev. A.2 Reader configuration
mifareKeyCache
Tag 0x03
Access Read/write.
Type INTEGER.
Length 1 byte.
Set APDU FF 70 07 6B 0B A2 09 A1 07 A4 05 A2 03 83 01 xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A2 02 83 00 00
Sample response BD 03 83 01 xx 90 00
mifarePreferred
Tag 0x04
Access Read/write.
Type INTEGER.
Length 1 byte.
Set APDU FF 70 07 6B 0B A2 09 A1 07 A4 05 A2 03 84 01 xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A2 02 84 00 00
Sample response BD 03 84 01 xx 90 00
Tag 0x00
Access Read/write.
Type INTEGER.
Length 1 byte.
Set APDU FF 70 07 6B 0B A2 09 A1 07 A4 05 A3 03 80 01 xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A3 02 80 00 00
Sample response BD 03 80 01 xx 90 00
February 2024 65
Reader configuration PLT-03273, Rev. A.2
iso14443bRxTxBaudRate
Tag 0x01
Access Read/write.
Type INTEGER.
Length 1 byte.
Description Sets supported baud rates for ISO/IEC 14443 Type B cards.
Set APDU FF 70 07 6B 0B A2 09 A1 07 A4 05 A3 03 81 01 xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A3 02 81 00 00
Sample response BD 03 81 01 xx 90 00
7.4.5 FeliCa
felicaEnable
Tag 0x00
Access Read/write.
Type INTEGER.
Length 1 byte.
Set APDU FF 70 07 6B 0B A2 09 A1 07 A4 05 A5 03 80 01 xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A5 02 80 00 00
Sample response BD 03 80 01 xx 90 00
felicaRxTxBaudRate
Tag 0x01
Access Read/write.
Type INTEGER.
Length 1 byte.
Set APDU FF 70 07 6B 0B A2 09 A1 07 A4 05 A5 03 81 01 xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A5 02 81 00 00
Sample response BD 03 81 01 xx 90 00
66 February 2024
PLT-03273, Rev. A.2 Reader configuration
7.4.6 iCLASS
iCLASS15693Enable
Tag 0x03
Access Read/write.
Type INTEGER.
Length 1 byte.
Set APDU FF 70 07 6B 0B A2 09 A1 07 A4 05 A6 03 83 01 xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A6 02 83 00 00
Sample response BD 03 83 01 xx 90 00
iCLASS15693DelayTime
Tag 0x04
Access Read/write.
Type INTEGER.
Length 4 bytes.
Value Timeout.
Set APDU 70 07 6B 0E A2 0C A1 0A A4 08 A6 06 84 04 xx xx xx xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A6 02 84 00 00
Sample response BD 06 84 04 xx xx xx xx 90 00
iCLASS15693Timeout
Tag 0x05
Access Read/write.
Type INTEGER.
Length 4 bytes.
Value Timeout.
Set APDU 70 07 6B 0E A2 0C A1 0A A4 08 A6 06 85 04 xx xx xx xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A6 02 85 00 00
Sample response BD 06 85 04 xx xx xx xx 90 00
February 2024 67
Reader configuration PLT-03273, Rev. A.2
iCLASSActallTimeout
Tag 0x06
Access Read/write.
Type INTEGER.
Length 4 bytes.
Value Timeout.
Set APDU 70 07 6B 0E A2 0C A1 0A A4 08 A6 06 86 04 xx xx xx xx 00
Sample response BD 00 90 00
Get APDU FF 70 07 6B 0A A2 08 A0 06 A4 04 A6 02 86 00 00
Sample response BD 06 86 04 xx xx xx xx 90 00
Root Branch
readerEEPROM (0x07) eepromOffset (0x01)
eepromRead (0x02)
eepromWrite (0x03)
Access Read-only.
Length Variable.
Get APDU FF 70 07 6B 0D A2 0B A0 09 A7 07 81 02 yy yy 82 01 nn 00
Sample response 9D ss xx xx xx xx xx 90 00
68 February 2024
PLT-03273, Rev. A.2 Reader configuration
Access Write-only.
Length Variable.
Get APDU FF 70 07 6B 11 A2 0F A1 0D A7 0B 81 02 yy yy 83 ss xx xx xx xx xx 00
Sample response 9D 00 90 00
Root Branch
readerConfigurationControl applySettings (0x00)
(0x09)
restoreFactoryDefaults (0x01)
rebootDevice (0x03)
7.6.1 applySettings
Tag 0x00
Access Write-only.
Type
Length
Value None.
Description Apply settings. This command must be used to accept changes in the reader
configuration. The only settings that takes changes immediately are:
iso14443aRxTxBaudRate, iso14443bRxTxBaudRate, felicaRxTxBaudRate.
The commands resets the device.
Get APDU FF 70 07 6B 08 A2 06 A1 04 A9 02 80 00 00
Sample response 9D 00 90 00
February 2024 69
Reader configuration PLT-03273, Rev. A.2
7.6.2 restoreFactoryDefaults
Tag 0x01
Access Write-only.
Type
Length
Value None.
Description Sets reader configuration to factory defaults. The command resets the device.
Get APDU FF 70 07 6B 08 A2 06 A1 04 A9 02 81 00 00
Sample response 9D 00 90 00
7.6.3 rebootDevice
Tag 0x03
Access Write-only.
Type
Length
Value None.
Get APDU FF 70 07 6B 08 A2 06 A1 04 A9 02 83 00 00
Sample response 9D 00 90 00
70 February 2024
Section 8
8 ICAO test commands
All of the ICAO test commands are attempted regardless of card presence or type.
General: Any data received back from the card is ignored in this test.
February 2024 71
ICAO test commands PLT-03273, Rev. A.2
General: This test can be used to transmit and/or receive data to/from the card. No parity bit or CRC bytes
are added, but framing (that is, start/stop bits, SOF/EOF) WILL be added. This is NOT fully compliant with the
ICAO test standard.
72 February 2024
PLT-03273, Rev. A.2 ICAO test commands
February 2024 73
ICAO test commands PLT-03273, Rev. A.2
74 February 2024
PLT-03273, Rev. A.2 ICAO test commands
February 2024 75
ICAO test commands PLT-03273, Rev. A.2
Note: ATQB comprises: 0x50 + PUPI (4 bytes) + APP (4 bytes) + PROTO (3 bytes) +CRCB (2 bytes).
76 February 2024
PLT-03273, Rev. A.2 ICAO test commands
Note: Data Out may also contain an SW1SW2 from the card.
February 2024 77
ICAO test commands PLT-03273, Rev. A.2
78 February 2024
Appendix A
A Using PC_to_RDR_Escape command
The PC/SC layer does not allow the use of the SCardTransmit API unless the reader has previously signalled
the presence and activation of a card. This prevents the use of commands such as the ICAO test commands
or the HID commands without being able to properly recognize and activate a card. In order to be able to use
these commands even without a previous card activation, the same functionality of pseudo-APDUs (CLA =
‘FF’) is provided through the PC_to_RDR_Escape command.
To use the PC_to_RDR_Escape command with the default Microsoft CCID driver, the functionality must be first
enabled in the Windows registry.
To issue the PC_to_RDR_Escape command without a card being present, the reader must be first opened with
the SCardConnect function with the following settings:
dwShareMode = SCARD_SHARE_DIRECT
dwPreferredProtocols = 0
Then the vendor IOCTL for the Escape command is defined as follows:
#define IOCTL_CCID_ESCAPE SCARD_CTL_CODE(3500)
or:
SCardControl(hCard, SCARD_CTL_CODE(3500), …)
The data in the lpInBuffer parameter of the length given in nInBufferSize are copied to the abData field of the
PC_to_RDR_Escape command and all the data in the response in RDR_to_PC_Escape abData field are copied
back to the lpOutBuffer.
The abData field of the PC_to_RDR_Escape must contain the pseudo-APDU to be executed (typically, an
ICAO test command or reader configuration). The maximum allowed size of abData in PC_to_RDR_Escape is
currently 262 bytes and the maximum size of the response data in the abData field in the RDR_to_PC_Escape
response is 464 bytes. The PC_to_RDR_Escape and RDR_to_PC_Escape do not support any form of chaining
to extend the lengths of the supported parameters.
February 2024 79
hidglobal.com