Update based on 99200078-8.01: Update usage tables for
0x1A, 0xA1, 0xA2; apply consistent captions to tables and
figures; add kernel IDs; clarify HID Usages; add 0x1F, 0x2E
usages in report descriptor and elsewhere; add BLE properties;
misc. clarifications and accuracy fixes; add Report 0x06
bitmap option, Report 0x1F, Report 0x2E
Printed in the United States of America
Information in this publication is subject to change without notice and may contain technical inaccuracies
or graphical discrepancies. Changes or improvements made to this product will be updated in the next
publication release. No part of this document may be reproduced or transmitted in any form or by any
means, electronic or mechanical, for any purpose, without the express written permission of MagTek, Inc.
MagTek® is a registered trademark of MagTek, Inc.
MagnePrint® is a registered trademark of MagTek, Inc.
Magensa™ is a trademark of MagTek, Inc.
MagneSafe™ is a trademark of MagTek, Inc.
DynaPro™ and DynaPro Mini™ are trademarks of MagTek, Inc.
Bluetooth® is a registered trademark of Bluetooth SIG.
iPhone®, iPod®, iPad®, and Mac® are registered trademarks of Apple Inc., registered in the U.S. and
other countries. App StoreSM is a service mark of Apple Inc., registered in the U.S. and other countries.
IOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used by Apple
Inc. under license.
Microsoft® and Windows® are registered trademarks of Microsoft Corporation.
All other system names and product names are the property of their respective owners.
MagTek warrants that the products sold pursuant to this Agreement will perform in accordance with
MagTek’s published specifications. This warranty shall be provided only for a period of one year from
the date of the shipment of the product from MagTek (the “Warranty Period”). This warranty shall apply
only to the “Buyer” (the original purchaser, unless that entity resells the product as authorized by
MagTek, in which event this warranty shall apply only to the first repurchaser).
During the Warranty Period, should this product fail to conform to MagTek’s specifications, MagTek
will, at its option, repair or replace this product at no additional charge except as set forth below. Repair
parts and replacement products will be furnished on an exchange basis and will be either reconditioned or
new. All replaced parts and products become the property of MagTek. This limited warranty does not
include service to repair damage to the product resulting from accident, disaster, unreasonable use,
misuse, abuse, negligence, or modification of the product not authorized by MagTek. MagTek reserves
the right to examine the alleged defective goods to determine whether the warranty is applicable.
Without limiting the generality of the foregoing, MagTek specifically disclaims any liability or warranty
for goods resold in other than MagTek’s original packages, and for goods modified, altered, or treated
without authorization by MagTek.
Service may be obtained by delivering the product during the warranty period to MagTek (1710 Apollo
Court, Seal Beach, CA 90740). If this product is delivered by mail or by an equivalent shipping carrier,
the customer agrees to insure the product or assume the risk of loss or damage in transit, to prepay
shipping charges to the warranty service location, and to use the original shipping container or equivalent.
MagTek will return the product, prepaid, via a three (3) day shipping service. A Return Material
Authorization (“RMA”) number must accompany all returns. Buyers may obtain an RMA number by
contacting MagTek Support Services at (888) 624-8350.
Each buyer understands that this MagTek product is offered as is. MagTek makes no other warranty,
express or implied, and MagTek disclaims any warranty of any other kind, including any warranty of
merchantability or fitness for a particular purpose.
If this product does not conform to MagTek’s specifications, the sole remedy shall be repair or
replacement as provided above. MagTek’s liability, if any, shall in no event exceed the total amount paid
to MagTek under this agreement. In no event will MagTek be liable to the buyer for any damages,
including any lost profits, lost savings, or other incidental or consequential damages arising out of the use
of, or inability to use, such product, even if MagTek has been advised of the possibility of such damages,
or for any claim by any other party.
LIMITATION ON LIABILITY
Except as provided in the sections relating to MagTek’s Limited Warranty, MagTek’s liability under this
agreement is limited to the contract price of this product.
MagTek makes no other warranties with respect to the product, expressed or implied, except as may be
stated in this agreement, and MagTek disclaims any implied warranty, including without limitation any
implied warranty of merchantability or fitness for a particular purpose.
MagTek shall not be liable for contingent, incidental, or consequential damages to persons or property.
MagTek further limits its liability of any kind with respect to the product, including any negligence on its
part, to the contract price for the goods.
MagTek’s sole liability and buyer’s exclusive remedies are stated in this section and in the section
relating to MagTek’s Limited Warranty.
FCC WARNING STATEMENT
This equipment has been tested and was found to comply with the limits for a Class B digital device
pursuant to Part 15 of FCC Rules. These limits are designed to provide reasonable protection against
harmful interference when the equipment is operated in a residential environment. This equipment
generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with
the instruction manual, may cause harmful interference with radio communications. However, there is no
guarantee that interference will not occur in a particular installation.
FCC COMPLIANCE STATEMENT
This device complies with Part 15 of the FCC Rules. Operation of this device is subject to the following
two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any
interference received, including interference that may cause undesired operation.
CANADIAN DOC STATEMENT
This digital apparatus does not exceed the Class B limits for radio noise from digital apparatus set out in
the Radio Interference Regulations of the Canadian Department of Communications.
Le présent appareil numérique n’émet pas de bruits radioélectriques dépassant les limites applicables aux
appareils numériques de la classe B prescrites dans le Réglement sur le brouillage radioélectrique édicté
par le ministère des Communications du Canada.
This Class B digital apparatus complies with Canadian ICES-003.
Cet appareil numérique de la classe B est conformé à la norme NMB-003 du Canada.
CE STANDARDS
Testing for compliance with CE requirements was performed by an independent laboratory. The unit
under test was found compliant with standards established for Class B devices.
UL/CSA
This product is recognized per Underwriter Laboratories and Canadian Underwriter Laboratories 1950.
ROHS STATEMENT
When ordered as RoHS compliant, this product meets the Electrical and Electronic Equipment (EEE)
Reduction of Hazardous Substances (RoHS) European Directive 2002/95/EC. The marking is clearly
recognizable, either as written words like “Pb-free,”“lead-free,” or as another clear symbol ().
This document describes the master command set available through byte-by-byte direct communication
with DynaPro Mini PIN encryption devices (referred to in this document as “the device”).
1.2 Nomenclature
The general terms “device” and “host” are used in different, often incompatible ways in a multitude of
specifications and contexts. For example “host” may have different meanings in the context of USB
communication than it does in the context of networked financial transaction processing. In this
document, “device” and “host” are used strictly as follows:
Device refers to the Pin Encryption Device (PED) that receives and responds to the command set
specified in this document.
Host refers to the piece of general-purpose electronic equipment the device is connected or paired to,
which can send data to and receive data from the device. Host types include PC and Mac
computers/laptops, tablets, smartphones, teletype terminals, and even test harnesses. In many cases
the host may have custom software installed on it that communicates with the PED. When “host”
must be used differently, it is qualified as something specific, such as “USB host.”
Because the BLE communication layer uses a very specific meaning for the term “Application,” (see
section 2.3 How to Use BLE Connections) this document favors the term software for software on the
host that provides an interface for the operator, such as a cashier. The combination of device(s), host(s),
software, firmware, configuration settings, physical mounting and environment, user experience, and
documentation is referred to as the solution.
Similarly, the word “user” is used in different ways in different contexts. In command names in this
document, user generally refers to the cardholder.
1.3 About Connection Types
DynaPro Mini uses a common communication protocol across a variety of physical connection layers,
which can include universal serial bus (USB), Apple 30-pin dock connector, and Bluetooth Low Energy
(BLE). The set of available connection layers depends on the device. Details for communicating with
devices via each physical connection type are provided in section 2 Connection Types.
1.4 About Device Features
The information in this document applies to multiple devices. When developing solutions that use a
specific device or set of devices, integrators must be aware of each device’s communication interfaces,
features, and configuration options, which affect the availability and behavior of some commands. Table
1-1 provides a list of device features that may impact command availability and behavior.
MagTek provides convenient Application Programming Interface (API) libraries for some connection
types and development frameworks. These APIs wrap the details of the connection in an interface that
conceptually parallels the device’s internal operation, freeing developers from dealing with the details of
the connection, and allowing them to focus on software business logic. In cases where API libraries are
available, developers also have the option to revert to direct communication with the device using
libraries available in the chosen development framework. This document provides information and
support for the latter method. Information about using MagTek APIs is available in separate
documentation, including 99875394 DynaPro/IPAD Programmer’s Reference (.NET).
2 Connection Types
Table 1-1 above includes a list of connection types available for each device. The following subsections
provide details developers will need to communicate with the devices using each connection type.
2.1 How to Use USB Connections
The devices conform to the USB specification revision 2.0, and are compatible with revision 1.1. They
also conform to the Human Interface Device (HID) class specification version 1.1, and communicate as
vendor-defined HID devices. This document assumes the reader is familiar with USB HID class
specifications, which are available at www.usb.org.
Developers can easily create custom software using any framework that can make API calls to the
standard Windows USB HID driver, such as Visual Basic or Visual C++. MagTek has developed
demonstration software that communicates with the device via this method, and developers can use it to
test the device and to provide a starting point for developing other software. For more information, see
the MagTek web site, or contact your reseller or MagTek Support Services.
These devices are full speed high-powered USB devices that, when connected, draw power from the USB
bus. They identify themselves with vendor ID 0x0801 and product ID 0x3009. The devices will enter
and wake up from Suspend mode when directed to do so by the USB host. They do not support remote
wakeup.
This device has programmable configuration properties stored in non-volatile memory. The properties
are configured via the USB port and can be configured at the factory, by the key loader, or by the end
user. More details can be found in section 3 Command Set in this document, and in a separate document
which provides details about key loading.
2.1.1 About HID Usages
2.1.1.1 About Reports
HID devices send and receive data using reports. Each report can contain several sections, called
usages, each of which has its own unique four-byte identifier. The two most significant bytes of a usage
are called the usage page, and the least two significant bytes are called the usage ID. Vendor-defined
usages must have a usage page in the range 0xFF00 – 0xFFFF, and it is common practice for related
usage IDs to share the same usage page. For these reasons, all usages for these devices use vendordefined usage page 0xFF20.
HID reports used by the host can be divided into three types:
Feature Reports (documented in section 3.4 General Feature Reports). Feature reports can be
further divided into Get types and Set types. The host exclusively uses this type of report to send
commands to the device and to receive synchronous responses from the device.
Input Reports (documented in section 3.5 General Input Reports) are used by the device to send
asynchronous responses or notifications to the host when a related feature report completes, or
automatically when the device’s state changes. This is common when a command depends on
cardholder action (for example, Report 0x03 – Request Swipe Card or Report 0x04 – Request PIN Entry) or otherwise takes more time to run.
Output Reports. Output reports are part of the HID standard, but are not used by these devices.
The host uses HID Set Feature Reports to send commands to the device, and HID Get Feature Reports to
retrieve data or responses from the device when synchronous response is appropriate. The general
sequence for using feature reports to send a command and receive a response is as follows:
1) Send the feature report (command), which could be either a Get or Set type.
2) Read Report 0x01 – Response ACK for acknowledgement, which includes the command number
being acknowledged and a one-byte status indicating whether the device accepted the command.
3) For some commands, the host would then call a Get feature report to read the device’s response.
4) For some commands, the host would instead expect the device to send an asynchronous response via
an HID Input Report using a USB Interrupt IN transaction when the command finishes executing.
2.1.1.2 About the Report Descriptor
The list of the device’s available reports and their structure is sent to the host in a report descriptor,
usually just after the device is connected to the USB port. Generally the details of the report descriptor
are abstracted by the developer’s HID API; however, should it become necessary to examine a report
descriptor byte-by-byte, a full inventory of the report descriptor for these devices is provided in Table 2-1, which also indicates whether each report is a Get type or Set type or both. The reports themselves
are fully documented in the sections that follow.
When DynaPro Mini is connected to an iOS host via the Apple 30-pin dock connector, custom apps use
iPod Accessory Protocol (iAP1) to communicate with DynaPro Mini using the EASession class. The
custom software wraps commands in simple Get/Set wrappers, also called a UART packet header. The
device firmware expects to receive and send data using the same formats produced by the iAP
iPodDataTransfer and AccessoryDataTransfer commands, respectively. Documentation for
these formats is available from Apple, specifically in MFi Accessory Firmware Specification R44 (see
http://developer.apple.com/programs/mfi/). Sample code is available in the form of Apple’s EADemo
app; see https://developer.apple.com/library/IOS/samplecode/EADemo/Introduction/Intro.html.
Because the command set is common to all connection types, it is also helpful to read section 2.1.1 About HID Usages to become familiar with the types of available commands.
The devices only use TXD and RXD; hardware handshaking is not available. The serial settings are
57600 bps, No parity, 8 data bits, and 1 stop bit. Code upgrade commands are not available through
this connection. To communicate with a device using the UART connection, the host should begin all
commands and responses with the following UART packet header:
Command/Response as defined in section 3 Command Set.
IMPORTANT: Generally, iOS commands must be transmitted in MSB (big endian) order.
By convention, this document gives commands in LSB (little endian) order.
2.3 How to Use BLE Connections
This section provides information about developing software for a BLE-capable host that needs to
interface with the device using Bluetooth Low Energy (BLE). In this arrangement, the device will act as
a BLE server/peripheral, and the host will act as a client/central. The custom software wraps commands
in simple Get/Set wrappers, and should use whatever BLE library is appropriate for the chosen software
development framework. For example, iOS custom apps use Apple’s CoreBluetooth Framework, for
which sample code is available in the form of Apple’s Temperature Sensor app; see
https://developer.apple.com/library/IOS/samplecode/TemperatureSensor/Introduction/Intro.html.
Because the command set is common to all connection types, it is also helpful to read section 2.1.1 About HID Usages to become familiar with the types of available commands.
In its default configuration, the BLE module can be toggled between Advertising and not Advertising (for
example, for airline travel) as follows:
If the device is Advertising, press and hold the power button for 7 seconds or longer to reset the BLE
module and turn Advertising off. The device will also reset to this state if the battery completely
discharges.
If the device is not Advertising, press and release the power button, or connect the device to USB
power.
Some of the details described in this section may be abstracted by the libraries in the chosen development
framework. For general information about BLE and the associated terms, see the Bluetooth specifications
found at https://www.bluetooth.org/Technical/Specifications/adopted.htm.
The general steps for a host to communicate with the device via BLE are as follows. Refer to Table 2-3
for details about each BLE Characteristic (in this case, “Application” refers to the device):
1) If the device has been recently reset or has had its battery replaced, re-enable BLE Advertising by
pressing and releasing the power button or connecting the device to USB power.
2) Scan for nearby BLE peripherals advertising the desired GATT service UUID.
3) If multiple devices of the desired type are available, examine each device’s name property. A
specific device’s default name is a constant, equal to the product name plus a dash and the least
significant 4 digits of its Bluetooth address.
4) Establish a BLE connection with the device. If the device is not already powered on, it will start
powering on when the host establishes a connection. The power-on sequence takes about 10 seconds.
Any application data the host sends before the power-on sequence is complete will be lost.
5) Pair with the device using passkey 000000. In many cases this step is user-driven.
6) Configure the device to notify the host when the Application Data To Host Length
characteristic changes. The host should then use this notification as a trigger to read the
Application Data To Host characteristic and process incoming data from the device. The
specific method to enable notifications for a characteristic is different in different BLE development
libraries. For example, iOS code would be similar to [servicePeripheral setNotifyValue:YES forCharacteristic:characteristic].
20:02:B6:0C:41:E3:43:F8:8F:89:82:AD:F8:E6:08:05
Application Data From Host
65 bytes
21:02:B6:0C:41:E3:43:F8:8F:89:82:AD:F8:E6:08:05
Application Data To Host Length
1 byte
22:02:B6:0C:41:E3:43:F8:8F:89:82:AD:F8:E6:08:05
Application Data To Host
128 bytes
23:02:B6:0C:41:E3:43:F8:8F:89:82:AD:F8:E6:08:05
Bit 7 6 5 4 3 2 1 0
Byte 0
0x00 = Get
0x01 = Set
Byte 1
… Byte n
Request data as defined below and in section 3 Command Set.
7) Send commands to the device by writing to the Application Data From Host Length
characteristic, then to the Application Data From Host characteristic; receive notifications
that the device has changed the Application Data To Host Length characteristic, and read
the corresponding incoming data from the Application Data To Host characteristic.
8) The device will stay powered on until the host terminates the BLE connection, or until a user powers
off the device using the power switch. Powering off causes the device to terminate the BLE
connection. To conserve power, always power off the device when it is not in use.
Table 2-3 - BLE Characteristics and UUIDs
To communicate with a device using the BLE connection, hosts should begin all commands and
responses with the following header:
The command / response for a Get report are formatted as follows:
Request from Host
Byte 0 0 (Get)
Byte 1 Report ID
Response from Device
Byte 0 Report ID
Byte 1 - n Report
Maximum report size is 63 bytes.
The command / response for a Set report are formatted as follows:
Request from Host
Byte 0 1 (Set)
Byte 1 Report ID
Byte 2 – n Report
Maximum report size is 63 bytes.
This section describes the full device command set. Because the command set is common to all
connection types, it is helpful to first read and understand section 2.1.1 About HID Usages to become
familiar with the types of available commands.
3.1 About Big Block Data Mode
The device’s big block data mode supports feature reports (commands sent from the host to the device)
and input reports (events sent from the device to the host) that require special treatment of data involved.
Special treatment can include large data sizes, encryption / decryption, encoding / decoding, and so on.
Using big block data mode for feature reports involves using Report 0x10 – Send Big Block Data to Device to load the big block data buffer with the relevant data, then invoking the command.
Using big block data mode for input reports involves sending the desired command, then receiving an
event notification Report 0x29 – Send Big Block Data to Host and unpacking the data.
This document includes specific information for using big block data mode in the usage information for
each report that uses it.
3.2 About SRED / Non-SRED Firmware
Devices can be loaded with one of two types of firmware, depending on how the integrator wants the
device to transmit card data to the host:
The SRED version of the firmware enables Secure Reading and Exchange of Data. In this mode, the
device will not allow complete unmasking of card data, such as the PAN.
In some cases, the solution may require further options for unmasking and encrypting card data
before the device transmits it to the host. In those cases, the device can be loaded with the NonSRED version of the firmware.
All commands and responses in this chapter that are tagged “MAC” require the host to calculate and
append the device unique serial number and a MAC signature to the message per ANSI X9.19 -1996 – Financial Institution Retail Message Authentication.
Data for “MAC” commands is staged using big block data buffers. For information about using big block
mode, section 3.1 About Big Block Data Mode. After the host sends the big block data to the device, it can then send the “MAC” tagged command.
The key used will be depend on the message; it will be the MAC variant of either the MSR or AMK key.
For CA Public Key configuration, the host should use the AMK MAC variant (because no encryption is
involved). For big block batch data and smart card ARQC requests, the host should use the MSR MAC
variant. These commands require the encrypted block to begin with a two-byte header in big-endian form
(MSB first) that contains the expected length of the message after decryption, excluding data padding and
CBC-MAC.
The following sections provide details about the required tag structures for each of these requests.
3.3.1 CA Public Key Data and Terminal and Payment Brand Data (TLV format)
AAAA /* 2-byte MSB message length excluding padding and CBC-MAC */
F9<len> /* container for MAC structure and generic data */ DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
<Buffer if any to make blocks as multiple of 8 bytes>
<CBC-MAC (4 bytes, use MAC variant of AMK)>
3.3.2 ARQC Requests (Smart Cards)
3.3.2.1 Non-SRED ARQC request
Begin with a two-byte header in big-endian form (MSB first) that contains the expected length of the
message after decryption (included as <len> in the sample below), excluding data padding and CBCMAC. Use container F9 for the MAC structure, container FA for passing the non-encrypted ARQC
message, and use the MAC variant of the MSR DUKPT key.
AAAA /* 2-byte MSB message length excluding padding and CBC-MAC */
F9<len> /* container for MAC structure and generic data */
DFDF54(MAC KSN)<len><val>
DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
70<len> /*container for ARQC */
F4<len>/* container tag for encrypted MSR data, if
present */
DFDF36 <EncT1status><len><val>
DFDF37 <EncT1data><len><val>
DFDF38 <EncT2status><len><val>
DFDF39 <EncT2data><len><val>
DFDF3A <EncT3status><len><val>
DFDF3B <EncT3data><len><val>
DFDF3C <Encrypted Magneprint Data><len><val>
DFDF3D <Magneprint Status><len><val>
DFDF43 <Magneprint Status Data><len><val>
DFDF50(MSR KSN Data)<len><val> /*sent in the
clear*/
DFDF51(MSR EncryptionType)<len><val>
F5<len>/* container tag for encrypted PIN data
(normally debit card)*/
99(Encrypted PIN DATA)<len><val>
DFDF41(PIN KSN Data)<len><val>
DFDF42(PIN EncryptionType)<len><val>
(Buffer if any to be a multiple of 8 bytes)
CBC-MAC (4 bytes, use MAC variant of MSR DUKPT key)
3.3.2.2 SRED ARQC Request
Begin with a two-byte header in big-endian form (MSB first) that contains the expected length of the
message after decryption, excluding data padding and CBC-MAC. Use container F9 for the MAC
structure, use container F8 within container FA for passing the encrypted ARQC message, and use the
MAC variant of the MSR DUKPT key.
AAAA /* 2-byte MSB message length excluding padding and CBC-MAC */
F9<len> /* container for MAC structure and generic data */
DFDF54(MAC KSN)<len><val>
DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
70<len> /*container for ARQC */
F8<len> /*container tag for encryption */
DFDF59(Encrypted Data
Primitive)<len><Encrypted Data val (Decrypt data to read tags)>
DFDF56(Encrypted Transaction Data
KSN)<len><val>
DFDF57(Encrypted Transaction Data
Encryption Type)<val>
DFDF58(# of bytes of padding in
DFDF59)<len><val>
(Buffer if any to be a multiple of 8 bytes)
CBC-MAC (4 bytes, use MAC variant of MSR DUKPT key)
The Value inside tag DFDF59 is encrypted and contains the following after decryption:
FC<len>/* container for encrypted generic data */
F4<len>/* container tag for encrypted MSR
data */
DFDF36 <EncT1status><len><val>
DFDF37 <EncT1data><len><val>
DFDF38 <EncT2status><len><val>
DFDF39 <EncT2data><len><val>
DFDF3A <EncT3status><len><val>
DFDF3B <EncT3data><len><val>
DFDF3C <Encrypted Magneprint
Data><len><val>
Response from host (key used must be the same as KSN in ARQC request). Use container F9 for the
MAC structure, use F8 within FA for passing the encrypted ARQC message, use MAC variant of MSR
DUKPT key. This example assumes an acquirer host response of 70 04 8A 02 30 30:
AAAA /* 2-byte MSB message length excluding padding and CBC-MAC */
F9<len> /* container for MAC structure and generic data */
DFDF54 (MAC KSN)<len><val>
DFDF55 (Mac Encryption Type><len><val>
DFDF25 (IFD Serial Number)<len><val>
FA<len> /* Container for generic data */
70 04 8A 02 30 30
(ARQC padding, if any, to be a multiple of 8 bytes)
CBC-MAC (4 bytes, use MAC variant of MSR DUKPT key that was used in
ARQC request, from message length up to and including ARQC padding, if
any)
3.3.3 Batch Data
3.3.3.1 Non-SRED Batch Data
Begin with a two-byte header in big-endian form (MSB first) that contains the expected length of the
message after decryption, excluding data padding and CBC-MAC. Use container F9 for the MAC
structure, FA for passing non-encrypted batch data message, use MAC variant of MSR DUKPT key.
AAAA /* 2-byte MSB message length excluding padding and CBC-MAC */
F9<len> /* container for MAC structure and generic data */
DFDF54(MAC KSN)<len><val>
DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
F0<len> /* Transaction Results */
F1<len> /* container for Status Data */
… /* Status Data tags */
F2<len>/* container for Batch Data */
… /* Batch Data tags */
F3<len>/* container for Reversal Data, if any */
… /* Reversal Data tags */
F7<len>/* container for Merchant Data */
… /* < Merchant Data tags */
(Buffer if any to be a multiple of 8 bytes)
CBC-MAC (4 bytes, use MAC variant of MSR DUKPT key)
3.3.3.2 SRED Batch Data
Begin with a two-byte header in big-endian form (MSB first) that contains the expected length of the
message after decryption, excluding data padding and CBC-MAC. Use container F9 for the MAC
structure, use F8 within FA for passing encrypted batch data message, use MAC variant of MSR DUKPT
key.
AAAA /* 2-byte MSB message length excluding padding and CBC-MAC */
F9<len> /* container for MAC structure and generic data */
DFDF54(MAC KSN)<len><val>
DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
F0<len> /* Transaction Results */
F1<len> /* container for Status Data */
… /* Status Data tags */F8<len> /* container tag for encryption */
DFDF59(Encrypted Data Primative)<len><Encrypted
Data val (Decrypt data to read tags)>
DFDF56(Encrypted Transaction Data KSN)<len><val>
DFDF57(Encrypted Transaction Data Encryption
Type)<val>
DFDF58(# of bytes of padding in DFDF59)<len><val>
F7<len>/* container for Merchant Data */
… /* < Merhcant Data tags */
(Buffer if any to be a multiple of 8 bytes)
CBC-MAC (4 bytes, use MAC variant of MSR DUKPT key)
The Value inside tag DFDF59 is encrypted and contains the following after decryption:
FC<len>/* container for encrypted generic data */
F2<len>/* container for Batch Data */
… /* Batch Data tags */F3<len>/* container for Reversal Data, if any */
… /* Reversal Data tags */
Notes:
1 - ARQC request encrypted message: 70<len> F8 <len><encrypted data>
2 - Batch data includes batch and merchant data and for declined transactions, reversal data as well.
This command causes the device to send the host a response status (“ACKSTS”, see Appendix C Status
and Message Table), and the Report ID of the command the host has just executed. The host should get
this report immediately after it sends any command to the device to determine whether or not the device
accepted the command as sent.
Table 3-1 - Usage Table for Report 0x01
3.4.2 Report 0x02 – End Session
This command clears all existing session data including PIN, PAN, and amount. The device returns to
the idle state and sets the display to the specified Welcome screen. Use of message IDs 1-4 require that
the associated bitmaps have been previously loaded during configuration; otherwise, use 0 for
displayMsg and the device will display its default “Welcome” screen (shown below).
Wait time in seconds, (1 – 255; 0 = infinite wait time)
Byte 2
Card Message ID to display:
0 = Swipe Card / Idle alternating
1 = Swipe Card
2 = Please Swipe Card
3 = Please Swipe Card Again
4 = Chip Error, Use Mag Stripe
Byte 3
Tones:
0 = No sound
1 = One beep
2 = Two beeps
3.4.3 Report 0x03 – Request Swipe Card
This command causes the device to prompt the user to swipe a card by displaying one of four
predetermined messages (see Card Message ID in Table 3-3). Example request screens look like this:
Figure 3-2 - DynaPro Mini Initial Swipe Prompt
The device will report an error in ACKSTS of Report 0x01 – Response ACK in the following cases:
System Error (0x80)
Bad parameter (0x82)
PAN already exists in the device (0x84)
System is not available (0x8A)
When this command completes (card swiped OK, user cancelled, or timeout), the device will send Report
0x22 – Card Status Report to the host. If the Card and Operation Status are both OK, the host should then send Report 0x0A – Request MSR Data to get the card data.
This command causes the device to prompt the user to enter a PIN by displaying one of five
predetermined messages (see PIN Mode in Table 3-4). The messages look like this:
Figure 3-3 - DynaPro Mini Initial PIN Prompt
The device will report an error in ACKSTS of Report 0x01 – Response ACK in the following cases:
Bad parameter (0x82)
System is locked, meaning more than 120 PINs were entered within one hour (0x87)
System is not available (0x8A)
If PIN amount is required, no amount has been sent (0x8B)
If no error occurs, when the command completes (PIN entry done, user cancelled, or timeout), the device
will send Report 0x24 – PIN Response Report to the host using a USB Interrupt IN transaction. If PIN
entry is successful, the report will also contain the PIN KSN (if using a DUKPT PIN Key, otherwise the
PIN KSN will be zero) and the encrypted PIN block (EPB) data. The EPB format will depend on the PIN
option and Session State (see Report 0x20 – Device State Report). If there is no PAN (from card swipe
or sent via command), the EPB will use ISO format 1. If a PAN exists, the PIN option will be used to
determine if the created PIN block will be ISO format 0 or ISO format 3. If the host set the PIN Mode
byte in the command to “Verify PIN,” the device will prompt the user to enter the PIN twice, and will
generate an EPB only if both entries match. The EPB is encrypted under the current PIN DUKPT key as
DES or TDES depending on the injected key type. If the host set the Wait Msg bit in the command’s PIN
Options byte, the device will display a “Please Wait” message during the delay as the unit is checking for
keypad tamper, then will display the Enter PIN message. The most significant nybble of the PIN options
(Byte 5) is RESERVED.
Message ID:
0 = Transaction type Credit / Debit
1 = Verify Transaction Amount
2 = Transaction type Credit / Other / Debit
3 = Transaction type Credit / EBT / Debit
4 = Transaction type Credit / Gift/ Debit
5 = Transaction type EBT / Gift / Other
Byte 3
Mask Key:
3.4.5 Report 0x05 – Cancel Command
This command cancels the current command.
Table 3-5 - Usage Table for Report 0x05
3.4.6 Report 0x06 – Request User Selection
This command causes the device to prompt the user to select the transaction type (debit, credit, etc.) or to
verify the transaction amount, as shown below:
Figure 3-4 - DynaPro Mini "Amount OK" User Selection Screen
An error will be reported in ACKSTS of Report 0x01 – Response ACK in the following cases:
Bad parameter (0x82)
System is not available (0x8A)
If transaction amount is required, no amount has been sent (0x8B)
If no error occurs, when the command completes (selection made, user cancelled, or timeout), the device
will do the following:
1) Clear the display
2) Return to the idle state
3) Send Report 0x25 – User Selection Response Report to the host
Tones:
Start Transaction Tones Only:
0 = No sound
1 = One beep
2 = Two beeps
Start Transaction & Timeout Tones:
100 = No start beep, no timeout
101 = One start beep, no timeout
102 = Two start beep, no timeout
Bit
7 6 5 4 3 2 1
0
Byte 0
0x07
Byte 1
Wait Time in seconds, (1 – 255; 0 = infinite wait time)
3.4.7 Report 0x07 – Display Message
This command causes the device to display a predefined message for a specified time. Examples are
shown below.
Figure 3-5 - DynaPro Mini Messages
An error will be reported in ACKSTS of Report 0x01 – Response ACK in the following cases:
Bad parameter (0x82)
System is not available (0x8A)
If no error occurs, when the command completes (message displayed, user cancelled, or timeout), the
device will do the following:
1) Clear the display
2) Return to the idle state
3) Send Report 0x27 – Display Message Done Report to the host
Display message ID:
0 = Blank
1 = Approved
2 = Declined
3 = Cancelled
4 = Thank You
5 = PIN Invalid
6 = Processing
7 = Please Wait
8 = Hands Off
9 = PIN PAD not available
10 = Call Your Bank
11 = CARD ERROR
12 = Not Accepted
13 = Processing Error
14 = Use CHIP Reader
15 = Refer to your payment device
Bit
7 6 5 4 3 2 1
0
Byte 0
0x08
Byte 1
0x00
Bit 7 6 5 4
3 2 1
0
Byte 0
0x09
Byte 1
Device Control (default value = 0x00)
3.4.8 Report 0x08 – Request Device Status
This command causes the PIN-PAD to send current information (Session State, Device State and Status,
etc.) to the host using a USB Interrupt IN transaction. Following this command, the host should read an
input report which contains the information (see Report 0x20 – Device State Report).
Table 3-8 - Usage Table for Report 0x08
3.4.9 Report 0x09 – Set Device Configuration
This command, when invoked in Set mode, sends user- or host-defined configuration data to the device.
If the current configuration has been locked, the device will report an error (0x87) in ACKSTS of Report 0x01 – Response ACK and the new configuration will not be set. Otherwise, if the configuration data is
OK, the device will save the new configuration. Important note: Locking can not be undone without
returning the device to the supplier or manufacturer.
When the Config bit is set to unlocked, a user can only change MSR Encryption Variant, Clear Text User
Data, and Beeper Mode in Byte 1, plus Mask Configuration, MSR Card Configuration, Mask Character,
and Number of leading/trailing to leave unmasked.
When the Config bit is set to locked, a user can not change any of the device configuration settings.
Table 3-9 - Usage Table for Report 0x09 (Set mode)
These four bits can contain any combination of values from 0000 to 1111.
If Error = 0, the device will build MS2.0 format track data (if MS2.0 is enabled) if at least one track
contains good data – the indicated track may contain errors.
Key ID:
0x00 = PIN key
0x01 = MSR key*
0x02 = PIN Cert
0x03 = MSR Cert
0x04 = Device Authentication signed by PIN cert
0x05 = Device Authentication signed by MSR cert
0x06 = Inject Fixed PIN key signed by PIN cert
0x08 = Inject Authentication key signed by PIN cert
0x09 = Inject Authentication key signed by MSR cert
0x0A = Inject Configuration signed by PIN cert
0x0B = Inject Configuration signed by MSR cert
0x20…0x29 = RESERVED
0x63 = Authentication
0xFF = MFG command
*Note: Use MSR Key when getting challenge to inject Acquirer Master Key
3.4.11 Report 0x0A – Request MSR Data
This command causes the device to send MSR data to the host; it should be issued after a Report 0x03 –
Request Swipe Card command has successfully completed. If the system is not available, the device
will report an error (0x8A) in ACKSTS of Report 0x01 – Response ACK. Otherwise, the device will
send multiple instances of Report 0x23 – Card Data Report to the host. If no MSR data is available,
the device will send a single Report 0x23 – Card Data Report containing a Data Length of 0.
Table 3-11 - Usage Table for Report 0x0A
3.4.12 Report 0x0B – Get Challenge
This command causes the device to send challenge information to the host. The host should first issue the
command in Set mode as follows:
Table 3-12 - Usage Table for Report 0x0B (Set mode)
Key ID:
0x00 = PIN key
0x01 = MSR key*
0x02 = PIN Cert
0x03 = MSR Cert
0x04 = Device Authentication signed by PIN cert
0x05 = Device Authentication signed by MSR cert
0x06 = Inject Fixed PIN key signed by PIN cert
0x08 = Inject Authentication key signed by PIN cert
0x09 = Inject Authentication key signed by MSR cert
0x0A = Inject Configuration signed by PIN cert
0x0B = Inject Configuration signed by MSR cert
0x20…0x29 = RESERVED
0x63 = Login/Logout/Authentication
0xFF = MFG command
*Note: Use MSR Key when getting challenge to inject Acquirer Master Key
Byte 2..13
Data block:
If Key_ID < 12 or Key_ID = 0xFF:
Byte 2 – Byte 9 contains the device serial number
Byte 10 – Byte 13 contains the random token
If Key_ID = 0x63 and a valid authentication key is available:
Byte 2 – Byte 9 contains the encrypted partial device serial number and random token
Byte 10 – Byte 13 contains the partial device serial number
Bit
7 6 5 4 3 2 1
0
Byte 0
0x0D
Byte 1
0x00
Byte 2
String length of transaction amount: 1-11
Byte 3
Reserved for future use
After sending this command to the device and getting the ACKSTS report, the host should issue this
command in Get mode. If the key ID is not in the list, or a valid authentication key is not available for
key ID = 0x63, the data block will be all zeros.
Table 3-13 - Usage Table for Report 0x0B (Get mode)
3.4.13 Report 0x0D – Send Session Data - Amount
This command is used to send transaction data (credit or debit card amount) to the device.
An error will be reported in ACKSTS of Report 0x01 – Response ACK in the following cases:
Data error (0x82)
Wrong data length (0x83)
System is not available (0x8A)
Table 3-14 - Usage Table for Report 0x0D (For Amount)
This command is used to send card PAN data to the device in cases where the PAN is coming from a
source other than the card being processed.
An error will be reported in ACKSTS of Report 0x01 – Response ACK in the following cases:
Data error (0x82)
Wrong data length (0x83)
The PAN already exists (0x84)
System is not available (0x8A)
Table 3-15 - Usage Table for Report 0x0D (For PAN)
3.4.15 Report 0x0E – Get Information
Info ID of Set feature 0x0E selects the requested information.
Table 3-16 - Usage Table for Report 0x0E
The host then uses this command in Get mode to direct the device to return the requested information.
The device will report an error in ACKSTS of Report 0x01 – Response ACK if the system is not
available (0x8A) or the command contains bad parameters (0x82). Otherwise, the device will send an
information feature report to the host, which includes information about the length of the data block found
at the end of the report. See Table 3-18 for assistance interpreting the data block.
0x0000000 is Generic Customer
Signing Sequence typically starts
at 0x00000000 and must advance
with each upgrade.
Upgradability values:
0x00000000 – Generic Only
0x00000001 – Specific Only
0x00000002 – Generic or
Specific
0x09
1
<=19
Label and KCV
Acquirer Master Key
0x10
1
4 x 3
4 slots for bitmap data
[status + 2 bytes CRC]
status: 0 = not loaded
1 = loaded
1 9 Keypad sensitivity
Tamper sensitivity
Key on threshold
Key off threshold
4 bytes keypad threshold
Keypad calibration result
Keypad values
0x51
1 8 Parameter1 (2 bytes)
Parameter2 (2bytes)
Z ON pen (1 byte)
Z OFF pen (1 byte)
Reserved for future use
(2 bytes)
Signature Capture configuration
0x60 –
0x70
1
<=59
SN & subject’s DN**
If associated CA cert exists***
0x71 –
0x7F
1
<=59
SN & issuer’s DN**
If associated CA cert exists***
0x80
kcv_type=0
4
KCV value
KCV**** for Auth key
0x80
kcv_type=1
4
KCV value
KCV for PIN key
0x80
kcv_type=2
4
KCV value
KCV for MSR key
0x80
kcv_type=3
4
KCV value
KCV for fixed PIN key
0x80
kcv_type=4
4
Hash value
Dev auth key signed by PIN cert
0x80
kcv_type=5
4
Hash value
Dev auth key signed by MSR cert
0x80
kcv_type=7
6
KCV value
KCV for MID secret
0x80
kcv_type=9
4
KCV value
KCV for Acquirer Master key
0x80
All other
kcv_types
0 KCV****
* lbllen = auth key’s label length
** SN = serial number of cert; DN = distinguished names of subject or issuer of cert; Data length varies
with SN and DN length; max length is 59.
*** its corresponding CA cert
**** KCV = Key Check Value, where the lowest 6 digits are valid
Encrypted random token and device serial number (8 bytes).
See Report 0x0B – Get Challenge.
Bit
7 6 5 4 3 2 1
0
Byte 0
0x0F
Byte 1
0x00 = Logout
Byte 2..9
reserved
3.4.16 Report 0x0F – Login/Authenticate
This command logs in the device.
The following steps are required before issuing this command:
1) Host requests an authentication token from the device (using Report 0x0B – Get Challenge)
2) Host decrypts the received token with the authentication key
3) Host transforms token and encrypts it with the authentication key
In the following cases, authentication will fail and an error will be reported in ACKSTS of Report 0x01 – Response ACK:
System Error (e.g., a system error or tamper has been detected) (0x80)
No authentication key is found in the device (0x85)
Authentication is locked out (occurs after 3 authentication failures) (0x87)
Host receives an incorrect authentication token (e.g., the decrypted random token or device serial
number doesn’t match the device’s current values) (0x89)
Authentication challenge token times out (i.e. is not used within 5 minutes) (0x8A)
Table 3-19 - Usage Table for Report 0x0F (For Login/Authenticate)
3.4.17 Report 0x0F – Logout
This command logs out the device.
Table 3-20 - Usage Table for Report 0x0F (For Logout)
3.4.18 Report 0x10 – Send Big Block Data to Device
This command is used to provide data for several general commands and input reports (listed in Table
3-21) in 60-byte increments. If the data size is greater than 60 bytes, the data must be split into several
smaller blocks, each containing a maximum of 60 bytes. Two data formats are used in connection with
this command: The first packet (block 0, see Table 3-21) signals the start of a new data set and specifies
the complete length of the data; subsequent packets (blocks 1 through n, see Table 3-22) transmit the
actual data to a predefined buffer within the device.
An error will be reported in ACKSTS of Report 0x01 – Response ACK in the following cases:
The parameters in any block 1 through n data packet don’t match (or don’t follow) the previous data
Data Type:
0x06 = Request user selection user-defined message
0x07 = Display message user defined
0x0C = Bitmap image data
0x17 = Firmware file
0xA0 = EMV data in DOL format (MAC)
0xA1 = EMV data in TLV format, Set EMV Tag(s) (MAC)
0xA4 = EMV data in TLV format, Acquirer Response (ARPC)
0xA5 = CA Public Key Data (MAC)
0xA7 = C-APDU (Secured)
Byte 2
0 = Start of new data set (this packet contains the total data length)
Byte 3
Data Length – low byte (legacy)
Byte 4
Data Length – high byte (legacy) , Data length middle low byte
Byte 5
Data Length – middle high byte
Byte 6
Data Length – high byte
Byte 7
Extended Type: 0= <64K(legacy), 1=>64K
Byte 8..63
reserved
Bit
7 6 5 4 3 2 1
0
Byte 0
0x10
Byte 1
Data type:
0x06 = Request User Selection User Defined Message
0x07 = Display Message User Defined
0x0C = Bitmap image data
0x17 = Firmware file
0xA0 = EMV data in DOL format (Secured)
0xA1 = EMV data in TLV format
0xA4 = EMV data in TLV format, Acquirer Response (ARPC)
0xA5 = CA Public Key Data (MAC)
0xA7 = C-APDU (Secured)
Byte 2
Data packet number (1…n)
Data length error (e.g., the data size is 0 or is larger than the available buffer size) (0x83)
If the command is successful, the bitmap image or key handling/manufacturing command will be stored
in a predefined buffer within the device.
If the Data Type byte is set to one of the types tagged “Secured,” the first 2 bytes of the data packet
should be the expected length of the message after decryption.
Table 3-21 – Usage Table for Report 0x10 (Block 0)
Table 3-22 – Usage Table for Report 0x10 (Blocks 1 through n)
Packet data:
For EMV data, use Tag-Length-Value format [for examples, see section 3.3 About Commands Tagged As “MAC”]
Bit
7 6 5 4 3 2 1
0
Byte 0
0x11
3.4.19 Report 0x11 – Request Manual Card Entry
This command causes the device to prompt the user to enter the following card information by keypad.
Two modes are available: Account Number mode and Qwick Code mode:
Account Number mode prompts for the following:
Account number (minimum length = 9, maximum length = 19)
Expiration date (minimum length = maximum length = 4)
Card verification code (minimum length = 3, maximum length = 4)
Qwick Code mode prompts for the following:
Qwick Code (minimum length = 8, maximum length = 16)
Last 4 digits of account # (minimum length = maximum length = 4)
Card verification code (minimum length = 3, maximum length = 4)
Figure 3-6 - DynaPro Mini Manual Card Information Entry
An error will be reported in ACKSTS of Report 0x01 – Response ACK if the device status is not OK
(0x8A).
If the command completes successfully, Report 0x22 – Card Status Report will be sent back to the
host. If the host or user cancelled the request, or if the request timed out, byte 1 of Report 0x22 – Card Status Report will contain the appropriate Operation Status code to indicate why the command did not
complete. Otherwise, if all of the card information was entered correctly, byte 1 = 0x00 (this command
completed OK), byte 2 = 0x00 (Card Status is OK), byte 3 = 0x03 (Card Type is manual), and the host
should send a request to get the card data (see Report 0x0A – Request MSR Data). If Card and
Operation Status are both OK, the host should send a request to get the card data. Report 0x20 – Device
State Report will also be sent back to update the current Device State.
The track data sent by the device for manually entered card data may be masked according to the device’s
configuration (the same as it is for credit/debit cards), but the data shown in the following examples is
unmasked just to show the detail. The account number or QwickCode is denoted by a string of 5s, the
expiration date (or PAN4) by 3s and the CVC by 4s. The location marked by ‘6’ indicates the field
options used when the data was collected – unused fields will be 0s. 0s below denote fixed-length filler.
Track 1 card type (‘B’ for credit/debit cards) is set to ‘M’ and the name is set to the string literal
“MANUALENTRY/”.
Track 1 data may be found in the Card Report (see Report 0x23 – Card Data Report) that contains Data
ID = 0x01. The device will format Track 1 card data as follows:
Track 2 data may be found in the Card Report (see Report 0x23 – Card Data Report) that contains Data
ID = 0x02. The device will format Track 2 card data as follows:
;5555555555555555=33330000004444006?
The device does not change the length of the CVC (either 3 or 4 characters) entered by the user. The
length of the CVC thus affects the length of the track data output by the device, and the host must locate
the CVC in the track data as follows: The CVC starting position is the byte after the 6 digits which
follow the 4-digit expiration date (or PAN4). The CVC ending position in Track 1 is the byte before the 6
digits which precede the end sentinel (?); the CVC ending position in Track 2 is the byte before the 3
digits which precede the end sentinel (?).
3.4.20 Report 0x14 – Request User Data Entry
This command causes the device to prompt the user to enter SSN, Zip Code, or Birth Date by displaying
one of four predetermined messages.
An error will be reported in ACKSTS of Report 0x01 – Response ACK in the following cases:
Bad parameter (0x82)
System is not available (0x8A)
Otherwise, when the command completes (data entry done, user cancelled, or timeout), the device will
send Report 0x21 – User Data Entry Response Report to the host using a USB Interrupt IN
User data mode:
0 = Enter SSN (9 digits)
1 = Enter Zip code (5 digits)
2 = Enter Birthdate (8 digits, in MM/DD/YYYY format)
3 = Enter Birthdate (6 digits, in MM/DD/YY format)
Byte 3
Tones:
0 = No sound
1 = One beep
2 = Two beeps
Bit 7 6
5
4 3 2 1 0
Byte 0
0x1A
Byte 1
Mode
0 – Product_ID
1 – Maximum Application Message Size
2 – Capability String
3 – Manufacturer
4 – Product Name
5 – Serial Number
6 – Firmware Number
7 – Build Info
A – Boot1 Firmware Version
B – Boot2 Firmware Version
Byte 2..63
Reserved
Bit 7 6 5 4 3 2 1 0
Byte 0
0x1A
Byte 1
0x00
transaction. If data entry is successful, the report will also contain the MSR KSN and the encrypted user
data block (EUDB). The EUDB format is similar to the PIN ISO format 1 data block. The EUDB is
encrypted using X9.24 data variant under the current data variant derived from the MSR key.
Table 3-24 – Usage Table for Report 0x14
3.4.21 Report 0x1A – Request Device Information
This command requests information about the device.
Table 3-25 – Usage Table for Report 0x1A
Depending on what device information the host has requested, the device will respond to this command
using the following formats.
Table 3-26 - Usage Table for Report 0x1A - Product_ID
3.4.22 Report 0x1C – Set/Get BLE Power Configuration (BLE Only)
This command sets or gets the BLE power configuration, depending on whether it is called in Set mode or
Get mode.
Table 3-36 – Usage Table for Report 0x1C
Power Down: (Read/Write)
0: The device is not powered down.
1: The device is powered down.
Powering down the device will conserve power. The host will have limited communications capability
with the device when it is powered down. During this time, only this report can be get or set. Powering
the device down will conserve more power than suspending it. It takes more time to power the device up
than it does to take it out of suspend.
Suspend: (Read/Write)
0: The device is not suspended.
1: The device is suspended.
Suspending the device will conserve power. The host will have limited communications capability with
the device when it is suspended. During this time, only this report can be get or set. Powering the device
down will conserve more power than suspending it. It takes more time to power the device up than it
does to take it out of suspend.
Ready: (Read only, always write 0)
0: The device is not ready.
1: The device is ready.
The host will have limited communications capability with the device when it is powered down or
suspended. During this time, only this report can be get or set. Since it takes some time for the device to
be capable of full communications after powering it up or taking it out of suspend, this flag can be read to
determine if the device is ready for full communications or not.
3.4.23 Report 0x1D – Set BLE Module Control Data (BLE Only)
This command sends control data to the BLE module, which controls BLE communications. The device
will first respond with Report 0x01 – Response ACK. After the BLE module control data is processed,
the device will respond with Report 0x2D –BLE Module Control Data (BLE Only). It is important to
understand that even though this is implemented as a feature report to be used in Set mode, it can be used
to send requests to discover the current property settings in the BLE module. The full set of BLE module
controls can be found in Appendix J BLE Module Control Data.
0 – Set Bundle Seed ID (10 bytes)
1 – Set reverse DNS (variable, up to 50 bytes)
Byte 2
Data Length
Byte 3..63
Data
Bit
7 6 5 4 3 2 1
0
Byte 0
0x1E (report identifier)
Byte 1
Length of Bundle Seed ID, normally 0x0A (<=0x0A)
Byte 2..11
Bundle Seed ID, high bytes padded with 0x00 if length is less than 0x0A
Byte 12
Reverse DNS Length (<= 0x32)
Byte 13..63
Reverse DNS, high bytes padded with 0x00 if length is less than 0x32
Table 3-37 – Usage Table for Report 0x1D
3.4.24 Report 0x1E – Set iAP Protocol Info (30-pin Only)
When the host calls this command in Set mode, it sets iAP related data in the device.
Table 3-38 – Usage Table for Report 0x1E (Set mode)
3.4.25 Report 0x1E – Get iAP Protocol Info (30-pin Only)
When the host calls this command in Get mode, it retrieves the current device iAP protocol Bundle Seed
ID and reverse DNS in the following report format:
Table 3-39 – Usage Table for Report 0x1E (Get mode)
3.4.26 Report 0x1F – Request Clear Text User Data Entry
This command directs the device to prompt the user to enter his or her SSN, Zip Code, or Birth Date by
displaying predetermined messages. It is only available in firmware revision C12 or newer.
An error will be reported in ACKSTS of Report 0x01 – Response ACK in the following cases:
Bad parameter (0x82)
System is not available (0x8A)
User data mode:
0 = Enter SSN (9 digits)
1 = Enter Zip code (5 digits)
2 = Enter Birthdate (8 digits, in MM/DD/YYYY format)
3 = Enter Birthdate (6 digits, in MM/DD/YY format)
Byte 3
Tones:
0 = No sound
1 = One beep
2 = Two beeps
Bit
7 6 5 4 3 2 1
0
Byte 0
0x030
Byte 1
Key ID:
0x00 = MSR DUKPT key KSN
Bit
7 6 5 4 3 2 1
0
Byte 0
0x30
Byte 1
Key ID:
0x00 = MSR DUKPT key KSN
Otherwise, when the command completes (data entry done, user cancelled, or timeout), the device will
send Report 0x2E – Clear Text User Data Entry Response Report to the host using a USB Interrupt
IN transaction. If data entry is successful, the report will also contain the requested data.
Table 3-40 – Usage Table for Report 0x1F
3.4.27 Report 0x30 – Set / Get KSN
When called in Set mode, this command causes the device to generate a KSN data for transmission to a
host.
Table 3-41 – Usage Table for Report 0x30 (Set mode)
After sending this command to the device and getting the ACKSTS report, issue the same command in
Get mode for the KSN Feature Report (see Table 3-42). If a valid DUKPT key is not available, the data
block will be all zeros.
The KSN reported is only valid for 1 minute. Report 0x31 – Set KSN Encrypted Data should be sent
within the timeout period.
This feature is used for the Token Reversal Function.
Table 3-42 – Usage Table for Report 0x30 (Get mode)
Display Time in seconds, (1 – 255; 0 = 256 seconds)
3.4.28 Report 0x31 – Set KSN Encrypted Data
Before using this command, the host must have already used Report 0x30 – Set / Get KSN to retrieve
the MSR dukpt KSN from the device. Then the host must use Report 0x10 – Send Big Block Data to Device to send encrypted PAN data to the device, in the following format:
AAAA /* 2-byte MSB message length excluding padding and CBC-MAC */
F9<len> /* container for MAC structure and generic data */
DFDF54(MAC KSN)<len><val>
DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
DFDF44 (Encrypted PAN data)<len><val>
(Buffer if any to be a multiple of 8 bytes)
CBC-MAC (4 bytes, use MAC variant of MSR dukpt key)
The host can then use this command to process data in the big block. The device decrypts and displays
the data until the display timeout expires.
This feature is used for the Token Reversal Function.
The value of DFDF44 is always encrypted under the data variant of the MSR dukpt key.
Responses:
OK, ACKSTS = 0
Bad CBC-MAC ACKSTS = 0x82
Wrong Serial Number, ACKSTS = 0x82
The device provides six slots in the BIN table to hold BINs. Each slot holds 6 digits. After a cardholder
swipes a card, the device will check the BIN table to see if it contains the card’s BIN. If it finds the card’s BIN and if the card’s PAN length is 19 characters or longer, it will not encrypt data ID 4, 5 or 6 in
the Report 0x23 – Card Data Report it sends to the host.
Report 0x10 – Send Big Block Data to Device is first used to send BIN table data to the device, in the
following format [use the Acquirer Master Key (AMK) to calculate CBC-MAC]:
AAAA /* 2-byte MSB message length excluding padding and CBC-MAC */
F9<len> /* container for MAC structure and generic data */
DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
DFDF61(BIN Table Slot1)<6><val>
DFDF62(BIN Table Slot2)<6><val>
DFDF63(BIN Table Slot3)<6><val>
DFDF64(BIN Table Slot4)<6><val>
DFDF65(BIN Table Slot5)<6><val>
DFDF66(BIN Table Slot6)<6><val>
(Padding if any to be a multiple of 8 bytes)
CBC-MAC (4 bytes, use MAC variant of AMK)
Table 3-44 – Usage Table for Report 0x32 (Set mode)
An error will be reported in ACKSTS of Report 0x01 – Response ACK in the following cases:
Bad parameter (0x82)
System is not available (0x8A)
3.4.30 Report 0x32 – Get BIN Table Data
This command will cause the device to send the current contents of the BIN table to the host in the
following report format:
Table 3-45 – Usage Table for Report 0x32 (Get mode)
Device State (see Appendix C Status and Message Table)
Byte 2
Session State (see Appendix C Status and Message Table)
Byte 3
Device Status (see Appendix C Status and Message Table)
Byte 4
Device Certificate Status (see Appendix C Status and Message Table)
Byte 5
Hardware Status (see Appendix C Status and Message Table)
Byte 6
ICC Master and Session Key Status
Bit 0: 1 = No Acquirer Master Key Injected
Bit 1: 1 = No ICC Session Key Active
Bit 2: 1 = CAPK EMV database corrupted
Bit 3: 1 = Terminal/Payment Brand EMV Database corrupted
Bit 4: 1 = Card Present in smart card connector
An error will be reported in ACKSTS of Report 0x01 – Response ACK in the following cases:
Bad parameter (0x82)
System is not available (0x8A)
3.4.31 Report 0xFF – Device Reset
This command causes the device to perform a restart.
Table 3-46 – Usage Table for Report 0xFF
3.5 General Input Reports
Input reports are asynchronous data packets (i.e., events) sent from the device to the host using a USB
Interrupt IN transaction. Events occur when the device state changes or when an asynchronous command
(such as a command that requires user input) has completed.
3.5.1 Report 0x20 – Device State Report
This event is triggered explicitly when the host successfully issues Report 0x08 – Request Device
Status, or automatically when the device changes state. Both cases cause the device to send Device State,
Session State, Device Status, Device Certificate Status, and Hardware Status to the host.
Operation Status (see Appendix C Status and Message Table)
Bytes 2..11
MSR KSN
Bytes 12..19
Encrypted User Data block
Bits
0-3 4-7 8-
11
12
15
16
19
20
23
24
27
28
31
32
35
36
39 4043 4447
48
51
52
55
56
59
60
63
SSN
C N P P P P P P P P P R R R R
R
Zip
code
C N P P P P P R R R R R R R R
R
Birth
date
C N P P P P P P P/R P/R R R R R R
R
Bit 7 6 5 4 3 2 1 0
Byte 0
0x22
Byte 1
Operation Status (see Appendix C Status and Message Table)
Byte 2
Card Status (see Appendix C Status and Message Table)
3.5.2 Report 0x21 – User Data Entry Response Report
This event supports Report 0x14 – Request User Data Entry. After the user has successfully entered
data, the device uses this report to send user data to the host.
Table 3-48 - Usage Table for Report 0x21
The User Data block contains the information that was requested by the host with Report 0x14 –
Request User Data Entry (for example, if the host requested the user’s zip code, this report would return
just the zip code data). The 8-byte User Data block is divided into 16 four-bit nybbles, as specified in the
tables below. Each nybble contains one of the following:
C: Control field (0100=SSN; 0101=Zip Code; 0110=Birth Date
N: Data length
P: User data digit from 0000 (decimal 0) to 1001 (decimal 9)
R: Filled random number
P/R: If the Birth Date data length is 6 (mmddyy format), the positions marked P/R will be filled with
random numbers (R); if the Birth Date data length is 8 (mmddyyyy format), those positions will
contain the rightmost two characters of the birth year (P).
Table 3-49 - Report 0x21 User Data Block Format
3.5.3 Report 0x22 – Card Status Report
This event is triggered by Report 0x03 – Request Swipe Card or Report 0xA2 – Request Start EMV
Transaction, which will cause the device to send Operation Status, Card Status, and Card Type to the
Card Type (see Appendix C Status and Message Table)
Bit
7 6 5 4 3 2 1
0
Byte 0
0x23
Byte 1
Data ID:
0x01 = Track 1 data
0x02 = Track 2 data
0x03 = Track 3 data
0x04 = Encrypted Track 1 data
0x05 = Encrypted Track 2 data
0x06 = Encrypted Track 3 data
0x07 = Encrypted MagnePrint data
0x40 = Encrypted PAN and expiration date (financial cards only; otherwise data is
blank)
0x41 = Device serial number
0x63 = KSN and MagnePrint Status
0x64 = CBC-MAC
Data block
If Data ID < 0x08, data is track, encrypted track, or MP data corresponding to its data
ID
If Data ID = 0x63, Bytes 4 -13 are KSN data; bytes 14-17 are MP Status data
If Data ID = 0x41, data is 8 byte serial number
If Data ID = 0x64, data is 4 byte CBC-MAC
If Data ID = 0x40, data is encrypted PAN and Expiration date in the following format:
Start Sentinel(‘;’)
PAN
Separator (‘=’)
YYMM
(‘?’)
3.5.4 Report 0x23 – Card Data Report
This event is triggered by Report 0x0A – Request MSR Data, which causes the device to send eight
reports to the host for each successful card swipe or manual card entry.
Table 3-51 - Usage Table for Report 0x23
If the device has been configured to use the MS2.0 masking configuration (see Report 0x09 – Get
Device Configuration), then track status (byte 2) of Data ID 0x63 uses a different set of status values,
Operation Status (see Appendix C Status and Message Table)
Table 3-52 - Report 0x23 Track Status Byte When Using MS2.0 Masking
3.5.5 Report 0x24 – PIN Response Report
This event is triggered by Report 0x04 – Request PIN Entry, which causes the device to send PIN data
to the host after a PIN is successfully entered.
The device may report ‘Keypad Security’ in Byte 1 to indicate the keypad has detected a tamper
condition. This can be triggered by a user pressing a function key for too long when selecting an account
type. To cover this case, the software should include retry logic that resends Report 0x04 – Request PIN
Operation Status (see Appendix C Status and Message Table)
Byte 2
Code of key pressed:
0x71 = left function key
0x72 = middle function key
0x74 = right function key
0x78 = ENTER key
Bit
7 6 5 4 3 2 1
0
Byte 0
0x27
Byte 1
Operation Status
Bit
7 6 5 4 3 2 1
0
Byte 0
0x29
3.5.6 Report 0x25 – User Selection Response Report
This event is triggered when the user is asked to choose an account type, which causes the device to send
the user’s response (i.e. the key pressed) to the host.
Table 3-54 - Usage Table for Report 0x25
3.5.7 Report 0x27 – Display Message Done Report
This event is sent by the device to the host to indicate a pending Report 0x07 – Display Message has
completed.
Table 3-55 - Usage Table for Report 0x27
3.5.8 Report 0x29 – Send Big Block Data to Host
This event is used by the device to send the user’s signature, device certificate, or CSR to the host. If the
data size is greater than 123 bytes, the data must be broken into multiple 123-byte data blocks, or packets.
Three data formats are used in connection with this command:
The first packet (block 0) is used to signal the start of sending, which defines the buffer type, buffer
status, and the total length of data being sent (in bytes);
Subsequent packets (blocks 1 through n) contain the requested data; and
A final packet signifies the end of sending.
If the big buffer type is SECURED or MAC, the first 2 bytes of the data packet are the expected data
length after decryption.
Table 3-56 - Start of Big Block Sending Format (Block 0)
Big buffer type:
0x00 = Signature capture data
0x02 = Device cert
0x18 = Perform Test (0x18) APDU
0x32 = Set BIN
0x42 = CSR
0xA1 = EMV data in TLV format, Tag Data (MAC)
0xA2 = RESERVED
0xA3 = RESERVED
0xA4 = EMV data in TLV format, Authorization Request (ARQC)
0xA5 = CA Public Key (MAC)
0xA6 = ATR (Secured)
0xA7 = R-APDU (Secured)
0xAB = EMV data in TLV format, Batch Data or Batch Data and Reversal Data
Byte 2
0x00 = Start flag
Byte 3
Big buffer status (0x00 = N/A)
Byte 4
Data length–low byte
Byte 5
Data length–high byte
Bit
7 6 5 4 3 2 1
0
Byte 0
0x29
Byte 1
Not defined
Byte 2
Block number (options: 1 – 98)
Byte 3
Data length
Byte 4..n
Data block (maximum 123 bytes)
Bit
7 6 5 4 3 2 1
0
Byte 0
0x29
Byte 1
Not defined
Byte 2
99 = End flag
Table 3-57 - Big Block Data Sending Format (Blocks 1 thru n)
Table 3-58 - End of Big Block Sending Format
3.5.8.1 Big Block Data for Authorization Request (ARQC)
When an ONLINE approval is required as determined by the device and the ICC, the authorization
request message will be in the format shown below. Data in the big block will use the EMV tag 70 as a
container tag (70 <LEN> <TLV TLV…TLV>) for the data listed in the table below, or as configured by
tag DFDF02.
Secondary amount associated with the
transaction representing a cash back amount
Device
n
6
9F26
Cryptogram returned by the ICC in response of
the GENERATE AC command
Card
b
8
82
Application Interchange Profile
Card
b 2 5A
Application PAN
Card
c
0-10
5F34
Application PAN Sequence Number
Card
n 1 9F36
Application Transaction Counter
Card
b
2
9F1A
Terminal Country Code
Device
n
2
95
TVR
Device
b
5
9F02
Authorized amount of the transactions
(excluding adjustments)
Device
n
6
5F2A
Transaction Currency Code
Device
n
2
9A
Local Date transaction was authorized
Device
n 3 9C
Transaction Type
Device
n 1 9F37
Unpredictable Number
Device
b 4 9F10
Issuer Application Data
Card
b
0-32
DFDF53
Fallback Indicator
Device
n
1
F5
Container For Encrypted PIN
Device
b
Var
F4
Container For Encrypted MSR
Device
b
Var
Bit
7 6 5 4 3 2 1
0
Byte 0
0x2A
Byte 1
Status of Command (“ACKSTS”)
Byte 2
ID for Command reporting status
Byte 3..n
Reserved
3.5.9 Report 0x2A – Delayed Response ACK
This event is triggered by completion of longer-running commands that need to report status back to the
host. It is an asynchronous version of Report 0x01 – Response ACK.
Table 3-59 - Usage Table for Report 0x2A
3.5.10 Report 0x2B – Test Response
Reserved.
3.5.11 Report 0x2D –BLE Module Control Data (BLE Only)
This input report event is triggered by completion of Report 0x1D – Set BLE Module Control Data
(BLE Only) after the device returns Report 0x01 – Response ACK and processes the control data.
Operation Status (see Appendix C Status and Message Table)
Byte 2
User Data Mode
0 = SSN (9 digits)
1 = Zip Code (5 digits)
2 = Birthdate (8 digits, MMDDYYYY format)
3 = Birthdate (6 digits, MMDDYY format)
Byte 3
Length of data
Bytes 4 – 12
Clear Text User Data block – only the indicated number of bytes is meaningful, other
bytes should be ignored.
Important usage notes regarding getting and setting BLE module properties are included in section 3.4.23
Report 0x1D – Set BLE Module Control Data (BLE Only).
Table 3-60 - Usage Table for Report 0x2D
3.5.12 Report 0x2E – Clear Text User Data Entry Response Report
This event is triggered by Report 0x1F – Request Clear Text User Data Entry, which causes the device
to send clear text User data to the host after the user has successfully entered data. It is only available in
firmware revision C12 or newer.
EMV Cardholder Interaction Status ID:
0x01 = Waiting for amount confirmation selection
0x02 = Amount confirmation selected
0x03 = Waiting for multi-payment application selection
0x04 = Application selected
0x05 = Waiting for signature capture
0x06 = Signature captured
0x07 = Waiting for language selection
0x08 = Language selected
0x09 = Waiting for credit/debit selection
0x0A = Credit/Debit selected
0x0B = Waiting for Pin Entry for ICC
0x0C = Pin entered for ICC
0x0D = Waiting for Pin Entry for MSR
0x0E = Pin entered for MSR
Byte 2
0x00 (RESERVED)
Byte 3
0x00 (RESERVED)
3.6 EMV-Related Reports
This section contains both commands sent from the host to the device (feature reports) and asynchronous
events sent from device to the host (input reports) that support EMV transaction processing.
After the device successfully reads a smart card, it generates EMV data in the form of tags for transaction
processing. The device then sends the host its own information plus information read from the card. The
host will generally then use that information to authorize, complete, and save a transaction.
If fallback is enabled, the device will use magnetic stripe data to process a transaction if it can not read
the smart card.
A number of tags can be configured on the device using the Set form of Report 0xA1 – Set or Get EMV Tag(s) (MAC), such as terminal floor limit, terminal ID, and transaction currency code.
3.6.1 Report 0x2C – EMV Cardholder Interaction Status Report
This event is triggered during an EMV transaction started by Report 0xA2 – Request Start EMV
Transaction. Events are generated when there is a cardholder interaction; for example, when a screen is
displayed and waits for user input. This report is used to update the merchant display throughout the
transaction based on cardholder interactions.
Data block:
If EMV Cardholder Interaction Status ID from Byte 1 = 0x02, value 0x1 indicates Amount
Confirmed, or value 0x2 indicates Amount Not Confirmed.
If EMV Cardholder Interaction Status ID from Byte 1=0x04, data is a string representing
application preferred name, or label chosen by cardholder.
If EMV Cardholder Interaction Status ID from Byte 1=0x0A, value 0x1 indicates Credit, or
value 0x2 indicates Debit
If EMV Cardholder Interaction Status ID from Byte 1=0x20, data is in TLV format.
Otherwise, no data.
Bit
7
6 5 4 3 2 1 0
Byte 0
0xA1
Byte 1
Specifies which EMV tag group to set: Bits 6 and 7 specify Terminal or Application
group.
00=Terminal
10=Application
If bit 6 and 7 are set to Application, bits 0-5 specify the
Application group (0-9) to set.
Byte 2
Operation:
0x01=Write Operation
0xFF=Set to Factory defaults (see Appendix H Factory Defaults)
Byte 3
Database Selector:
00 – Contact L2 EMV Tags
Byte 4..8
Reserved
3.6.2 Report 0xA1 – Set or Get EMV Tag(s) (MAC)
This command allows the host to modify or read a single or group of EMV tags. It can assign the
database of EMV tags a label using tag DFDF26, and read the checksum back using tag DFDF27.
3.6.2.1 Setting EMV Tags
To set EMV tag(s), the host should first use Report 0x10 – Send Big Block Data to Device to send data
to the device. Data must be in TLV format (see EMV 4.3 Book 3 Appendix B) and must include the
device serial number and MAC signature (AMK MAC variant). After sending the data, the host should
issue the command as follows:
Table 3-63 - Usage Table for Report 0xA1 (Set form)
The device will report an error 0x80 in ACKSTS of Report 0x01 – Response ACK if it detects a system
error. If the system is not available, the device will report an error 0x8A in ACKSTS of Report 0x01 – Response ACK.
3.6.2.2 Getting EMV Tags
To get EMV Tag(s), the host should send Report 0x10 – Send Big Block Data to Device to indicate the
EMV tags to be retrieved. The data should indicate which tags to be retrieved, and must include the
Wait time in seconds, (1 – 60) for cardholder to confirm, cancel, and present card. This
timer is also used for the cardholder to choose an ICC application.
Byte 2
Wait time in seconds, (1 – 60) for cardholder to enter PIN
device serial number and MAC signature (AMK MAC variant). The format of each entry is one to three
bytes that identify the desired data object.
After sending the data, the USB host should then issue the following command:
Table 3-64 - Usage Table for Report 0xA1 (Get form)
If the command is successful, the device will send Report 0x01 – Response ACK, then send Report
0x29 – Send Big Block Data to Host with the EMV tags and requested data. If the device detects a
system error, it will send 0x80 in ACKSTS of Report 0x01 – Response ACK. If the system is not
available, the device will report an error 0x8A in ACKSTS of Report 0x01 – Response ACK.
3.6.3 Report 0xA2 – Request Start EMV Transaction
This command directs the device to prompt the user to confirm transaction amount, and to arm the MSR
and / or contact ICC reader to wait for a card to be swiped or presented into the contact ICC connector. If
armed to read a contact ICC, the device will turn on the LED near the smart card connector after the
cardholder confirms the transaction amount. The host should abort the transaction if the user presses the
CANCEL button.
Card Type to Read:
1 = Magnetic Stripe
2 = Contact smart card
Byte 6
Options:
1 = Bypass PIN
2 = Force Online
4 = Acquirer not available (Note: prevents long timeout on waiting for host approval)
Byte 7..12
Amount Authorized (EMV Tag 9F02, format n12)
Byte 13
Transaction Type:
Valid values:
0x02 or 0x09 = Cash back
0x04 = Goods (Purchase)
0x08 = Services (Purchase)
Byte 14..19
Cash back Amount (if non-zero, EMV Tag 9F03, format n12)
Byte 20..46
RESERVED
Byte 47
RESERVED
Byte 48
RESERVED
The device will report errors in ACKSTS of Report 0x01 – Response ACK in the following cases:
System Error (0x80)
System is not available (0x8A)
Bad parameter (0x82)
If there are no errors, the device will prompt the user to approve an amount and swipe or insert card by
displaying pre-determined EMV messages.
The device LCD display will cycle showing “(AMOUNT),”“(AMOUNT)OK?” and “CANCEL OR
ENTER,” and will wait for the cardholder to push either the confirmation or cancellation button.
If the cardholder presses the confirmation button, then depending on the card type requested to be read,
the LCD display will show either SWIPE or INSERT CARD. If the user presses the cancellation button
or the transaction times out, the device will perform 0xA2 Command Completion.
If the cardholder has inserted an ICC card, and if the Acquirer has set the device’s payment brand account
type setting for ICC to Debit or Credit, the device will prompt the cardholder to select debit or credit.
Per EMV 4.x requirements, if the cardholder uses the MSR input, the device will check the service code
from the magnetic stripe data to see if it begins with a 2 or a 6 to determine if the card also includes an
ICC, and will advise the cardholder that ICC is preferred by displaying USE CHIP READER. If the ICC
fails or the service code does not begin with a 2 or a 6, the device will prompt the cardholder for an MSR
swipe. After a successful swipe, the device will prompt the user to select debit or credit. If this is a debit
account type, the device will request a PIN.
If the user presents an ICC card, the LCD display will show ICC applications that are mutually supported
and ask the cardholder to choose the preferred application. If a PIN entry is needed per EMV 4.x
requirements, the LCD will show ENTER PIN and start the PIN entry timer. If the user presses the
cancelation button or the transaction times out, cancelled or timed out, the device will perform 0xA2 Command Completion.
After PIN entry, the device will display either PIN OK or will cycle through INCORRECT PIN and TRY
AGAIN up to the PIN retry limit. If the number of attempts reaches PIN try limit-1, the device will
display LAST TRY. If the user exceeds the PIN entry retry limit, the device will perform 0xA2 Command Completion, otherwise the transaction proceeds to the approval stage.
When the device is configured to allow PIN bypass using tag DFDF68, the PIN requirement can be
bypassed by the merchant by setting bit 0, byte 6 of the 0xA2 command. CVM and TVR bits must be set
appropriately per EMV 4.x requirements. The PIN requirement can also be bypassed by the cardholder.
The transaction approval method will be determined per EMV 4.x requirements.
For OFFLINE, the device gets the TC or AAC from the ICC for later transmission to the host. Depending
on the transaction outcome, the LCD will show APPROVED, DECLINED, or ERROR, and the device
will perform 0xA2 Command Completion.
For ONLINE, the device sends the ARQC tags encrypted using the MSR DUKPT data variant key and
signed MAC variant key to the host using Report 0x29 – Send Big Block Data to Host for approval,
starts a HOST response timer, and waits for Report 0xA4 – Acquirer Response, processes the Host
Response, gets TC or AAC from the ICC, depending on the transaction outcome, the LCD will show
“APPROVED”,“DECLINED” or "ERROR," and perform 0xA2 Command Completion.
A transaction can be forced ONLINE by the merchant by setting bit 1, byte 6 of the 0xA2 command.
3.6.3.1 0xA2 Command Completion
When this command completes (card read OK, transaction finished, ICC problems, command cancelled,
cardholder cancels, or timeout), the device clears all sensitive data buffers and sends a Report 0x22 – Card Status Report to the host. If the Card and Operation Status are both OK, the host should send a
request to get the EMV card data with Report 0xAB – Request EMV Transaction Data.
3.6.4 Report 0xA4 – Acquirer Response (MAC)
If a smart card and the device decide to handle a transaction online, after sending the related EMV tags in
the EMV authorization request to host, the host returns a response from the acquirer/issuer.
The response using big block data includes one or more of the following EMV data:
Report 0x10 – Send Big Block Data to Device is first used to send the Acquirer Response Data with the
device serial number and signed with the current MSR MAC variant key to the device.
After sending the data, issue the following command:
Table 3-66 - Usage Table for Report 0xA4
3.6.5 Report 0xA5 – Set or Get CA Public Key (MAC)
This command causes the device to load, erase or read CA Public Key(s). This command is also used to
set and read the CA Public Key database label, and read the CA Public Key database checksum
Report 0x10 – Send Big Block Data to Device is first used to send data with the device serial number
and MAC signature (AMK MAC variant) to the device using this format:
After sending the data, the host should issue the following command:
Operation:
0 – Erase All CA Public Keys (No Additional Data from Report 0x10 needed)
1 – Erase All CA Public Keys for a given RID (Report 0x10 provides a single RID only)
2 – Erase a single CA Public Key (Report 0x10 provides one RID and RID key Index
only)
3 – Add a CA Public Key (Report 0x10 provides all data)
4 – Read a single CA Public Key (Report 0x10 provides one RID and RID key Index
only)
0x0F – Read all CA Public key(s). No Additional Data from Report 0x10 needed. This
option only returns RID and RID Index of all CA Public Keys that are installed.
Byte 2..8
TBD
Description
Length
RID
5
RID Key Index
1
Hash Algorithm
1
Public Key Algorithm
1
Exponent Length
1
Exponent
1 or 3
Key Length
1
Checksum
20
Modulus
varies
Bit
7 6 5 4 3 2 1
0
Byte 0
0xA8
For a write operation, an error (0x80) will be reported in ACKSTS of Report 0x01 – Response ACK if
the device detects a system error. If the system is not available, the device will report an error (0x8A) in
ACKSTS of Report 0x01 – Response ACK. Otherwise, if the command is successful, Report 0x01 – Response ACK will report a successful or status of the operation.
For a read operation, the device will send Report 0x01 – Response ACK. If successful, the device will
then send a second event using Report 0x29 – Send Big Block Data to Host containing the CA Public
Key requested and the device serial number and MAC signature (AMK MAC variant), and the return data
in the big block will use the EMV tag 70 as a container for tag (DFDF3F<LEN> <VALUE>) for the data
listed in Table 3-68. The device will report an error (0x15) in ACKSTS of Report 0x01 – Response
ACK if it detects an error – RID or Index not found.
Table 3-68 - Big Block Data Response to Report 0xA5
3.6.6 Report 0xA8 – Get Kernel Info
This command causes the device to send the requested kernel information to the host.
An error will be reported in ACKSTS of Report 0x01 – Response ACK if the system is not available
(0x8A) or if the command contains bad parameters (0x82). Otherwise, the device will send the following
input report to the host:
Table 3-70 - 0xA8 Input Report
Table 3-71 - 0xA8 Kernel Info IDs
*0x1F is the L2 Kernel Checksum/Signature. It is the sum of all the checksums needed for the L2 Kernel
and is the only value that should be monitored for L2 testing.
3.6.7 Report 0xAB – Request EMV Transaction Data (MAC)
This command causes the device to send merchant data and pre-defined EMV batch data tags to the host,
and for unsuccessful transactions can be used to send pre-defined reversal data. It is normally used by the
host for data capture. The host should first successfully complete Report 0xA2 – Request Start EMV
Transaction. If the system is not available, the device will report an error (0x8A) in ACKSTS of Report
0x01 – Response ACK. If data is not available, the device reports system error (0x80) in ACKSTS of
Report 0x01 – Response ACK. Otherwise, the device will send Report 0x29 – Send Big Block Data to
Host to the host. All data sent will be encrypted (SRED) with the DATA variant MSR key and signed
using the MAC variant of the MSR key. The device serial number will also be part of the message.
Each of the sections contained in 0xF0 will contain data in the format specified in the following tables.
The “Format” columns are based on definitions found in EMV 4.3 Book 3.
Transaction Status
0x00 = Accept
0x01 = Decline
0x02 = Error
0x10 = Cancelled by Host
0x11 = Confirm Amount No
0x12 = Confirm Amount Timeout
0x13 = Confirm Amount Cancel
0x14 = MSR Select Credit
0x15 = MSR Select Debit
0x16 = MSR Select Credit/Debit timeout
0x17 = MSR Select Credit/Debit cancel
0x18 = Signature Capture Cancelled by
Host
0x19 = Signature Capture Timeout
0x1A = Signature Capture Cancelled by
User
0x1B = PIN entry Cancelled by Host
0x1C = PIN entry timeout
0x1D = PIN entry Cancelled by User
0x1E = Manual Selection Cancelled by Host
0x1F = Manual Selection timeout
0x20 = Manual Selection Cancelled by User
0x21 = Waiting For Card Cancelled by Host
0x22 = Waiting For Card timeout
0x23 = Waiting For Card Cancelled by User
0xFF = Unknown
Device
b
1
DFDF1B
Additional Transaction Information
0x00 = No additional information
0x31 = Application not selected
0x32 = Error transaction in progress
0x33 = Error invalid PSE format
0x34 = Terminal application list is empty
0x35 = Candidate list is empty
0x36 = No transaction
0x37 = No common applications
0x38 = Transaction canceled
0x39 = Aid parse error
0x3A = Code table index not found
0x3B = Error no more record
0x3C = EMV e overflow
[sic.]
Device
b
4
Table 3-73 - Big Block Response to Report 0xAB - Status Data Container (F1)
Indicates the Application as described in
ISO/IEC 7816-5
Device
b
5-16
9F07
Indicates issuer's specified restrictions on
the geographic usage and services allowed
for the Application
Card
b
2
9F0D
Specifies the issuer's conditions that cause
a transaction to be rejected if it might
have been approved online, but the
terminal is unable to process the
transaction
online
Card
b
5
9F0E
Specifies the issuer's conditions that cause
the denial of a transaction without
attempt to go online
Card
B
5
9F0F
Specifies the issuer's conditions that cause
a transaction to be transmitted online
Card
B
5
9F10
Contains proprietary application data for
transmission to the issuer in an online
Transaction
Card
b
0-32
9F26
Cryptogram returned by the ICC in
response to the GENERATE AC command
Card
b 8 9F27
Indicates the type of cryptogram and the
actions to be performed by the terminal
Card
b
1
9F36
Counter maintained by the application in
the ICC (incrementing the ATC is
managed by the ICC)
Card
b
2
95
TVR
Device
b
5
9B
TSI
Device
b 2 9C
Transaction Type
Device
b 2 9F33
Terminal Capabilities
Device
b
3
9F34
Indicates the results of the last CVM
performed
Device
b
3
Table 3-74 - Big Block Response to Report 0xAB - Batch Data Container (F2 [Default Tags Shown])
Value to provide variability and uniqueness
to the generation of a cryptogram
Device
b
4
9F40
Additional Terminal Capabilities
Device
b 5 DFDF70
TAC-default (Terminal Action Codes)
Device
n 5 DFDF71
TAC-Offline (Terminal Action Codes)
Device
n 5 DFDF72
TAC-Online (Terminal Action Codes)
Device
n 5 9F5B
Issuer Script Results
Device
b
0-128
Tag
Description
Source
Format
Length
(decimal)
DFDF30
Masked T1 Status
Device
b
1
DFDF31
Masked T1
Device
b
Var
DFDF32
Masked T2 Status
Device
b 1 DFDF33
Masked T2
Device
b
Var
DFDF34
Masked T3 Status
Device
b
1
DFDF35
Masked T3
Device
b
Var
DFDF3E
Signature Capture
Device
b
Var 0-7000
5F25
Application Effective Date
Card
N6 3 5F24
Application Expiration Date
Card
N6 3 89
Authorization Code
Device
b 6 5F2A
Transaction Currency Code
Card
N3 2 9F02
Amount, authorized
Device
N12
6
9F03
Amount, other
Device
N12
6
9F06
AID - terminal
Device
b
Var 5-16
9F12
Application Preferred Name
Card
ans
Var 1-16
9F1C
Terminal ID
Device
An 8
8
9F39
POS Entry Mode
Device
N2
1
9C
Transaction Type
Device
N2
1
DFDF40
Signature Required
Device
b
1
The Merchant Data (F7) Container is included in the response to Report 0xAB – Request EMV Transaction Data (MAC), which is normally used by the host for receipt printing. The tags in the F7
container are not programmable.
Table 3-75 - Big Block Response to Report 0xAB - Merchant Data Container (F7)
Counter maintained by the application in the
ICC (incrementing the ATC is
managed by the ICC)
Card
b
2
DFDF25
Terminal Serial Number
Device
an
8
9F10
Contains proprietary application data for
transmission to the issuer in an online
Transaction
Card
b
0-32
9F5B
Issuer Script Results
Device
b
0-128
9F33
Terminal Capabilities
Device
b
3
9F35
Terminal Type
Device
n 1 95
TVR
Device
b
5
9F01
Uniquely identifies the acquirer within each
payment system
Device
n
6
5F24
Date after which the Application expires
Card
n
3
5A
Primary Account Number
Card
c
0-10
5F34
PAN Sequence Number
Card
n 3 8A
Authorization Code
Device
an
2
9F15
Merchant Category Code
Device
n 2 9F16
Merchant Identifier
Device
s
15
9F39
POS Entry Mode
Device
n
1
9F1A
Terminal Country Code
Device
n 2 9F1C
Terminal ID
Device
an
8
57
Track2 Equivalent Data
Card
b
0-19
The Reversal Data (F3) Container may be included in the response to Report 0xAB – Request EMV Transaction Data normally used by the host for reversal processing. This data is sent by the device for
an online transaction where the acquirer response was to approve the transaction, but the final card
decision was to decline.
Table 3-76 - Big Block Response to Report 0xAB - Reversal Data Container (F3)
A.1 How to Get MSR/PIN Data from the Device for a Bank Simulation
This section provides a byte-for-byte example of transmitting commands using the USB connection and
the Apple 30-pin connection. All data shown in this section is in hexadecimal format. USB connections
require bytes be transmitted in least significant byte (little endian) order; iOS requires bytes be
transmitted in most significant byte (big endian) order, so iOS command strings will appear as the byteby-byte reverse of the others.
1) Host sends out Report 0x03 – Request Swipe Card to the device, which expands to the following
bytes:
a) 01: Execute command in Get mode (OS only)
b) 03: Report ID (03=Report 0x03 – Request Swipe Card)
c) 20: Wait time (20=32 seconds)
d) 00: Display message ID (00=swipe card/idle)
e) 01: Beep prompt tone for card swipe (01=one beep)
Sample command data of Report 0x03 – Request Swipe Card
2) Device sends back Report 0x01 – Response ACK to the host, which expands to the following bytes.
If the Report 0x03 – Request Swipe Card command had failed (i.e. ACK status not = 00), the
device would not have returned a device state input report to the host:
a) 01: Report ID (01=Report 0x01 – Response ACK)
b) 00: ACK status of Report 0x03 – Request Swipe Card (00=Command is good)
c) 03: Report ID of the command being ACKed (03=Report 0x03 – Request Swipe Card)
Sample response for Report 0x01 – Response ACK
3) The device prompts the user to swipe his or her card, and sends Report 0x20 – Device State Report
to the host, which expands to the following bytes:
a) 20: Report ID (20=Report 0x20 – Device State Report)
b) 02: Device state (02=Wait for card)
c) 08: Session state (08=Card data available)
d) 40: Device status (40=Not authenticated)
e) 47: Device cert status (PIN CRL, PIN CA cert, Device CA cert & Device cert exist)
f) 07: Hardware status (Keypad calibrated, Mag Head programmed, Tamper sensors active)
4) After the cardholder swipes the card, the device sends back Report 0x22 – Card Status Report to
the host, which expands to the following bytes:
a) 22: Report ID (22=Report 0x22 – Card Status Report)
b) 00: Operation status (00=OK)
c) 00: Card status (00=OK)
d) 01: Card type (01=Financial card)
Sample Report 0x22 – Card Status Report
5) If the operation and the card status are OK, the host retrieves the card data from the device by issuing
Report 0x0A – Request MSR Data, as shown:
Sample Report 0x0A – Request MSR Data:
6) The device sends back Report 0x01 – Response ACK to the host.
7) The device sends back eight instances of Report 0x23 – Card Data Report to the host, which the
host interprets as meaning the following:
a) Track 1: 23 01 00 2F 0-0x2E bytes of data
b) Track 2: 23 02 00 1E 0-0x1D bytes of data
c) Track 3: 23 03 00 47 0-0x46 bytes of data
d) Encrypted Track1: 23 04 00 30 0-0x2F bytes of data
e) Encrypted Track2: 23 05 00 20 0-0x1F bytes of data
f) Encrypted Track3: 23 06 00 48 0-0x47 bytes of data
g) Encrypted MagnePrint: 23 07 00 38 0-0x37 bytes of data
h) KSN and MagnePrint Status: 23 63 00 0E 0-0x0D bytes of data
8) The device sends back another Report 0x20 – Device State Report to the host.
9) If the operation status and card status from Report 0x22 – Card Status Report are both OK, the host
issues Report 0x04 – Request PIN Entry, which expands to the following bytes:
a) 01: Execute command in Get mode (iOS only)
b) 04: Report ID (04=Report 0x04 – Request PIN Entry)
c) 1E: Wait time for PIN entry (1E=30 seconds)
d) 00: PIN mode (00=Enter PIN)
e) 44: Max and min length of PIN (in this example, PIN must be exactly four characters)
f) 01: Prompt tone (01=One beep)
American Association of Motor Vehicle
Administrators
ACK
Acknowledge
AES
Advanced Encryption Standard
AMK
Acquirer Master Key
API
Application Programming Interface
ARC
Authorization Response Code
ARQC
Authorization Request Cryptogram
ARPC
Authorization Response Cryptogram
APDU
Application Protocol Data Unit
ATR
Answer To Reset
BIN
Bank/Issuer Identification Number
BLE
Bluetooth Low Energy
BPK
Battery Protected Keys
CA
Certificate Authority
CAPK
Certificate Authority Public Key
CBC
Cipher Block Chaining
CDA
Combined DDA/Application Cryptogram
Generation
CRC
Cyclic Redundancy Check
CRL
Certificate Revocation List
CVC
Card Verification Code
CVM
Cardholder Verification Method
DDA
Dynamic Data Authentication
DER
Distinguished Encoding Rules
DES
Data Encryption Standard. An algorithm
developed in the1970s by IBM Corporation, since
adopted by the US government and ANSI (the
American National Standards Institute) as the
encryption standard for financial institutions.
DLL
Dynamically Linked Library
Appendix B Terminology
This appendix provides definitions of common terms used in this document.
Derived Unique Key Per Transaction. A key
management scheme in which a unique key is
used for every transaction
CBC
Cipher Block Chaining
EMV[co]
Europay MasterCard Visa [company]
EPB
Encrypted PIN Block
GATT
Generic ATTribute Profile, a general specification
for sending and receiving short pieces of data
known as "attributes" over a BLE link.
HAL
Hardware Abstraction Layer
HID
Human Interface Device
I2C
Inter-Integrated Circuit
iOS
Apple device operating system
ICC
Integrated Circuit Card
IEC
International Electrotechnical Commission
ISO
International Standards Organization
Key Injection
A secure operation whereby an encryption key is
injected into a device
KCV
Key Check Value
KSN
Key Serial Number
LCD
Liquid Crystal Display
LSB
Least Significant Byte, Least Significant Bit
MagnePrint
MagnePrint is a card authentication technology
which allows any magnetic stripe card to be
recognized as a unique and non-reproducible
security token. MagnePrint is able to detect cards
that have been illegally reproduced (“skimmed”)
as well as cards that have had their data reencoded or magnetically altered. The term itself
is derived from the following expressions:
“Magne” as in magnetic and “Print” as in
fingerprint.
MS2.0
MagneSafe 2.0, a method of encrypting data while
preserving the essential format of the unencrypted
data, such as length and character set.
Personal Account Number, which is most
commonly recognized as the 16-digit user account
number associated with a card.
PCI DSS
Payment Card Industry Data Security Standards
PCI PED
Payment Card Industry PIN Entry Device
PED
Pin Encryption Device, the generic term for the
class of devices that includes IPAD, DynaPro, and
DynaPro Mini.
PIN
Personal Identification Number
PKI
Public Key Infrastructure. An arrangement that
binds public keys with respective user identities
by means of a certificate authority.
RFU
Reserved for Future Use
RSA
Rivest-Shamir-Adleman. A highly secure
cryptography method by RSA Data Security, Inc.,
Redwood City, CA (www.rsa.com), which uses a
two-part key: The private key is kept by the
owner, and the public key is published.
0x00 = OK / Done
0x01 = User Cancel
0x02 = Timeout
0x03 = Host Cancel
0x04 = Verify fail
0x05 = Keypad Security
0x06 = Calibration Done
0x07 = Write with duplicate RID and index
0x08 = Write with corrupted Key
0x09 = CA Public Key reached maximum capacity
0x0A = CA Public Key read with invalid RID or Index
ACK Status
(“ACKSTS”)
0x00 = OK / Done
0x80 = System Error
0x81 = System not Idle
0x82 = Data Error
0x83 = Length Error
0x84 = PAN Exists
0x85 = No Key or Key is incorrect
0x86 = System busy
0x87 = System Locked
0x88 = Auth required
0x89 = Bad Auth
0x8A = System not Available
0x8B = Amount Needed
0x90 = Cert non-exist
0x91 = Expired (Cert/CRL)
0x92 = Invalid (Cert/CRL/Message)
0x93 = Revoked (Cert/CRL)
0x94 = CRL non-exist
0x95 = Cert exists
0x96 = Duplicate KSN/Key
0x00 = OK
Otherwise, the possible values are listed below:
System – 1 = System Error (EndSession clears)
Auth – 1 = Not Authorized (cleared when device is authenticated)
Tamper – 1 = Tamper Detected
MSR – 00 = OK
– 01 = No MSR Key
– 10 = MSR Key Exhausted
– 11 = MSR Key not Bound PIN – 00 = OK
– 01 = No PIN Key
– 10 = PIN Key Exhausted
– 11 = PIN Key not Bound
Bit 7
6 5 4 3 2 1 0
System
Auth
0
Tamper
MSR
PIN
Session State
The possible values are listed below:
Pwr Chg – 1 = Power Change Occurred (occurs on Power up or after a USB
resume)
Card Data – 1 = Card Data Available
MSR PAN – 1 = PAN Parsed from Card
EXPAN – 1 = External PAN Sent
Amt – 1 = Amount sent
Bit 7
6 5 4 3 2 1 0
Pwr
Chg
0 0 0
Card
Data
MSRPA
N
EXPAN
Amt
Device Certificate
Status
0 = Certificate does not exist in the device
1 = Certificate exists in the device
In addition to the standard EMV tags documented in EMV 4.3, Book 3, Annex A, MagTek provides
additional custom tags with the device, which are listed in Table 3-80. The characters used in the
“Format” column are described in EMV 4.3, Book 4, Section 4.3.
This appendix describes how the host can define user-defined messages on the device. Start by creating a
block of user-defined message data (see Table 3-95) containing one or more user data strings, and send it
to the device using Report 0x10 – Send Big Block Data to Device. The messages are then available
when using the Select or Display commands.
Table 3-95 - User-Defined Messages Big Block Format
Table 3-96 - User-defined Message Format
This code snippet provides an example of how to write a user-defined message to the device:
void addUserString(MemoryStream m, byte x, byte y, byte p1, byte
p2,string s)
{
m.WriteByte((byte)(s.Length+5));
m.WriteByte(x);
m.WriteByte(y);
m.WriteByte(p1);
m.WriteByte(p2);
System.Text.ASCIIEncoding encoding = new
System.Text.ASCIIEncoding();
m.Write(encoding.GetBytes(s),0,s.Length);
}