Unitech MS246 - Uncategorized

MS246 - Uncategorized Unitech - Free user manual and instructions

Find the device manual for free MS246 Unitech in PDF.

📄 61 pages English EN Download 💬 AI Question
Notice Unitech MS246 - page 5
Pick your language and provide your email: we'll send you a specifically translated version.

User questions about MS246 Unitech

0 question about this device. Answer the ones you know or ask your own.

Ask a new question about this device

The email remains private: it is only used to notify you if someone responds to your question.

No questions yet. Be the first to ask one.

Download the instructions for your Uncategorized in PDF format for free! Find your manual MS246 - Unitech and take your electronic device back in hand. On this page are published all the documents necessary for the use of your device. MS246 by Unitech.

USER MANUAL MS246 Unitech

This equipment has been tested and 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 commercial 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 to radio communications. Operation of this equipment in a residential area is likely to cause harmful interference, in which case, the user will be required to correct the interference at his expense.

FCC COMPLIANCE STATEMENT

This device complies with Part 15 of the FCC Rules. Operation of this device is subject to the following conditions: this device may not cause harmful interference and 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 for digital apparatus set out in the Radio Interference Regulations of the Canadian Department of Communications.

An independent laboratory performed testing for compliance to CE requirements. The unit under test was found compliant to Class B.

MS246 User Manual

LIMITED WARRANTY

Unitech warrants to the original purchaser for a period of 24 months from the date of invoice that this product is in good working order and free from defects in material and workmanship under normal use and service. Unitech's obligation under this warranty is limited to, at its option, replacing, repairing, or giving credit for any product that returned to the factory of origin within the warranty period and with transportation charges and insurance prepaid, and which is, after examination, disclosed to Unitech's satisfaction to be defective. The expense of removal and reinstallation of any item or items of equipment is not included in this warranty. No person, firm, or corporation is authorized to assume for Unitech any other liabilities in connection with the sales of any product. In no event shall Unitech be liable for any special, incidental or consequential damages to purchaser or any third party caused by any defective item of equipment, whether that defect is warranted against or not. Purchaser's sole and exclusive remedy for defective equipment, which does not conform to the requirements of sales, is to have such equipment replaced or repaired by Unitech. For limited warranty service during the warranty period, please contact Unitech to obtain a Return Material Authorization (RMA) number & instructions for returning the product.

THIS WARRANTY IS IN LIEU OF ALL OTHER WARRANTIES OF MERCHANTABILITY OR FITNESS FOR PARTICULAR PURPOSE. THERE ARE NO OTHER WARRANTIES OR GUARANTEES, EXPRESSED OR IMPLIED, OTHER THAN THOSE HEREIN STATED. THIS PRODUCT IS SOLD AS IS. IN NO EVENT SHALL UNITECH BE LIABLE FOR CLAIMS BASED UPON BREACH OF EXPRESSED OR IMPLIED WARRANTY OR NEGLIGENCE OF ANY OTHER DAMAGES WHETHER DIRECT, IMMEDIATE, FORESEEABLE, CONSEQUENTIAL OR SPECIAL OR FOR ANY EXPENSE INCURRED BY REASON OF THE USE OR MISUSE, SALE OR FABRICATION OF PRODUCTS WHICH DO NOT CONFORM TO THE TERMS AND CONDITIONS OF THE CONTRACT.

The information contained herein is provided to the user as a convenience. While every effort has been made to ensure accuracy, Unitech is not responsible for damages that might occur because of errors or omissions, including loss of profits or other commercial damage, nor for any infringements or patents or other rights of third parties that may result from its use. The specifications described herein were current at the time of publication, but are subject to change at any time without prior notice.

Unitech is a trademark of Unitech Electronics Co., Ltd. USB (Universal Serial Bus) specification is copyright by Compaq Computer Corporation, Intel Corporation, Microsoft Corporation, and NEC Corporation. Windows is registered trademark of Microsoft Corporation.

Unitech America, Inc.

6182 Katella Ave.

Cypress, CA 90630

(714) 891-6400

MS246 User Manual

Table of Contents

  1. Introduction......6
  2. Features and Benefits....6
  3. Terms and Abbreviations .... 7
  4. Applicable Documents....8
  5. Operation 9
  6. Specification....10
  7. Command Process....12

Notation used throughout the document: 13

7.1 Get Copyright Information.... 13
7.2 Version Report Command 14
7.3 Key Loading Command....14
7.4 Reader Reset Command 16
7.5 OPOS/JPOS Command 16
7.6 Arm/Disarm to Read Command 16
7.7 Read Buffered MSR Data Command 17
7.8 Read MSR Options Command 17
7.9 Set MSR Options Command 18
7.9.1. Beep Volume 18
7.9.2. Change to Default Settings 18
7.9.3. MSR Reading Settings....18
7.9.4. Decoding Method Settings....18
7.9.5. Terminator Setting....19
7.9.6. Preamble Setting....19
7.9.7. Postamble Setting....19
7.9.8. Track n Prefix Setting....19
7.9.9. Track x Suffix Setting....20
7.9.10. Track Selection 20
7.9.11. Track Separator Selection....21
7.9.12. Start/End Sentinel and Track 2 Account Number Only....21

  1. Data Format....22

8.1 Level 1 and level 2 Standard Mode Data Output Format....22
8.1.1. USB HID Data Format....23
8.1.2. Descriptor Tables 24
8.2 Level 1 and level 2 POS Mode Data Output Format 28
8.3 DUKPT Level 3 Data Output Enhanced Format....31
8.4 DUKPT Level 3 Data Output Original Format....34
8.5 DUKPT Level 4 Data Output Original Format....35
8.6 Decryption Example....39
8.6.1. Security Level 3 Decryption - Original Encryption Format....39
8.6.2. Security Level 4 Decryption - Original Encryption Format....41
8.6.3. Security Level 3 Decryption - Enhanced Encryption Format....42
8.6.4. Security Level 4 Decryption - Enhanced Encryption Format 45
8.7 Level 4 Activate Authentication Sequence 46

Appendix A Setting Parameters and Values....50

MS246 User Manual

Appendix B Key Code Table in USB Keyboard Interface 55

1. Introduction

The Unitech MS246 is an intelligent, programmable magnetic stripe reader that provides a wide range of functionality and value in a convenient package size. The entire unit is just 100mm long, about the length of a credit card. It reads up to three tracks of information with a single swipe in either direction, and has a beeper and three-color LED indicator to signal a successful read. The MS246 is programmable so that the data format and intelligent interface output can be programmed & configured to match application and communication requirements.

2. Features and Benefits

● Bi-directional card reading
- Reads up to three tracks of card data
● An LED and a beeper on the reader provide status of the reading operations
- Compatible with USB specification Revision 2.0 (USB interface)
● Compatible with HID specification Version 1.1 (USB interface)
- Uses standard Windows HID driver for communications; no third party device driver is required (USB interface)
- User-friendly configuration software for device configuration

MS246 User Manual

3. Terms and Abbreviations

AAMVA American Association of Motor Vehicle Administration

ABA American Banking Association

AES Advanced Encryption Standard

ASIC Application Specific Integrated Circuit

BPI Bits per Inch

CADL California Drivers License Format (obsolescent)

CE European Safety and Emission approval authority

COM serial communication

CTS Clear-To-Send

CDC USB to serial driver (Communication Device Class)

DES Data Encryption Standard

DUKPT Derived Unique Key Per Transaction

DMV Department of Motor Vehicle

GND Signal Ground

HID Human Interface Device

IPS Inches per Second

ISO International Organization for Standardization

JIS Japanese Industrial Standard

JPOS Java for Retail Point Of Sale

KB Keyboard

KSN Key Serial Number

LED Light Emitting Diode

LRC Longitudinal Redundancy Check Character.

MAC Message Authentication Code

MSR Magnetic Stripe Reader

OLE Object Linking and Embedding

OPOS OLE for Retail Point Of Sale

OTP One Time Programmable

PAN Primary account number

PCI Payment Card Industry

PID USB Product ID

POS Point of Sale

PPMSR Serial Port Power Magstripe Reader

P/N Part Number

PS/2 IBM Personal System/2 Keyboard Interface

RTS Request To Send

SPI Serial Peripheral Interface

T1, T2, T3 Track 1 data, Track 2 data, Track 3 data

TDES Triple Data Encryption Standard

VID USB Vendor ID

Note: many unusual words used in this document are defined in the Function ID table in Appendix A on page 59.

MS246 User Manual

4. Applicable Documents

ISO 7810-1985 Identification Cards - Physical

ISO 7811 - 1 through 6 Identification Cards - Track 1 through 3

ISO 7816 - 1 through 4 Identification Cards - Integrated circuit cards with contacts

ISO 4909 Magnetic stripe content for track 3

ISO 7812 Identification Cards – Identification for issuers Part 1 & 2

ISO 7813 Identification Cards – Financial Transaction Cards

ANSI X.94 Retail Financial Services Symmetric Key Management

5. Operation

A card may be swiped through the reader slot when the LED is green. The magnetic stripe must face toward the magnetic read head and may be swiped in either direction. After a card is swiped, the LED will turn off temporarily until the decode process is completed. If there are no errors decoding the card data then the LED will turn green. If there are any errors decoding the card data, the LED will turn red for less than one second to indicate that an error occurred and then turn green.

The beeper also provides error indication. The beeper will beep for each correctly read track of data on the magstripe card. Depending on the security level configured, the card data might be displayed in clear or encrypted mode.

6. Specification

Power Consumption

  • 5VDC +/- 10%.
    • Current maximum operating consumption is less than 50mA.
  • USB interface – from host interface. No external power adaptor needed.

Swipe speed

• 3 to 65 inches per second.
- Bi-directional.

Indicators

  • Tri-color LED:
  • Red indicates a bad read.
    o LED is off while reading and decoding.
    ○ Green indicates a good read and ready to read.

  • Beeper:
    ○ A beep sound indicates a good read.

Communication Interface

  • USB:
  • Complies with USB 2.0 specification.

Card Size

• Supports cards that meet the ISO 7810 and 7811 1-7 standards.

Dimension

• 3.94 in. (length) X 1.38 in. (width) X 1.18 in. (height).

Interface cable and connector

  • USB interface:
    o Standard USB interface cable.
    o Series "A" plug.
    ○ Standard cable length is 6 feet.
    ○ Pin Out Table:
J1ColorSignalP1
1-CASE_GNDSHELL
3GRN+DATA3

Copyright © 2011, Unitech America Inc. All rights reserved.

MS246 User Manual

5RedV_IN1
6White-DATA2
7BLKGND4

LED indicator

- 2mmx5mm, Green/Red dual color under firmware control.

7. Command Process

Command requests and responses are sent to and received from the device. For USB interface devices, the commands are sent to the device using HID class specific request Set_Report (21 09 ...). The response to a command is retrieved from the device using HID class specific request Get_Report (A1 01 ...). These requests are sent over the default control pipe. For RS232 interface devices, please see the commands listed below.

Function ID Table:

The complete table of Function ID used in command/response are listed in Appendix A.

Setting Command:

The setting data command is a collection of many function setting blocks and its format is as follows.

Command:

...

Response: or for wrong command (invalid funcID, length and value)

Each function-setting block has following format:

Where:

is one byte identifying the setting(s) for the function.

is the length count for the following function-setting block .

is the current setting for this function. It has the same format as in the sending command for this function.

Get Setting Command:

This command will send current setting to application.

Command:

Response:

, and definition are the same as described above.

Where:

CharactersHex ValueDescription
02Start of Text
03End of Text
06Acknowledge
15 forNegative Acknowledge

Copyright © 2011, Unitech America Inc. All rights reserved.

MS246 User Manual

RS232 and USB HID interface; FD for USB KB interface
16Warning: Unsupported ID in setting
17Warning: Reader already in OPOS mode
52Review Setting
53Send Setting
-Xor'd all the data before LRC.

Reader Command Summary

ASCIIHEXNameUse
‘8’38Copyright ReportRequests reader's copyright notice
‘9’39Version ReportRequests version string
‘F”46Key LoadingSpecial command to load encryption keys
‘I’49Reader ResetReset the reader. Software reset does not resend startup string
‘M’4DOPOS/ JPOS CommandCommand to enter OPOS or JPOS mode
‘P’50Arm/Disarm to ReadArm to Capture Buffer Mode MSR
‘Q’51Read Buffered DataRead Stored MSR Data
‘R’52Read MSR OptionsRead various reader optional settings
‘S’53Set MSR OptionsSet various reader optional functions

Notation used throughout the document:

Bold: boldface font indicates default setting value.

'2': with single quotations, indicates ASCII characters, for example, '2' is 32 in hex.

"Number": is a null terminated character string.

: with angle brackets indicates a specific character or character string in a command or response.

Hex: is the hex character 53 is '5' in ASCII or 83 in decimal. Sometimes hex characters are represented with an h attached to the end, for example, 53h.

\02: is a way to show that the following number is in hex. It is used by the configuration program.

02 38 03 39

A '31-byte' Copyright Notice will be returned.

Copyright © 2011, Unitech America Inc. All rights reserved.

MS246 User Manual

Response is as follows:

ACK STX ETX LRC

Response Example mixed hex and ASCII:

\06\02Copyright (c) 2010, UNITECH \03>

7.2 Version Report Command

02 39 03 38

Response is as follows:

ACK STX ETX LRC

Response Example mixed hex and ASCII:

\06\02UNITECH TM3 MS246 RS232 Reader V 3.19\03\LRC

7.3 Key Loading Command

Note: This command is normally only used by a key loading facility.

The Encrypted swipe read supports TDES and AES encryption standards for data encryption. Encryption can be turned on via a command. TDES is the default.

If the reader is in security level 3, for the encrypted fields, the original data is encrypted using the TDES/AES CBC mode with an Initialization Vector starting at all binary zeroes and the Encryption Key associated with the current DUKPT KSN.

KSN and Device Key loading commands and responses protocol:

When DUKPT key management is used, it is necessary to load Key Serial Number (KSN) and Initially Loaded Device Key before transaction.

The encryption key is TDES with 128 bit keys or AES encryption with double length keys (128 bit keys including parity).

KSN and Device Key loading commands and responses protocol:

Command:

<'F'><'F'><0x0D><0x0A>

Response:

<'F'><'F'>< Respond Data(BASE64)<0x0D><0x0A>

STX: 0x02

ETX: 0x03

ACK: 0x06

NAK: 0x15

BASE64: Data encoded with base64 algorithm

LRC: Xor'd all the data before LRC

MS246 User Manual

A successful key loading process includes the following steps:

- Get Key status

Command Data: <13><01><02>

Response Data: <00><01><04>

For Example:

Command: \02\46\46\2F\78\4D\42\41\75\38\3D\0D\0A\03\LRC

Response: \06\02\46\46....\0D\0A\03\LRC

- Load KSN

Command Data: <0A><11>

Response Data: <00><06>

: TDES: 0x32 DES: 0x0A

: 16 bytes ASCII for KSN

: 6 bytes data in ASCII format which is converted from the first 3 cipher hex data. These cipher data are generated by encrypting KSN bytes and "00 00 00 00 00 00 00 00".

For Example:

Command:

\02\46\46\2F\77\6F\52\4D\6B\5A\47\52\6B\59\35\4F\44\63\32\4E\54\51\7A\4D\6A\45\77\52\54\43\69\0D\0A\03\5D

Response: \06\02\46\46....\0D\0A\03\LRC

- Load Encryption Key

Command Data: <0A>

Response Data: <00><06>

: TDES: 0x21 DES: 0x11

: TDES: 0x33 DES: 0x0B

: TDES: 0x20 DES: 0x10

: 6 bytes data in ASCII format which is converted from the first 3 cipher hex data. These cipher data are generated by encrypting KEY bytes and "00 00 00 00 00 00 00 00."

For Example:

Command:

0246462F776F684D7A5A42517A49354D6B5A425154457A4D54

56\43\4E\45\51\34\4E\54\68\42\51\6A\4E\42\4D\30\51\33\52\44\55\35\4D\7A\4E\42

\6C\51\3D\3D\0D\0A\03\2D

Response: \06\02\46\46....\0D\0A\03\LRC

MS246 User Manual

7.4 Reader Reset Command

02 49 03 48

The reader supports a reset reader command. This allows the host to return the reader to its default state.

Response is as follows:

06

7.5 OPOS/JPOS Command

There are three forms of the command:

02 4D 01 30 03 7D Enter Standard Mode (Exit OPOS Mode)

02 4D 01 31 03 7C Enter OPOS Mode

02 4D 01 32 03 7F Enter JPOS Mode

Response is as follows:

17 Reader already in OPOS Mode

15 Command failure (wrong length or wrong parameter)

06 Success

7.6 Arm/Disarm to Read Command

Arm to read:

02 50 01 30 03 LRC

This command enables the MSR to be ready for a card swipe in buffered mode.

Any previously read data will be erased and reader will wait for the next swipe.

As the user swipes a card, the data will be saved, but will not be sent to the host. The reader holds the data until receiving the next “Arm to Read” or “MSR Reset” command.

Disarm to read:

02 50 01 32 03 LRC

This command will disable MSR read and clear any magnetic data in buffered mode. The reader enters to a disarmed state and will ignore MSR data.

Response is as follows:

06

Other possible response statuses:

NAK 'P' command length must be 1.

NAK 'P' command must be 0x30 or 0x32.

NAK Reader not configured for buffered mode.

NAK Reader not configured for magstripe read.

NAK for keyboard interface is FD, non-KB mode NAK is 15

7.7 Read Buffered MSR Data Command

02 51 01 03 LRC

The byte is defined as follows:

'0' Any Track
'1' Track 1
'2' Track 2
‘3’ Track 1 and Track 2
'4' Track 3
'5' Track 1 and Track 3
‘6’ Track 2 and Track 3
'7' Track 1, Track 2 and Track 3
'8' Track 1 and/or Track 2
'9' Track 2 and/or Track 3

This command requests card data information for the buffered mode.

The selected MSR data is sent to the host with or without envelope format, according to the operation mode setting.

This command does not erase the data.

Response is as follows:

$$ 0 6 0 2 < \text { Len_H } > < \text { Len_L } > < \text { MSR Data } > 0 3 \text { LRC } $$

Other possible response statuses:

18 'Q' command length must be 1

18 Reader not configured for buffered mode

NAK Already armed

NAK for keyboard interface is FD, non-KB mode NAK is 15

7.8 Read MSR Options Command

02 52 1F 03 LRC

format:

The current setting data block is a collection of many function-setting blocks

as follows:

...

Each function-setting block has the following format:

MS246 User Manual

Where:

is one byte identifying the setting(s) for the function.

is a one byte length count for the following function-setting block .

is the current setting for this function. It has the same format as in the sending command for this function.

are in the order of their Function ID.

7.9 Set MSR Options Command

The default value is listed in bold.

7.9.1. Beep Volume

The beep volume and frequency can each be adjusted to two different levels, or turned off.

02 53 11 01 03 LRC

Beep Settings:

‘0’ for beep volume off.
‘1’ for beep volume high, low frequency.
'2' for beep volume high, high frequency.
‘3’ for beep volume low, high frequency.
‘4’ for beep volume low, low frequency.

7.9.2. Change to Default Settings

02 53 18 03 LRC

This command does not have any . It returns all non-security settings for all groups to their default values.

7.9.3. MSR Reading Settings

02 53 1A 0103 LRC

MSR Reading Settings:

'0' = MSR reading disabled.

'1' = MSR reading enabled.

7.9.4. Decoding Method Settings

02 53 1D 01 03 LRC.

Decoding Method Settings:

'0' = raw data decoding in both directions.

'1' = decoding in both directions.

‘2’ = moving stripe along head in the direction of encoding.

Copyright © 2011, Unitech America Inc. All rights reserved.

‘3’ moving stripe along head against the direction of encoding.

With the bi-directional method, the user can swipe the card in either direction and still read the data encoded on the magnetic stripe. Otherwise, the card can only be swiped in one specified direction to read the card. Raw Decoding just sends the card's magnetic data in groups of 4 bits per character. No checking is done except to verify that the track has or does not have magnetic data.

7.9.5. Terminator Setting

Terminator characters are used to end a string of data in some applications.

02 53 21 01 03 LRC

Any one character, 00h is none; default is CR (0Dh).

7.9.6. Preamble Setting

Characters can be added to the beginning of a string of data. These can be special characters for identifying a specific reading station, to format a message header expected by the receiving host, or any other character string. Up to fifteen ASCII characters can be defined.

02 53 D2 03 LRC

Where:

Len = the number of bytes of preamble string.

Preamble = {string length} {string}.

NOTE: String length is one byte, maximum fifteen <0Fh>.

7.9.7. Postamble Setting

The postamble serves the same purpose as the preamble, except it is added to the end of the data string, after any terminator characters.

02 53 D3 03 LRC

Where:

Len = the number of bytes of postamble string

Postamble = {string length} {string}

NOTE: String length is one byte, maximum fifteen <0Fh>.

7.9.8. Track n Prefix Setting

Characters can be added to the beginning of a track data. These can be special characters to identify the specific track to the receiving host, or any other

character string. Up to six ASCII characters can be defined.

02 53 03 LRC

Where:

n is 34h for track 1, 35h for track 2, and 36h for track 3.

Len = the number of bytes of prefix string.

Prefix = {string length} {string}.

NOTE: String length is one byte, maximum six.

7.9.9. Track x Suffix Setting

Characters can be added to the end of track data. These can be special characters to identify the specific track to the receiving host, or any other character string. Up to six ASCII characters can be defined.

02 53 03 LRC

Where:

n is 37h for track 1, 38h for track 2, and 39h for track 3.

Len = the number of bytes of suffix string.

Suffix = {string length} {string}.

NOTE: String length is one byte, maximum six.

7.9.10. Track Selection

There are up to three tracks of encoded data on a magnetic stripe.

This option selects the tracks that will be read and decoded.

02 53 13 01 03 LRC

'0' = Any Track.

'1' = Require Track 1 Only.

'2' = Require Track 2 Only.

'3' = Require Track 1 & Track 2.

‘4’ = Require Track 3 Only.

'5' = Require Track 1 & Track 3.

'6' = Require Track 2 & Track 3.

'7' = Require All Three Tracks.

'8' = Any Track 1 & 2.

'9' = Any Track 2 & 3.

Note: If any of the required multiple tracks fail to read for any reason, no data for any track will be sent.

Copyright © 2011, Unitech America Inc. All rights reserved.

7.9.11. Track Separator Selection

This option allows the user to select the character to be used to separate data decoded by a multiple-track reader.

02 53 17 01 03 LRC

is one ASCII Character.

The default value is C. 0h means no track separator.

7.9.12.Start/End Sentinel and Track 2 Account Number Only

The MS246 can be set to either send, or not send, the Start/End sentinel, and to send either the Track 2 account number only, or all the encoded data on Track 2.

(The Track 2 account number setting doesn't affect the output of Track 1 and Track 3.)

02 53 19 01 03 LRC

'0' = Don't send start/end sentinel and send all data on Track 2.

'1' = Send start/end sentinel and send all data on Track 2.

'2' = Don't send start/end sentinel and send account number on Track 2.

‘3’ = Send start/end sentinel and send account number on Track 2.

MS246 User Manual

8. Data Format

The USB version of the reader can be operated in two different modes:

- HID Unitech mode (herein referred to as “HID mode”), Product ID: 2010.

- HID with Keyboard Emulation (herein referred to as “KB mode”), Product ID: 2030.

When the reader is operated in the HID mode, it behaves like a vendor defined HID device. A direct communication path can be established between the host application and the reader without interference from other HID devices.

8.1 Level 1 and level 2 Standard Mode Data Output Format

USB HID Output Format

Card data is only sent to the host on the Interrupt In pipe using an Input Report. The reader will send only one Input Report per card swipe. If the host requests data from the reader when no data is available, the reader will send a NAK to the host to indicate that it has nothing to send.

8.1.1. USB HID Data Format

Other Mode Reader Data Structure

Offset Usage Name .
0 T1 decode status
1 T2 decode status
2 T3 decode status
3 T1 data length
4 T2 data length
5 T3 data length
6 Card encode type
7-116 T1 data
117-226 T2 data
227-336 T3 data
Notes:
T1, T2 or T3 decode status: 0 for no error, 1 for error
T1, T2 or T3 Data Length: Each byte value indicates how many bytes of decoded card data are in the track data field. This value will be zero if there was no data on the track or if there was an error decoding the track.

Card Encode Type:

Value Encode Type Description

0 ISO/ABA ISO/ABA encode format.

1 AAMVA AAMVA encode format.

3 Other The card has a non-standard format. For example, ISO/ABA track 1 format on track 2.

4 Raw The card data is sent in Raw encrypted format. All tracks are encrypted and no mask data is sent.

T1, T2 or T3 data: The length of each track data field is fixed at 110 bytes, but the length of valid data in each field is determined by the track data length field that corresponds to the track number. The track data includes all data string starting with the start sentinel and ending with the end sentinel.

Unitech Reader Data Structure

Offset Usage Name .

0 T1 decode status
1 T2 decode status
2 T3 decode status
3 T1 data length
4 T2 data length

Copyright © 2011, Unitech America Inc. All rights reserved.

MS246 User Manual

5 T3 data length

6 Card encode type

7,8 Total output length

9-512 Output data

In this approach, the reader will keep all of the Unitech data editing and other features like preamble, postamble, etc. The output data is always 512 bytes; the "Total Output Length" field indicates the valid data length in the output data.

8.1.2. Descriptor Tables

Device Descriptor:

FieldValueDescription
Length12
Des type01
bcd USB00 02USB 2.0
Device Class00Unused
Sub Class00Unused
Device Protocol00Unused
Max Packet Size08
VID0A CD
PID20 10HID Unitech Structure
20 20HID Other Structure
20 30HID Keyboard
BCD Device Release00 01
i-Manufacture01
i-Product02
i-Serial-Number00
# Configuration01

Configuration Descriptor:

FieldValueDescription
Length09
Des type02
Total Length22 00
No. Interface01
Configuration Value01

MS246 User Manual

iConfiguration00
Attributes80Bus power, no remove wakeup
Power32100 mA

Interface Descriptor:

FieldValueDescription
Length09
Des type04
Interface No.00
Alternator Setting00
# EP01
Interface Class03HID
Sub Class01
Interface Protocol01
iInterface00

HID Descriptor:

FieldValueDescription
Length09
Des type21HID
bcdHID11 01
Control Code00
numDescriptors01Number of Class Descriptors to follow
DescriptorType22Report Descriptor
Descriptor Length37 00HID Unitech format
3D 00HID Other format
52 00HID Keyboard format

End Pointer Descriptor:

FieldValueDescription
Length07
Des Type05End Point
EP Addr83EP3 – In
Attributes03Interrupt
MaxPacketSize40 00
bInterval01

Report Descriptor: (USB-HID Setting)

Copyright © 2011, Unitech America Inc. All rights reserved.

MS246 User Manual

ValueDescription
06 00FFUsage Page (MSR)
09 01Usage(Decoding Reader Device)
A1 01Collection (Application)
15 00Logical Minimum
26 FF00Logical Maximum
75 08Report Size
09 20Usage (Tk1 Decode Status)
09 21Usage (Tk2 Decode Status)
09 22Usage (Tk3 Decode Status)
09 28Usage (Tk1 Data Length)
09 29Usage (Tk2 Data Length)
09 2AUsage (Tk3 Data Length)
09 38Usage (Card Encode Type)
95 07Report Count
81 02Input (Data, Var, Abs, Bit Field)
09 30Usage (Total Sending Length)
95 02Report Count (2)
82 0201Input (Data, Var, Abs, Bit Field)
09 31Usage (Output Data)
96 1002Report Count (512 + 16 )
82 0201Input (Data, Var, Abs, Bit Field)
09 20Usage (Command Message)
95 08Report Count
B2 0201Feature (Data, Var, Abs, Buffered Bytes)
C0End Collection

Report Descriptor: (USB KB Interface)

ValueDescription
05 01Usage Page (Generic Desktop)
09 06Usage(Keyboard)
A1 01Collection (Application)
05 07Usage Page (Key Codes)
19 E0Usage Minimum
29 E7Usage Maximum

MS246 User Manual

15 00Logical Minimum
25 01Logical Maximum
75 01Report Size
95 08Report Count
81 02Input (Data,Variable,Absolute)
95 01Report Count (1)
75 08Report Size
81 01Input Constant
95 05Report Count
75 01Report Size
05 08Usage Page (LED)
19 01Usage Minimum
29 05Usage maximum
91 02Output(Data Variable Absolute)
95 01Report Count
75 03Report Size
91 01Output (Constant)
95 06Report Count
75 08Report Size
15 00Logical Minimum
25 66Logical Maximum (102)
05 07Usage Page (key Code)
19 00Usage Minimum
29 66Usage Maximum (102)
81 00Input(Data, Array)
06 2D FFUsage Page (UNITECH)
95 01Report Count
26 FF 00Logical maximum (255)
15 01Logical Minimum
75 08Report Size (8)
09 20Usage (Setup data byte)
95 08Report Count (8)
B2 02 01Feature (Data Var, Abs)
C0End Collection

MS246 User Manual

8.2 Level 1 and level 2 POS Mode Data Output Format

In POS mode use the special envelope to send out card data. The envelope is in the following format:

[Right Shift, Left Shift, Right Ctrl, Left Ctrl,] Read Error, Track x ID; Track x Error; Track x Data Length; Track x Data; Card Track x LEC code; Track x data LRC.

The reader will send out card data in Alt mode if its ASCII code less than H'20'.

Byte NO.Name
0Right Shift
1Left Shift
2Right Ctrl
3Left Ctrl
4Read Error 1
5Read Error 2
6Track x ID
7Track x Error
8Track x Length 1
9Track x Length 2
10Track Data (no extra Track ID for raw data)
...
10 + Track len -1Card Track x LRC
10 + Track lenTrack x LRC
10 + Track len +10x0D
10 + Track len + 2Track x ID
....Repeat Track

The data format is independent with MSR setting. There is no track x data if track x sampling data does not exist.

OPOS header:

Only HID KB interface has [Right Shift, Left Shift, Right Ctrl, Left Ctrl] under POS mode.

Read Error:

B0 1: Track 1 sampling data exists (0: Track 1 sampling data does not exist).

B1 1: Track 2 sampling data exists (0: Track 2 sampling data does not exist).

B2 1: Track 3 sampling data exists (0: Track 3 sampling data does not exist).

MS246 User Manual

B3 1: Track 1 decode success (0: Track 1 decode fail).
B4 1: Track 2 decode success (0: Track 2 decode fail).
B5 1: Track 3 decode success (0: Track 3 decode fail).
B6 0: if b0 to b5 are all 1, otherwise 1 (make it printable).

Read Error byte 2:

MB LB
01B12B11B10B9B8B7

B7 1: Track 4 sampling data exists (0: Track 4 sampling data does not exist).

B8 1: Track 4 JIS II decode success (0: Track4 JIS II decode fail).

B9, B10, B11

000: ISO Card (7, 5) or (7, 5, 5) encoding.

001: Old CADL Card (6, 5, 6) encoding (no longer included).
010: AAMVA Card (7, 5, 7) encoding.
011: JIS I Card (8, 5, 8) encoding.
100: JIS II card (8) or ISO+JIS II.
110: OPOS Raw Data Output.
111: JIS I + JIS II.

B12 Reserved for future use

Decode flag will set to 1 (B3, B4 and B5 all set to 1) in OPOS raw data mode.

Track ID

Track ID is a byte of ID, it will be '1', '2' and '3' for track 1, 2 and 3; it is not accurate to use start sentinel to identify track.

Track x Error

Track x error is a byte of flags, it will be in format of: 0 0 1 b4, b3, b2 b1 b0

b0 1: Start sentinel error (0: Not start sentinel error).
b1 1: End sentinel error (0: Not end sentinel error).
b2 1: Parity error (0: Not parity error).
b3 1: LRC error (0: Not LRC error).
b4 1: Other error (0: Not other error).

Track x Error is set to 0x20 in OPOS raw data mode.

Track Length

Assume actual "Track x Data Length" is hex code xy; the Track x data length for OPOS mode output will be hex code 3x, 3y.

Track x data length does not include the byte of "Track x data LRC", it is <30> <30> in case of read error on track x.

Track Data

"Card Track x LRC code" is track x card data.

MS246 User Manual

Track x LRC

“Track x data LRC” is a LRC to check track x data communication; XOR all characters starting from "Track x ID" to "Track x data LRC" should be 0.

8.3 DUKPT Level 3 Data Output Enhanced Format

This mode is used when all tracks must be encrypted, encrypted OPOS support is required, when the tracks must be encrypted separately, when cards other than type 0 (ABA bank cards) must be encrypted, or when track 3 must be encrypted. This format is the standard encryption format, but not yet the default encryption format.

  1. Encryption Output Format Setting:

Command: 53 85 01

Encryption Format:

'00h': Original Encryption Format.

‘01h’: Enhanced Encryption Format.

  1. Encryption Option Setting: (for enhanced encryption format only)

Command: 53 84 01

Encryption Option: (default 08h)

bit0: 1 - track 1 force encrypt.

bit1: 1 - track 2 force encrypt.

bit2: 1 - track 3 force encrypt.

bit3: 1 - track 3 force encrypt when card type is 0.

Note:

1) When force encrypt is set, this track will always be encrypted, regardless of the card type. No clear/mask text will be sent.

2) If and only if in enhanced encryption format, each track is encrypted separately. Encrypted data length will round up to 8 or 16 bytes.

3) When force encrypt is not set, the data will be encrypted in original encryption format, that is, only track 1 and track 2 of type 0 cards (ABA bank cards) will be encrypted.

  1. Hash Option Setting:

Command: 53 5C 01

Hash Option: ('0' - '7')

Bit0: 1 – track 1 hash will be sent if data is encrypted.

Bit1: 1 – track 2 hash will be sent if data is encrypted.

Bit2: 1 – track 3 hash will be sent if data is encrypted.

MS246 User Manual

  1. Mask Option Setting: (for enhanced encryption format only)

Command: 53 86 01

Mask Option: (Default: 0x07)

bit0: 1 - tk1 mask data allowed to send when encrypted.

bit1: 1 - tk2 mask data allowed to send when encrypted.

bit2: 1 - tk3 mask data allowed to send when encrypted.

When mask option bit is set – if data is encrypted (but not force encrypted), the mask data will be sent. If mask option is not set, the mask data will not be sent under the same condition.

Settings for OPOS:

  1. Assume reader is under default setting (Encrypt Structure 0).
  2. Set to new Encrypt Structure 1:

53 85 01 31

The OPOS driver/application may also send the following command when changed (Decode/Raw format)

(Set raw or decode data format)

53 1D 01 30 // RAW data format

53 1D 01 31 // Decoded format

Card data is sent out in the following format

0 STX

1 Data Length low byte
2 Data Length high byte
3 Card Encode Type
4 Track 1-3 Status
5 Track 1 data length
6 Track 2 data length
7 Track 3 data length
8 Clear/masked data sent status 3
9 Encrypted/Hash data sent status
10 Track 1 clear/mask data
Track 2 clear/mask data
Track 3 clear/mask data
Track 1 encrypted data
Track 2 encrypted data
Track 3 encrypted data
Session ID (8 bytes) (Security level 4 only)

MS246 User Manual

Track 1 hashed (20 bytes each) (if encrypted and hash track 1 allowed)

Track 2 hashed (20 bytes each) (if encrypted and hash track 2 allowed)

Track 3 hashed (20 bytes each) (if encrypted and hash track 3 allowed)

KSN (10 bytes)

CheckLRC

CheckSum

ETX

Where <STX> = 02h , <ETX> = 03h

Note 1 : Card Encode Type

Card Type will be 8x for enhanced encryption format and 0x for original encryption format.

Value Encode Type Description

00h / 80hISO/ABA format
01h / 81hAAMVA format
03h / 83hOther
04h / 84hRaw, un-decoded format

For Type 04 or 84 raw data format, all tracks are encrypted and no mask data is sent. No track indicator '01', '02', or '03' in front of each track. Track indicator '01', '02', and '03' will still exist for non-encrypted mode.

Note 2: Track 1-3 status byte

Field 4:

Bit 0: 1— track 1 decoded data present.

Bit 1: 1— track 2 decoded data present.

Bit 2: 1— track 3 decoded data present.

Bit 3: 1— track 1 sampling data present.

Bit 4: 1— track 2 sampling data present.

Bit 5: 1— track 3 sampling data present.

Bit 6, 7 — Reserved for future use.

Note 3: Clear/mask data sent status

Field 8 (clear/mask data sent status) and field 9 (encrypted/hash data sent status) will only be sent out in enhanced encryption format.

MS246 User Manual

Field 8: Clear/masked data sent status byte:

Bit 0: 1 — track 1 clear/mask data present.

Bit 1: 1— track 2 clear/mask data present.

Bit 2: 1— track 3 clear/mask data present.

Bit 3: 0—reserved for future use.

Bit 4: 0—reserved for future use.

Bit 5: 0—reserved for future use.

Note 4: Encrypted/Hash data sent status

Field 9: Encrypted data sent status

Bit 0: 1— track 1 encrypted data present.

Bit 1: 1— track 2 encrypted data present.

Bit 2: 1— track 3 encrypted data present.

Bit 3: 1— track 1 hash data present.

Bit 4: 1— track 2 hash data present.

Bit 5: 1— track 3 hash data present.

Bit 6: 1—session ID present.

Bit 7: 1—KSN present.

8.4 DUKPT Level 3 Data Output Original Format

For ISO cards, both masked clear and encrypted data are sent, no clear data will be sent.

For other cards, only clear data is sent.

A card swipe returns the following data:

Card data is sent out in format of

$$ < \text { STX } > < \text { LenL } > < \text { LenH } > < \text { Card Data } > < \text { CheckLRC } > < \text { CheckSum } > < \text { ETX } > $$

$$ < \mathrm{STX} > = 0 2 \mathrm{h}, < \mathrm{ETX} > = 0 3 \mathrm{h} $$

is a two-byte length of .

is a one-byte exclusive-OR sum calculated for all .

is a one-byte sum value calculated for all .

card data format is shown below.

ISO/ABA Data Output Format:

- card encoding type (0: ISO/ABA, 4: for Raw Mode)

- track status (bit 0,1,2:T1,2,3 decode, bit 3,4,5:T1,2,3 sampling)

- track 1 unencrypted length (1 byte, 0 for no track1 data)

- track 2 unencrypted length (1 byte, 0 for no track2 data)

Copyright © 2011, Unitech America Inc. All rights reserved.

MS246 User Manual

  • track 3 unencrypted length (1 byte, 0 for no track3 data)
  • track 1 masked (Omitted if in Raw mode)
  • track 2 masked (Omitted if in Raw mode)
  • track 3 data (Omitted if in Raw mode)
  • track 1 encrypted (AES/TDES encrypted data)
  • track 2 encrypted (AES/TDES encrypted data)
  • track 3 encrypted (Only used in Raw mode)
  • track 1 hashed (20 bytes SHA1-Xor)
  • track 2 hashed (20 bytes SHA1-Xor)
    • DUKPT serial number (10 bytes)

Non ISO/ABA Data Output Format

  • card encoding type (1: AAMVA, 3: Others)
  • track status (bit 0,1,2:T1,2,3 decode, bit 3,4,5:T1,2,3 sampling)
  • track 1 length (1 byte, 0 for no track1 data)
  • track 2 length (1 byte, 0 for no track2 data)
  • track 3 length (1 byte, 0 for no track3 data)
  • track 1 data
  • track 2 data
  • track 3 data

8.5 DUKPT Level 4 Data Output Original Format

For the ISO card, both clear and encrypted data are sent. For other cards, only clear data is sent.

A card swipe returns the following data:

Card data is sent out in the following format:

=02h, =03h.

is a two-byte length of .

is a one-byte exclusive-OR sum calculated for all .

is a one-byte sum value calculated for all .

format is

ISO/ABA Data Output Format:

- card encoding type (0: ISO/ABA, 4: for Raw Mode)

- track status (bit 0,1,2:T1,2,3 decode, bit

3,4,5:T1,2,3 sampling)

- track 1 unencrypted length (1 byte, 0 for no track1 data)

- track 2 unencrypted length (1 byte, 0 for no track2 data)

- track 3 unencrypted length (1 byte, 0 for no track3 data)

Copyright © 2011, Unitech America Inc. All rights reserved.

MS246 User Manual

- if card encoding type is a high bit set:

  • mask and clear sent track status
  • encrypt and hash sent track status

In this mode tracks are encrypted separately rather than as a group

  • track 1 masked (Omitted if in Raw mode)
  • track 2 masked (Omitted if in Raw mode)
  • track 3 data (Omitted if in Raw mode)
  • track 1 encrypted (AES/TDES encrypted data)
  • track 2 encrypted (AES/TDES encrypted data)
  • sessionID encrypted (AES/TDES encrypted data)
  • track 1 hashed (20 bytes SHA1-Xor)
  • track 2 hashed (20 bytes SHA1-Xor)
  • track 3 hashed (optional) (20 bytes SHA1-Xor)
  • DUKPT serial number (10 bytes)

Non ISO/ABA Data Output Format:

  • card encoding type (1: AAMVA, 3: Others)
  • track status (bit 0,1,2:T1,2,3 decode, bit 3,4,5:T1,2,3 sampling)
  • track 1 length (1 byte, 0 for no track1 data)
  • track 2 length (1 byte, 0 for no track2 data)
  • track 3 length (1 byte, 0 for no track3 data)
  • track 1 data
  • track 2 data
  • track 3 data

Note track formatting (preamble, prefix, separator, etc.) is not supported in a reader set to send encrypted track data. The track data is always sent in the same format that is with no special formatting so that the program doing the decoding can know where the data field is located.

Notes:

Offset to the fields can be determined by adding the field lengths, using the track data for the track field lengths. Fields are packed in the next available location.

T1, T2 or T3 Data Length: Each byte value indicates how many bytes of decoded card data are in the track data field. This value will be zero if there is no data on the track or if there is an error decoding the track.

The encrypted section is padded with zeros to the block size of the encryption type, 8 bytes for TDES and 16 bytes for AES.

The hashed data may optionally be omitted, and also track 3 may be hashed and included.

Copyright © 2011, Unitech America Inc. All rights reserved.

Description:

Track 1 and Track 2 unencrypted Length

This one-byte value is the length of the original track data. It indicates the number of bytes in the track masked data field. It should be used to separate track 1's and track 2's data after decrypting the track encrypted data field.

Track 3 unencrypted Length

This one-byte value indicates the number of bytes in track 3's masked data field.

Track 1 and Track 2 masked

Track data masked with the MaskCharID (default is ‘*’). The first PrePANID (up to 6 for BIN, default is 4) and last PostPANID (up to 4, default is 4) characters can be in the clear (unencrypted). The expiration date is masked by default but can be optionally displayed.

Track 1 and Track 2 encrypted

This field is the encrypted track data, using either TDES-CBC or AES-CBC with initial vector of 0. If the original data is not a multiple of 8 bytes for TDES or a multiple of 16 bytes for AES, the reader right pads the data with 0.

The key management scheme is DUKPT and the key used for encrypting data is called the Data Key. The Data Key is generated by first taking the DUKPT Derived Key exclusive or'ed with 0000000000FF0000 0000000000FF0000 to get the resulting intermediate variant key. The left side of the intermediate variant key is then TDES encrypted with the entire 16-byte variant as the key. After the same steps are preformed for the right side of the key, combine the two key parts to create the Data Key.

How to get Encrypted Data Length

Track 1 and track 2 data are encrypted as a single block. In order to get the number of bytes for the encrypted data field, we need to get track 1 and track 2 to unencrypted length first. The field length is always a multiple of 8 bytes for TDES or a multiple of 16 bytes for AES. This value will be zero if there is no data on both tracks or if there is an error decoding both tracks. Once the encrypted data is decrypted, all padding of 0 needs to be removed. The number of bytes of decoded track 1 data is indicated by track 1's unencrypted length field. The remaining bytes are track 2's data, the length of which is indicated by track 2's unencrypted length filed.

Track 1, 2 and 3 hashed

The MS246 reader uses SHA-1 to generate hashed data for track 1, track 2 and track 3 unencrypted data. It is 20 bytes long for each track. This is provided with

two purposes in mind: One is for the host to ensure data integrity by comparing this field with an SHA-1 hash of the decrypted track data and prevent unexpected noise in data transmission. The other purpose is to enable the host to store a token of card data for future use without keeping the sensitive card holder data. This token may be used for comparison with the stored hash data to determine if it is from the same card.

Some Additional notes: (4/28/2011)

  1. “Decode status” bits in “track status” byte is set to 0 for no error (either decode success or no sampling data), or to 1 for error (has sampling data, but failed to decode).

  2. Please be aware that track status byte in secure output is different from track status byte in OPOS header (called read error1 and read error2). OPOS header will only be used in OPOS mode security level 1 and level 2, and secure output only used in level 3 or level 4.

  3. For USB HID Secure Output, the output format is the same as the secure output structure. No HID header is added, but the total length is the HID standard (537 bytes). Unused bytes will be filled with 0x00. This is applied to secure Level 3 and Level 4 output, whether or not the data is encrypted.

  4. Examples for field 8 (clear/mask data sent status) and field 9 (encrypted/hash data sent status):

These two bytes are omitted in original structure. In the enhanced encrypted structure, these two bytes are used to indicate the presence of each track's clear or masked data, encrypted data and hash data.

Example :

field 8 = 0x03 (00000011)

field 9 = 0xBF (10111111)

T1: mask data present; encrypted data present; hash present

T2: mask data present; encrypted data present; hash present

T3: no Mask data; encrypted data present; hash present

KSN: present

Session ID: not present

Additional Settings

Send LRC in secure mode (6F)

53 6F 01 31 // to send LRC in secure mode (Default)

53 6F 01 30 // remove LRC from secure mode

Display expiration data (50)

53 50 01 30 // do not display expiration date (Exp date masked)

(Default)

53 50 01 31 // display expiration data

Reader Serial Number (4E)

Copyright © 2011, Unitech America Inc. All rights reserved.

MS246 User Manual

The serial number will be set to the same as S/N as unit's label. The length is 8 to 10 characters. The user can read out the S/N with 52 4E command.

8.6 Decryption Example

Key for all examples is

0123456789ABCDEFFEDCBA9876543210

8.6.1. Security Level 3 Decryption - Original Encryption Format

Decryption of a three-track ABA card with the original encryption format.

The MS246 reader with default settings:

Original encryption format can be recognized because the high bit of the fourth byte underlined (00) is 0.

027D01003F48236B252A343236362A2A2A2A2A2A2A2A393939395E42555348204A522F47454F52474520572E4D525E2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A3F2A3B343236362A2A2A2A2A2A2A2A393939393D2A2A2A2A2A2A2A2A2A2A2A3F2A3B33333333333333333337363736373630373037303737363736373637363333333333333333376373637363037303730373763736373637363736376303730373F32863E9E3DA28E455B28F7736B77E47A64EDDA3BF03A06E44F31D1818C0BCD7A353FB1AD70EFD30FFC3DA08A4FBC9372E57E8B40848BAEAA3FE724B3550E2F4B223E6BF264BEAE9E39142B648CDB51FB8DAF8EA5B63913D29419B67582FCCCE9B372660F03668CC453216D9449C6B67EF33418AC88F65E1DB7ED4D10973F99DFC8463FF6DF113B6226C4898A9D355057ECAF11A5598F02CA3162994901190000000001399F03

STX, length (LSB, MSB), card type, track status, length track 1, length track 2, length track 3

02 7D01 00 3F 48 23 6B

The above broken down and interpreted:

02—STX character.

7D—low byte of total length.

01—high byte of total length.

00—card type byte (interpretation old format ABA card).

3F—3 tracks of data all good.

48—length of track 1.

23—length of track 2.

6B—length of track 3.

MS246 User Manual

Track 1 data masked (length 0x48):

252A343236362A2A2A2A2A2A2A2A393939395E42555348204A522F47454F5247452

0572E4D525E2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2

A2A2A2A2A2A2A3F2A

Track 2 data in hex masked (length 0x23):

3B343236362A2A2A2A2A2A2A2A393939393D2A2A2A2A2A2A2A2A2A2A2

A2A2A3F2A

Track 3 data unencrypted (length 0x6B):

Track 1 & 2 encrypted length 0x48+0x23 rounded up to 8 bytes =0x6B -> 0x70 (112

decimal):

863E9E3DA28E455B28F7736B77E47A64EDDA3BF03A06E44F31D1818C0BCD7A3

5

3FB1AD70EFD30FFC3DA08A4FBC9372E57E8B40848BAEAA3FE724B3550E2F4B2

2

3E6BF264BEAE9E39142B648CDB51FB8DAF8EA5B63913D29419B67582FCCCE9B

3

72660F03668CC453216D9449C6B67EF3

Track 1 hashed:

3418AC88F65E1DB7ED4D10973F99DFC8463FF6DF

Track 2 hashed:

113B6226C4898A9D355057ECAF11A5598F02CA31

KSN:

62994901190000000001

LRC, checksum and ETX:

39 9F 03

Masked Data:

Track 1 data masked in ASCII:

%*4266********9999^BUSH JR/GEORGE

W.MR^**********?

Track 2 data masked in ASCII:

Track 3 data unencrypted in ASCII:

KSN: 62 99 49 01 19 00 00 00 00 01

Decrypted data in ASCII:

%B4266841088889999^BUSH JR/GEORGE

W.MR^080910110000110000000004600000?!;4266841088889999=080910110000046?0

Decrypted data in hex:

2542343236363834313038383838393939395E42555348204A522F47454F52474520572

E4D525E303830393130313130303030313130303030303030303034363030303030303F

213B343236363834313038383838393939393D3038303931303131303030303034363F3

00000000000

8.6.2. Security Level 4 Decryption - Original Encryption Format

028501003F48236B252A343236362A2A2A2A2A2A2A2A2A393939395E42555348204A522F47454F52474520572E4D525E2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A3F2A3B343236362A2A2A2A2A2A2A393939393D2A2A2A2A2A2A2A2A2A2A3F2A3B333333333333333333736373637363037303730373736373637363736333333333333333333763736373630373037373637363736333333333333337637363037303730377F769B0441C52B2B1994C83D058F1DDA5DAA6753CF0F61BB7690C7E8A276D3D606513D1F8B79423C70594A0849CBB4C7B5A8DAC2B1A21B11F1C47EF4F12AC07D59A79E9369372D3F906A7F6C6D2B9076BCF05B334441FAEC8B4EFBB9DD20EBF97B29D910C415FCEA8DA8FEB9775343418AC88F65E1DB7ED4D10973F99DFC8463FF6DF113B6226C4898A9D355057ECAF11A5598F02CA31629949011900000000044B6F03

Masked data:

Track 1: %*4266********9999^BUSH JR/GEORGE

W.MR^************************?

Track 2: ;4266********9999=**********?

Track 3:

KSN: 62 99 49 01 19 00 00 00 00 04

Session ID: AA AA AA AA AA AA AA AA

Decrypted data in ASCII:

%B4266841088889999^BUSH JR/GEORGE

W.MR^080910110000110000000004600000?!;4266841088889999=080910110000046?0

Decrypted data in Hex:

2542343236363834313038383838393939395E42555348204A522F47454F52474520572

E4D525E303830393130313130303030313130303030303030303034363030303030303F

213B343236363834313038383838393939393D3038303931303131303030303034363F3

0AAAAAAAAAAAAAAAAA000000000

8.6.3. Security Level 3 Decryption - Enhanced Encryption Format

Example of decryption of a three-track ABA card with the enhanced encryption format. The MS246 reader with default settings except enhanced encryption structure format:

Enhanced encryption format (this can be recognized because the high bit of the fourth byte underlined (80) is 1.

029801803F48236B03BF252A343236362A2A2A2A2A2A2A2A393939395E42555348 204A522F47454F52474520572E4D525E2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A3F2A3B343236362A2A2A2A2A2A2A2A2A393939393D2A2A2A2A2A2A2A2A2A2A3F2ADA7F2A52BD3F6DD 8B96C50FC39C7E6AF22F06ED1F033BE0FB23D6BD33DC5A1F808512F7AE18D47 A60CC3F4559B1B093563BE7E07459072ABF8FAAB5338C6CC8815FF87797AE3A7 BEAB3B10A3FBC230FBFB941FAC9E82649981AE79F2632156E775A06AEDAFAF6 F0A184318C5209E55AD44A9CCF6A78AC240F791B63284E15B4019102BA6C50581 4B585816CA3C2D2F42A99B1B9773EF1B116E005B7CD8681860D174E6AD316A0E CDBC687115FC89360AEE7E430140A7B791589CCAADB6D6872B78433C3A25DA9 DDAE83F12FEFAB530CE405B701131D2FBAAD970248A456000933418AC88F65E1 DB7ED4D10973F99DFC8463FF6DF113B6226C4898A9D355057ECAF11A5598F02C A31688861C157C1CE2E0F72CE0F3BB598A614EAABB16299490119000000000206E 203

STX, length(LSB, MSB), card type, track status, length track 1, length track 2, length track 3

02 9801 80 3F 48-23-6B 03BF

MS246 User Manual

The above broken down and interpreted:

02—STX character.

98—low byte of total length.

01—high byte of total length.

80—card type byte (interpretation new format ABA card).

3F—3 tracks of data all good.

48—length of track 1.

23—length of track 2.

6B—length of track 3.

03—tracks 1 and 2 have masked/clear data.

BF—bit 7=1—KSN included.

Bit 6=0—no session ID included so not level 4 encryption.

Bit 5=1—track 3 hash data present.

Bit 4=1—track 2 hash data present.

Bit 3-1—track 1 hash data present.

Bit 2=1—track 3 encrypted data present.

Bit 1=1—track 2 encrypted data present.

Bit 0=1—track 1 encrypted data present.

Track 1 data masked (length 0x48):

252A343236362A2A2A2A2A2A2A2A393939395E42555348204A522F47454F5247452

0572E4D525E2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2

A2A2A2A2A2A2A3F2A

Track 1 masked data in ASCII:

%*4266********9999^BUSH JR/GEORGE

W.MR^**********?

Track 2 data in hex masked (length 0x23):

3B343236362A2A2A2A2A2A2A2A393939393D2A2A2A2A2A2A2A2A2A2A2

A2A2A3F2A

Track 2 masked data in ASCII:

;4266********9999=**********?

In this example, there is no track 3 data either clear or masked (encrypted and hashed data is below).

Track 1 encrypted length 0x48 rounded up to 8 bytes = 0x48 (72 decimal):

DA7F2A52BD3F6DD8B96C50FC39C7E6AF22F06ED1F033BE0FB23D6BD33DC5A1F8

08512F7AE18D47A60CC3F4559B1B093563BE7E07459072ABF8FAAB5338C6CC88

15FF87797AE3A7BE

Track 2 encrypted length 0x32 rounded up to 8 bytes =0x38 (56 decimal):

MS246 User Manual

AB3B10A3FBC230FBFB941FAC9E82649981AE79F2632156E775A06AEDAFAF6F0A

184318C5209E55AD

Track 3 encrypted length 0x6B rounded up to 8 bytes =0x70 (64 decimal):

44A9CCF6A78AC240F791B63284E15B4019102BA6C505814B585816CA3C2D2F42

A99B1B9773EF1B116E005B7CD8681860D174E6AD316A0ECDBC687115FC89360A

EE7E430140A7B791589CCAADB6D6872B78433C3A25DA9DDAE83F12FEFAB530CE

405B701131D2FBAAD970248A45600093

Track 1 data hashed length 20 bytes:

3418AC88F65E1DB7ED4D10973F99DFC8463FF6DF

Track 2 data hashed length 20 bytes:

113B6226C4898A9D355057ECAF11A5598F02CA31

Track 3 data hashed length 20 bytes:

688861C157C1CE2E0F72CE0F3BB598A614EAABB1

KSN length 10 bytes:

6299490119000000002

LCR, check sum and ETX

06E203

Clear/masked data in ASCII:

Track 1: %*4266********9999^BUSH JR/GEORGE

W.MR^**********?

Track 2: ;4266********9999=**********?

Key Value: 1A 99 4C 3E 09 D9 AC EF 3E A9 BD 43 81 EF A3 34

KSN: 62 99 49 01 19 00 00 00 00 02

Decrypted Data:

Track 1 decrypted:

%B4266841088889999^BUSH JR/GEORGE

W.MR^08091011000011000000004600000?!

Track 2 decrypted:

;4266841088889999=080910110000046?0

Track 3 decrypted:

Track 1 decrypted data in hex including padding zeros (but there are no pad bytes here):

MS246 User Manual

2542343236363834313038383838393939395E42555348204A522F47454F52474520572E4D525E303830393130313130303030313130303030303030303034363030303030303F21

Track 2 decrypted data in hex including padding zeros:

3B343236363834313038383838393939393D3038303931303131303030303034363F3000000000

Track 3 decrypted data in hex including padding zeros:

4ED559EC09CABF19F36B422CA2016B48A7241B2DA9584ED4415B4F30637734CF

5031AF475DAF27C188A1A771264011BAA090E91893BC2A52EDD56F8E6E9554BC

0C5207C04E3C21B6DA2A48F2257DC6946DBFBC87F3189E5C8B954BF7303D01E4

43155911E4137AEAD52441567AA1D50924A7597EC9D758AB4F3A8E82BF81A2E3

418AC88F65E1DB7ED4D10973F99DFC8463FF6DF113B6226C4898A9D355057ECA

F11A5598F02CA31688861C157C1CE2E0F72CE0F3BB598A614EAABB16299490119

0000000003D67C03

Clear/masked data:

Track 1: %*4266********9999^BUSH JR/GEORGE

W.MR^**********?

Track 2: ;4266********9999=**********?

Key Value: 89 52 50 33 61 75 51 5C 41 20 CF 45 F4 1A BF 1C

KSN: 62 99 49 01 19 00 00 00 00 03

Session ID: AA AA AA AA AA AA AA AA

Decrypted data in ASCII:

%B4266841088889999^BUSH JR/GEORGE

W.MR^08091011000011000000004600000?!

;4266841088889999=080910110000046?0

MS246 User Manual

Decrypted data in hex:

2542343236363834313038383838393939395E42555348204A522F47454F52474520572

E4D525E303830393130313130303030313130303030303030303034363030303030303F21

3B343236363834313038383838393939393D3038303931303131303030303034363F3000000000

8.7 Level 4 Activate Authentication Sequence

The security level changes from 3 to 4 when the device enters authentication mode successfully. Once the security level is changed to level 3 or 4, it cannot go back to a lower level.

Activate Authentication Mode Command

When the reader is in security level 4, it will only transmit the card data when it is in Authenticated Mode.

Authentication Mode Request

When sending the authentication request, the user also needs to specify a time limit for the reader to wait for the activation challenge reply command. The minimum timeout duration required is 120 seconds. If the specified time is less than the minimum, 120 seconds would be used for timeout duration. The maximum time allowed is 3600 seconds (one hour). If the reader times out while waiting for the activation challenge reply, the authentication failed.

Device Response

When authentication mode is requested, the device responds with two challenges: Challenge 1 and challenge 2. The challenges are encrypted using the current DUKPT key exclusive- or'ed with .

The decrypted challenge 1 contains 6 bytes of random numbers followed by the last two bytes of KSN. The two bytes of KSN may be compared with the last two bytes of the clear text KSN sent in the message to authenticate the reader. The user should complete the Activate Authentication sequence using the Activation Challenge Reply command.

Command Structure

Host -> Device:

MS246 User Manual

<STX><R><80h><02h><Pre-Authentication Time Limit><ETX><LRC> 

Device -> Host:

<ACK><STX><Device Response Data><ETX><LRC> (success) 
<NAK>(fail) 

Pre-Authentication Time Limit: 2 bytes of time in seconds.

Device Response Data: 26 bytes of data, consists of .

Current Key Serial Number: 10 bytes of data with the Initial Key Serial Number in the leftmost 59 bits and Encryption Counter in the rightmost 21 bits.

Challenge 1: 8 bytes challenge used to activate authentication. Encrypted using the key derived from the current DUKPT key.

Challenge 2: 8 bytes challenge used to deactivate authentication. Encrypted using the key derived from the current DUKPT key.

Activation Challenge Reply Command

This command serves as the second part of an Activate Authentication sequence. The host sends the first 6 bytes of Challenge 1 from the response of Activate

Authenticated Mode command, two bytes of Authenticated mode timeout duration, and eight bytes Session ID encrypted with the result of the current DUKPT Key exclusive- or'ed with <3C3C 3C3C 3C3C 3C3C 3C3C 3C3C 3C3C 3C3C>

The Authenticated mode timeout duration specifies the maximum time in seconds that the reader will remain in Authenticated Mode. A value of zero forces the reader to stay in Authenticated Mode until a card swipe or power down occurs. The minimum timeout duration required is 120 seconds. If the specified time is less than the minimum, 120 seconds will be used for timeout duration. The maximum time allowed is 3600 seconds (one hour).

If Session ID information is included and the command is successful, the Session ID will be changed.

The Activate Authenticated Mode succeeds if the device decrypts Challenge Reply response correctly. If the device cannot decrypt the Challenge Reply command, Activate Authenticated Mode fails and DUKPT KSN advances.

Command Structure

Host -> Device:

<STX><S><82h><08h><Activation Data><ETX><LRC> 

Device -> Host:

<ACK>(success) 

MS246 User Manual

<NAK>(fail) 

Activation Data: 8 or 16 bytes, structured as . Challenge 1 Response: 6 bytes of Challenge 1 random data with 2 bytes of

Authenticated Mode timeout duration. It's encrypted using the key derived from the current DUKPT key.

Session ID: Optional 8 bytes Session ID, encrypted using the key derived from the current DUKPT key.

Deactivate Authenticated Mode Command

This command is used to exit Authenticated Mode. The host needs to send the first 7 bytes of Challenge 2 (from the response of Activate Authenticated Mode command) and the Increment Flag (0x00 indicates no increment, 0x01 indicates increment of the KSN) encrypted with the current DUKPT Key exclusive- or'ed with <3C3C 3C3C 3C3C 3C3C 3C3C 3C3C 3C3C 3C3C 3C3C 3C3C 3C3C>

If the device decrypts Challenge 2 successfully, the device will exit Authenticated Mode. The KSN will increase if the Increment flag is set to 0x01. If the device cannot decrypt Challenge 2 successfully, it will stay in Authenticated Mode until a timeout occurs or when the customer swipes a card.

The KSN is incremented every time the Authenticated Mode is exited by timeout or card swipe action. When the Authenticated Mode is exited by the Deactivate Authenticated Mode command, the KSN will increment when the increment flag is set to 0x01.

Command Structure

Host -> Device:

<STX><S><83h><08h><Deactivation Data><ETX><LRC> 

Device -> Host:

(success)

(fail)

: 8 bytes response to Challenge 2. It contains 7 bytes of Challenge 2 with 1 byte of Increment Flag, encrypted by the specified variant of current DUKPT Key.

Get Reader Status Command

Command Structure

Host -> Device:

<STX><R><83h><ETX><LRC> 

Device -> Host:

MS246 User Manual

<83h><02h>(success)

(fail)

Current Reader Status: 2 bytes of data with one byte of and one byte of

Reader State – indicates the current state of the reader as follows:

0x00: The reader is waiting for Activate Authentication Mode Command. The command must be sent before the card can be read.

0x01: The authentication request has been sent, the reader is waiting for the Activation Challenge Reply Command.

0x02: The reader is waiting for a card swipe.

Pre-condition - specifies how the reader goes to its current state as follows:

0x00: The reader has no card swipes and has not been authenticated since it was powered up.

0x01: Authentication Mode was activated successfully. The reader processed a valid Activation Challenge Reply command.

0x02: The reader receives a good card swipe.

0x03: The reader receives a bad card swipe or the card is invalid.

0x04: Authentication Activation Failed.

0x05: Authentication Deactivation Failed.

0x06: Authentication Activation Timed Out. The Host fails to send an Activation Challenge Reply command within the time specified in the Activate Authentication Mode command.

0x07: Swipe Timed Out. The user fails to swipe a card within the time specified in the Activation Challenge Reply command.

Appendix A Setting Parameters and Values

The following is a table of default settings and available settings (value within parentheses) for each function ID.

Function IDHexDescriptionDefault SettingDescription
HTypeID*10Terminal Type'0' ('0'~'2', '4'~'6')PC/AT, Scan Code Set 2, 1, 3, PC/AT with external keyboard and PC/AT without external keyboardu
BeepID11Beep Setting'2' ('0'~'4')Beep volume high and frequency high
ChaDelayID *12Character Delay'0' ('0'~'5')2 ms inter-character delayk
Track SelectID13Track Selection'0' ('0'~'9')Any Track 0-any; 1-7—bit 1 tk1, bit 2 tk2; bit 3 tk3. '8'—tk1-2; '9' tk2-3
Polling IntervalID14Polling Interval1 (1 ~ 255)USB HID Polling Intervalu
DataFmtID15Data Output Format'0' ('0'~'2')Unitech Format-
FmtOptionID16UIC, Mag-TekH'59'Refer to MiniMag RS232 User's Manual-
TrackSepID17Track SeparatorCR/Enter 0 for Port Powered IVCR for RS232, Enter for KB any character supported except 00 which means none.
Send OptionID19Send Option'1' ('0'~'F') '5' for Port Powered IVSentinel and account number control
MSRReading ID1AMSR Reading'1' ('0'~'2')Enable MSR reading '0' MSR disable; '2' buffer mode
DTEnable SendID*1BDT Enable Send'0'('0', '1', '3')Data Editing Control-
Decoding MethodID1DDecoding Direction'1' ('0'~'3')Decoding in both direction; '0' raw data, '2' forward, '3' reverse
ReviewID1FReview All SettingsNone
Terminator ID21TerminatorCR/EnterCR for RS232, enter for KB

MS246 User Manual

FmVerID22Firmware Version
USBHIDFmt ID23USB HID Fmt‘0’(‘0’,‘1’,‘8’)‘0’: Unitech HID Format‘1’: Other HID Format‘8’: Unitech KB Formatur
ForeignKB ID24Foreign KB‘0’ (‘0’ ~ ‘9’)Foreign Keyboardk
SecureKeyID *25Obsolescent encryption‘@’ (0x20-0x7F)No simple encryption-
ArmtoRead ID*30-
ReaderReset ID*32None-
Track1Prefix ID34Track 1 Prefix0No prefix for track 1, 6 char max
Track2Prefix ID35Track 2 Prefix0No prefix for track 2, 6 char max
Track3Prefix ID36Track 3 Prefix0No prefix for track 3, 6 char max
Track1Suffix ID37Track 1 Suffix0No suffix for track 1, 6 char max
Track2Suffix ID38Track 2 Suffix0No suffix for track 2, 6 char max
Track3Suffix ID39Track 3 Suffix0No suffix for track 3, 6 char max
LZ11D*3C0xD-
LZ2ID*3D0xD-
LZ3ID*3E0xD-
LZ4ID*3F0xD-
EpVerID*40None
BaudID41Baud Rate‘5’ (‘2’~’9’)9600 bps, ‘2’ is 1200, ‘7’ is 38,400 bps; ‘9’ is 115.2 kbpss
DataID42Data Bit‘0’ (‘0’~’1’)8 bits required in secure modes
ParityID43Data Parity‘0’ (‘0’~’4’)Nones
HandID44Hand Shake‘0’ (‘0’~’1’)Software (Xon/Xoff) hand shakes
StopID45Stop Bit‘0’ (‘0’~’1’)1 bits
XOnID47XOn CharacterDC10x11 as XOns
XOffID48XOff CharacterDC30x13 as XOffs

MS246 User Manual

PrePANID49PAN to not mask4 (0-6)# of leading PAN digits to display
PostPANID4APAN to not mask4 (0-4)# of trailing PAN digits to display
MaskCharID4BMask the PAN with this character‘*’ 20-7EAny printable character
CrypTypeID4CEncryption type‘1’ (‘1’-‘2’)‘1’ 3DES ‘2’ AESr
OutputMode ID4DStd, OPOS or JPOS‘0’ (‘0’ ~ ‘1’)Standard mode
Serial NumberID4EDevice serial #any 8 bytes8 hex digit serial numberr
DispExpDate ID,50Mask or display expiration date‘0”0'-‘1’‘1’ don’t mask expiration date
CapsCaseID*51None
DataSeqID*52None
StartCharID*53None
SessionID548 byte hex not stored in EEPROMNoneAlways init to all ‘FF’
Mod10ID55Include mod10 check digit‘0’ ‘0’-‘2’Don’t include mod10, ‘1’ display mod10, ‘2’ display wrong mod10
DesKeyID56DES Key Value0Internal use onlyrn
AesKeyID57AES Key Value0Internal use onlyrn
KeyManage TypeID58DUKPT‘1’(‘0’-‘1’)‘0’ fixed key
T1GENERIC FMTID*59None
T2GENERIC FMTID*5ANone
T3GENERIC FMTID*5BNone
HashOptID,5C‘3’ (‘0’-‘7’)Send tk1-2 hash bit 0:1 send tk1 hash; bit 1:1 send tk2 hash; bit2:1 send tk3 hash.
HexCaseID,5D‘0’ (‘0’-‘1’)k
LRCID60LRC character‘0’ (‘0’~‘1’)Without LRC in output

MS246 User Manual

T17BStartID61Track 1, 7 Bit Start Char‘%’‘%’ as track 1, 7 Bit Start Sentinel
T16BStartID62T1, 6B Start‘%’‘%’ as track 1, 6 Bit Start Sentinel
T15BStartID63T1, 5B Start‘;’‘;’ as track 1, 5 Bit Start Sentinel
T27BStartID64Track 2, 7 Bit Start Char‘%’‘;’ for Port Powered IV‘%’ as track 2, 7 Bit Start Sentinel
T25BStartID65T2, 5BStart‘;’‘;’ as track 2, 5 Bit Start Sentinel
T37BStartID66Track 3, 7 Bit Start Char‘%’‘+’ for Port Powered IV‘%’ as track 3, 7 Bit Start Sentinel
T36BStartID67T3, 6BStart‘!’‘+’ for Port Powered IV‘!’ as track 3, 6 Bit Start Sentinel
T35BStartID68T3, 5BStart‘;’‘+’ for Port Powered IV‘;’ as track 3, 5 Bit Start Sentinel
T1EndID69Track 1 End Sentinel‘?’‘?’ as End Sentinel
T2EndID6ATrack 2 End Sentinel‘?’‘?’ as End Sentinel
T3EndID6BTrack 3 End Sentinel‘?’‘?’ as End Sentinel
T1ERRSTA RTID6CTrack 1 error code‘%’Start sentinel if track 1 error report
T2ERRSTA RTID6DTrack 2 error code‘;’Start sentinel if track 2 error report
T3ERRSTA RTID6ETrack 3 error code‘+’Start sentinel if track 3 error report
T4ERRSTA RTID*6FNone-
BootloaderID *70Boot Loader ModeNone-
T344EndID*71None
T28BStartID72JIS T12 SS/ES0
T38BStartID73JIS T3 SS/ES0
EquipFwID77Feature option setting0-7Reader firmware configurationn r
BeepOffCom ID*7ATurn off Beep‘0’

MS246 User Manual

SyncCheck ID7BCheck for track sync bits‘0’ (‘0’-2’)Check leading & trailing sync bits on track data (if poorly encoded card)
ErrorZoneID *7CNone
Security LevelID7E‘0’ key exhausted; ‘1’ non-encrypted; ‘1’ key loaded non encrypted ‘3’ encrypted; ‘4’n r
Encrypt OptID84Encryption options8 encrypt trk 3 if card type 0; (0-F)Bit 0 encrypt trk1; bit 1 encrypt trk2; bit 3 encrypt trk3; bit 4 encrypt trk3 if card type 0
EncryptStrID85Encrypt structure‘0’‘0’ original; ‘1’ enhanced
MaskOptID86Clear / mask data options7Bit 0 send clear/mask trk1 Bit 1 send clear/mask trk2 Bit 2 send clear/mask trk3
WinCETestID*AANone
PrefixIDD2Preamble0No Preamble, 15 char max
PostfixIDD3Postamble0No Postamble, 15 char max
AddedFieldID*FADE Added Field0No added field-
SearchCmdID*FBDE Search Cmd0No search command-
SendCmdID*FCDE Send Cmd0No send command-

*Unused entries in this table were left for completeness even though unused in the MS246 reader to avoid conflicting definitions between products.
Note not all function ID are present in different hardware versions of the MS246. The last column above has some codes:
‘-’ feature not currently supported; exists for compatibility.
's' feature not available in the USB version.
‘u’ feature available only in the USB version.
'k' feature not available in the USB version.
‘r’ reset all does not affect this value.
'n' not directly settable.
Most function ID settings that relate to the content of formatting of the track output do not work in secure mode. Exceptions to this are Preamble and Postamble in keyboard mode only.
It is currently not possible to mix security with OPOS and JPOS support.

MS246 User Manual

Appendix B Key Code Table in USB Keyboard Interface

For most characters, "Shift On" and "Without Shift" will be reversed if Caps Lock is on. Firmware needs to check current Caps Lock status before sending out data.

For Function code B1 to BA, if "Num Lock" is not set, then set it and clear it after finishing sending out the code.

For Function code BB to C2, C9 to CC, if "Num Lock" is set, then clear it and set it after finishing sending out the code.

KeystrokeHex ValueFunctional CodeUSB KB Code
Ctrl+2001F Ctrl On
Ctrl+A0104 Ctrl On
Ctrl+B0205 Ctrl On
Ctrl+C0306 Ctrl On
Ctrl+D0407 Ctrl On
Ctrl+E0508 Ctrl On
Ctrl+F0609 Ctrl On
Ctrl+G070A Ctrl On
BS08\bs2A
Tab09\tab2B
Ctrl+J0A0D Ctrl On
Ctrl+K0B0E Ctrl On
Ctrl+L0C0F Ctrl On
Enter0D\enter28
Ctrl+N0E11 Ctrl On
Ctrl+O0F12 Ctrl On
Ctrl+P1013 Ctrl On
Ctrl+Q1114 Ctrl On
Ctrl+R1215 Ctrl On
Ctrl+S1316 Ctrl On
Ctrl+T1417 Ctrl On
Ctrl+U1518 Ctrl On
Ctrl+V1619 Ctrl On
Ctrl+W171A Ctrl On
Ctrl+X181B Ctrl On
Ctrl+Y191C Ctrl On
Ctrl+Z1A1D Ctrl On
ESC1B\esc29

MS246 User Manual

Ctrl+\1C31 Ctrl On
Ctrl+]1D30 Ctrl On
Ctrl+61E23 Ctrl On
Ctrl+-1F2D Ctrl On
SPACE202C
!211E Shift On
"2234 Shift On
#2320 Shift On
$2421 Shift On
%2522 Shift On
&2624 Shift On
'2734
(2826 Shift On
)2927 Shift On
*2A25 Shift On
+2B2E Shift On
,2C36
-2D2D
.2E37
/2F38
03027 Shift On
1311E Shift On
2321F Shift On
33320 Shift On
43421 Shift On
53522 Shift On
63623 Shift On
73724 Shift On
83825 Shift On
93926 Shift On
:3A33 Shift On
;3B33
<3C36 Shift On
=3D2E
>3E37 Shift On
?3F38 Shift On
@401F
A4104 Shift On
B4205 Shift On
C4306 Shift On
D4407 Shift On
E4508 Shift On

MS246 User Manual

F4609 Shift On
G470A Shift On
H480B Shift On
I490C Shift On
J4A0D Shift On
K4B0E Shift On
L4C0F Shift On
M4D10 Shift On
N4E11 Shift On
O4F12 Shift On
P5013 Shift On
Q5114 Shift On
R5215 Shift On
S5316 Shift On
T5417 Shift On
U5518 Shift On
V5619 Shift On
W571A Shift On
X581B Shift On
Y591C Shift On
Z5A1D Shift On
[5B2F
\5C31
]5D30
^5E23 Shift On
5F2D Shift On
`6035
a6104
b6205
c6306
d6407
e6508
f6609
g670A
h680B
i690C
j6A0D
k6B0E
l6C0F
m6D10
n6E11
o6F12

MS246 User Manual

p7013
q7114
r7215
s7316
t7417
u7518
v7619
w771A
x781B
y791C
z7A1D
{7B2F Shift On
|7C31 Shift On
}7D30 Shift On
~7E35 Shift On
DEL7F2A
F181\f13A
F282\f23B
F383\f33C
F484\f43D
F585\f53E
F686\f63F
F787\f740
F888\f841
F989\f942
F108A\fa43
F118B\fb44
F128C\fc45
Home8D\home4A
End8E\end4D
8F\right4F
90\left50
91\up52
92\down51
PgUp93\pgup4B
PgDn94\pgdn4E
Tab95\tab2B
bTab96\btab2B Shift On
Esc97\esc29
Enter98\enter28

MS246 User Manual

Num_Enter99\num_enter58
Delete9A\del4C
Insert9B\ins49
Backspace9C\bs2A
SPACE9D\sp2C
Pause9C\ps48
Ctrl+[9F\ctr12F Ctrl On
Ctrl+]A0\ctr230 Ctrl On
Ctrl+\A1\ctr331 Ctrl On
Left_Ctrl_BreakA2\l_ctrl_bkClear Ctrl Flag
Left_Ctrl_MakeA3\l_ctrl_mkSet Ctrl Flag for following char(s)
Left_Shift_BreakA4\l_shift_bkClear Shift Flag
Left_Shift_MakeA5\l_shift_mkSet Shift Flag for following char(s)
Left_WindowsA6\l_windowsE3 (left GUI)
Left_Alt_BreakA7\l_alt_bkClear Alt Flag
Left_Alt_MakeA8\l_alt_mkSet Alt Flag for following char(s)
Right_Ctrl_BreakA9\r_ctrl_bkClear Ctrl Flag
Right_Ctrl_MakeAA\r_ctrl_mkSet Ctrl Flag for following char(s)
Right_Shift_BreakAB\r_shift_bkClear Shift Flag
Right_Shift_MakeAC\r_shift_mkSet Shift Flag for following char(s)
Right_WindowsAD\r_windowsE7 (right GUI)
Right_Alt_BreakAE\r_alt_bkClear Alt Flag
Right_Alt_MakeAF\r_alt_mkSet Alt Flag for following char(s)
Num_LockB0\num_lock53
Num_0B1\num062 Num Lock On
Num_1B2\num159 Num Lock On
Num_2B3\num25A Num Lock On
Num_3B4\num35B Num Lock On
Num_4B5\num45C Num Lock On
Num_5B6\num55D Num Lock On
Num_6B7\num65E Num Lock On
Num_7B8\num75F Num Lock On
Num_8B9\num860 Num Lock On
Num_9BA\num961 Num Lock On
Num_HomeBB\num_home5F
Num_PageUpBC\num_pgup61
Num_PageDownBD\num_pgdn5B
Num_EndBE\num_end59

MS246 User Manual

Num↑BF\num_up60
Num→C0\num_right5E
Num↓C1\num_down5A
Num←C2\num_left5C
Print_ScrnC3\rpt_sc46
System_RequestC4\sysrq9A
Scroll_LockC5\scroll47
PauseC6\menu76
BreakC7\break
Caps_LockC8\caps_lock39
Num_/C9\num_/54
Num_*CA\num_*55
Num_-CB\num_-56
Num_+CC\num_+57
Num_.CD\num_.63 Num Lock On
Num_DELCE\num_del63
Num_INSCF\num_ins62
Delay_100msD0\delayDelay 100 ms

Table of Ctrl or Alt output for non printable characters

ASCII Code Control Code Alt Code SendOptionID Bit 3:0 Bit 3:1

00: Ctrl-2 Alt-000
01: Ctrl-A Alt-001
02: Ctrl-B Alt-002
03: Ctrl-C Alt-003
04: Ctrl-D Alt-004
05: Ctrl-E Alt-005
06: Ctrl-F Alt-006
07: Ctrl-G Alt-007

08: BS Alt-008

09: Tab Alt-009

0A: Ctrl-J Alt-010

0B: Ctrl-K Alt-011

0C: Ctrl-L Alt-012

0D: Enter Alt-013

0E: Ctrl-N Alt-014

0F: Ctrl-O Alt-015

10: Ctrl-P Alt-016

11: Ctrl-Q Alt-017

12: Ctrl-R Alt-018

MS246 User Manual

13: Ctrl-S Alt-019

14: Ctrl-T Alt-020

15: Ctrl-U Alt-021

16: Ctrl-V Alt-022

17: Ctrl-W Alt-023

18: Ctrl-X Alt-024

19: Ctrl-Y Alt-025

1A: Ctrl-Z Alt-026

1B: ESC Alt-027

1C: Ctrl-\ Alt-028

1D: Ctrl-] Alt-029

1E: Ctrl-6 Alt-030

1F: Ctrl-- Alt-031

Table of contents Click a title to access it
Manual assistant
Powered by Anthropic
Waiting for your message
Product information

Brand : Unitech

Model : MS246

Category : Uncategorized