Vous êtes sur la page 1sur 48

MSR210U Programmers Manual

Magnetic Stripe Card Reader - HID Keyboard Emulation -

Document #: PM044-U Revision C Sep. 20, 2005

MSR210U Programmers Manual

UDN PM044-U Rev. C

NOTICE
The issuer of this manual has made every effort to provide accurate information. The issuer will not be held liable for any technical and editorial omission or errors made herein; nor for incidental consequential damages resulting from the furnishing, performance or use of this material. This document contains proprietary information that is protected by copyright. All rights are reserved. No part of this document may be photocopied, reproduced, or translated without the prior written consent of the issuer. The information provided in this manual is subject to change without notice.

AGENCY APPROVED
- Specification for FCC Class A - BSMI (Bureau of Standards, Metrology and Inspection, Taiwan) NOTE: This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to Part 15 of the 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 own expense. You are cautioned that any change or modifications to the equipment not expressly approve by the party responsible for compliance could void your authority to operate such equipment. BSMI Class A

MSR210U Programmers Manual

UDN PM044-U Rev. C

WARRANTY
This product is served under one-year warranty to the original purchaser. Within the warranty period, merchandise found to be defective would be repaired or replaced. This warranty applies to the products only under the normal use of the original purchaser, and in no circumstances covers incidental or consequential damages through consumers misuse or modification of the products.

PREFACE
This manual provides detailed information relating to the overall operational, electrical, mechanical, environmental and functional aspects of the MSR210U. This document should be read and understood prior to initial operation of the product. For ease of installation and programming use, we have addressed everything from its attractive features to its various configurations. When designing the MSR210U, we selected what we feel are the most useful features and functions. If in some cases you find that your specific needs differ from our existing products, we welcome your comments and suggestions. Custom-designed models are also available. If further questions do arise, please call for technical support, our FAE will assist you in any way we can.

II

MSR210U Programmers Manual

UDN PM044-U Rev. C

Table of Contents Section 1 General Description ................................................1-1


Features............................................................................................................ 1-1 Application ....................................................................................................... 1-1 Function ........................................................................................................... 1-1 Part Number Description ................................................................................ 1-2

Section 2 Configurations ........................................................2-1


Dimensions of MSR210U ................................................................................ 2-1 Installation........................................................................................................ 2-2

Section 3 Technical Specifications ........................................3-1


Magnetic Card Specifications......................................................................... 3-1 Mechanical Specifications .............................................................................. 3-2 Electrical Specifications ................................................................................. 3-2 Environmental Specifications ........................................................................ 3-3 USB Communication Specifications.............................................................. 3-4 Data Output Format ......................................................................................... 3-4

Section 4 Operation of Normal Mode .....................................4-1


LED Indication ................................................................................................. 4-1 Card Reading ................................................................................................... 4-1

Section 5 Operation of Configuration Mode..........................5-1


Operation Procedure....................................................................................... 5-1 Setting Items .................................................................................................... 5-1

Section 6 Operation of Download Mode ................................6-1 Section 7 Configuration Mode Specification.........................7-1


Enter Configuration Mode .............................................................................. 7-1 Configuration Settings.................................................................................... 7-1 PS/2 Scan Code Table ..................................................................................... 7-1

Section 8 Download Mode Specification ...............................8-1


Enter Boot Mode.............................................................................................. 8-1 Command Sets................................................................................................. 8-1

Section 9 Usage of API ............................................................9-1


API Command Sets.......................................................................................... 9-1

III

MSR210U Programmers Manual

UDN PM044-U Rev. C

Section 1 General Description


This section presents general information about the basic characters of the MSR210U.

Features
The MSR210U provides the following features: 1 Friendly setting. 2 No external power supply required. 3 No third party device driver is required. 4 Single, dual, or triple track versions allow to reading ISO, AAMVA and DMV cards. 5 LED and Buzzer indicators indicate the status of reader. 6 Programmable data output. 7 Firmware upgradeable

Application
This Magnetic Stripe Reader, MSR210U is designed to read high or low coercive magnetic cards. It can simultaneously decode/verify up to 3 tracks of data. This product communicates with a host computer using USB keyboard interface. The reader can read magnetic data form, any available track encoded per ISO 7810, 7811, AAMVA, DMV. The host can request the read data from the reader with setting sequences. For details of sequences, refer to Section 4.

Function
Self Test
Whenever the reader experiences a reset cycle, a self-test on the resources is performed.

Indication LED Green Red Amber Amber Green 2 Beep Buzzer 1 Beep SW1_1 OFF OFF OFF OFF ON SW1_2 OFF OFF OFF ON OFF Test Success

Cause

EEPROM Failed Internal ROM Failed In Download Mode Default Configuration Working

1-1

MSR210U Programmers Manual

UDN PM044-U Rev. C

Default Interface Configuration Working


1. 2. 3. 4. Detach the device from USB port. Switch S1_1 on and attach the device into a USB port. The device will beep twice and the green LED will turn on. The device will work under default setting condition as below: a. transmitting speed is 80 char/sec, and b. keyboard country is U.S. As soon as turn off the switch S1_1 and re-attach the USB connector, the device will work as users previous settings.

Solution for Firmware Corrupting


1. 2. 3. 4. 5. 6. Detach the device from USB port. Switch S1_2 on and attach the device into a USB port. The LED will turn amber indicating that the device is into firmware download mode. Execute MSR210U Download Application Program to download proper file into the device. When the download process has accomplished, turn off the switch S1_2 and re-attach the USB connector. The LED will turn green if download process is success.

Transmitting Data Block of Tracks


Each track could be divided into 1~3 blocks for transmission and each block can be set as different card types and character numbers. If the set data is different from the data after swiping, the reader will transmit completed data without limitation. The sequences for setting blocks are shown in Section 4.

Part Number Description


The brief configuration of MSR210U part number are shown as below: MSR210U-12 Dual track 1&2 MSR210U-23 Dual track 2&3 MSR210U-33 Triple track 1&2&3 Note: Optional configuration is available.

1-2

MSR210U Programmers Manual

UDN PM044-U Rev. C

Section 2 Configurations
This section shows the dimensions and setup for the MSR210U.

Dimensions of MSR210U

Figure 2-1 Dimensions of MSR210U

2-1

MSR210U Programmers Manual

UDN PM044-U Rev. C

Installation
1. 2. 3. 4. Attach the device into a USB port on the host. Insert the CD of operation system that your PC is using for installing the driver of HID keyboard device. Follow the instruction in the dialog box to install the driver correctly. If everything has accomplished, the LED will turn green indicating that the device is ready for use. Note: The process of installing driver will be unnecessary only if the device is attached into other USB port.

Figure 2-2 Installing MSR210U

2-2

MSR210U Programmers Manual

UDN PM044-U Rev. C

Section 3 Technical Specifications


Magnetic Card Specifications
Card Type
ISO standard card (ISO 7810 and 7811) CA old DMV AAMVA Read high or low coercivity magnetic stripes (300-4000oe)

Thickness
0.76mm 0.08mm

Card Format
Track 1 & 3: 210 bpi Track 2: 75/210 bpi

Card Operation Speed


Test Card ISO standard card * Jitter ** Low Amplitude Speed (IPS) 5-55 5-50 5-50

Note: *Jitter card: Reliable reading of magnetic stripes encoded with bit cell length variations within 15% of normal as defined by ISO 7811. **Low amplitude: Reliable reading of magnetic stripes encoded at 60% or more of the encoding amplitude as defined by ISO 7811.

3-1

MSR210U Programmers Manual

UDN PM044-U Rev. C

Mechanical Specifications
Body Material
ABS 94V-0

Cover and Cable Color


IBM 43-4208 pearl white

Dimension
Length: 100mm Width: 34mm Height: 28mm

Weight
120g

Interface Cable Length


2 meters

Magnetic Head Life


500K Min., 1M optional

Electrical Specifications
Power Required
DC 5V 5% (from PC)

Power Consumption
35mA Max. in normal operation

Communication
Compatible with USB specification Revision 1.1

Ripple
50mVp-p Max.

3-2

MSR210U Programmers Manual

UDN PM044-U Rev. C

Dielectric Strength
250VDC for 1 minute

Insulation Resistance
10M min. at 250VDC

Environmental Specifications
Temperature
Operating: -10-55C Storage: -30-70C

Humidity
Operating: 15-90% (non condensing) Storage: 10-90% (non condensing)

3-3

MSR210U Programmers Manual

UDN PM044-U Rev. C

USB Communication Specifications


Identification Information
Vendor ID: 04B4h Product ID: 210Ah

Class
HID Keyboard Device, compatible with HID specification Version 1.1

USB Connector Termination Assignment


Contact Number 1 2 3 4 Shell Typical Wiring Assignment Red White Green Black Drain Wire

Signal Name VBUS DD+ GND Shield

Data Output Format


Preamble TK1 Prefix TK2 Prefix TK3 Prefix Card Data TK1 Data TK2 Data TK3 Data TK1 Suffix TK2 Suffix TK3 Suffix Postamble

3-4

MSR210U Programmers Manual

UDN PM044-U Rev. C

Section 4 Operation of Normal Mode


This section describes the LED indication and card reading in Normal Mode.

LED Indication
The LED indicator will be either off, amber, red and green in the normal mode. When the device is not powered, the LED will be off. The LED will turn green and buzzer beeps once, only if the device is attached and enumerated. When a card is being swiped, LED will turn off awhile or till the swipe is accomplished. If there are no errors recognizing the card data, the LED will turn green and buzzer beeps once. If the LED turns amber and buzzer beeps twice, there is probability some data unrecognizable or it is not a triple track card. If no data is recognized, the LED will turn red and buzzer beeps three times. When LED becomes green form red, the device will be ready to read the next card.

Card Reading
To exhibit the card reading capabilities, any text editor program that accepts keyboard input can be used such as Microsoft Notepad and Word. Caution: Any keyboard is connected to the same host with this device and a key is pressed while data transmitting, it may cause data corruption.

4-1

MSR210U Programmers Manual

UDN PM044-U Rev. C

Section 5 Operation of Configuration Mode


This section describes the operation procedure and all setting items of the configuration mode.

Operation Procedure
Please use MSR210U Setup Application Program to perform the configuration settings and refer to the Users Instruction Guide for operating.

Setting Items
The main menu of Configuration Mode is as below: ****configuration mode**** 1: set interface 2: set magnetic string 3: set string editing 4: set buzzer 5: reset to default 6: show status 0: exit setup mode Note: Once user choose [0] to exit Configuration Mode, the reader will be reset and execute the modified settings.

Set Interface
In the main menu, users can choose [1] to enter Set Interface sub-menu. 1: set keyboard country 2: set transmit speed 3: firmware version and date 0: back

5-1

MSR210U Programmers Manual 1: Set Keyboard Country

UDN PM044-U Rev. C

This is used to inform the reader about the keyboard type that should be used when transmitting card data. The default setting is U.S.. It will be shown as below: 1: U.S. 2: German 3: French 4: UK English 5: Spanish 6: Italy 7: Dutch 8: Portuguese 9: Swedish a: Danish 0: back reader status = U.S.

Note: reader status displays the country of keyboard interface in use. The user could choose [1] through [A] to change the keyboard interface. Choose [0] to return to last menu.

2: Set Transmit Speed This is used to set the speed of card data sent to the host. The default setting is 80 characters/sec. It will be shown as below: **** set transmit speed **** 1: 25 character/sec 2: 40 character/sec 3: 60 character/sec 4: 80 character/sec 0: back reader status = 80 char/sec

5-2

MSR210U Programmers Manual 3: Firmware Version And Date

UDN PM044-U Rev. C

Display the firmware version, release date, and the programmer of the reader. The message is shown as below as an example: 2100161d 11-mar-2004 Note: Where 2100161d represents the version of firmware.

Set Magnetic String


In the main menu, user could choose [2] to enter Set Magnetic String sub-menu. 1:set enable tracks 2:set require tracks 3:carriage return 4:transmit ss/es 5:caps lock 6:track output order 7:change carriage return code 8:output cr if read nothing 9:raw data output 0:back

5-3

MSR210U Programmers Manual 1: Set Enable Tracks

UDN PM044-U Rev. C

This function is used to enable and disable specific tracks of data sent from the reader. The default setting is track 1, 2, 3. For example, for a triple track reader it may be necessary in some applications to use only track 2 data. In this case, this setting can make track 2 enabled and disable track 1&3. **** enable tracks **** 1: track 1 2: track 2 3: track 1,2 4: track 3 5: track 1,3 6: track 2,3 7: track 1,2,3 0: back reader status = track 1,2,3

2: Set Require Tracks This function is used to set require track as criteria of effective reading. The default setting is any track. The criteria means if the require track has been read after swiping card. For example, if user set track 2 as a criterion and gets track 2 data exactly from the reading data, then it is a good reading and the reader sends all enabled track data to the host. If not, the reader doesnt transmit any data. The default setting is any track will be considered a good read. This feature is useful if your software requires specific tracks of the card data. **** require tracks **** 1:track 1 2:track 2 3:track 1,2 4:track 3 5:track 1,3 6:track 2,3 7:track 1,2,3 8:any track 0:back reader status = any track

5-4

MSR210U Programmers Manual 3: Carriage Return

UDN PM044-U Rev. C

This is used to set the output data with or without carriage return for each track. The default setting is after each track. **** carriage return **** 1:don't send carriage return 2:after all tracks 3:after each track 4:after all data 0:back reader status = after each track Note: After all data means to send CR out following card data plus something like preamble/postamble, and after all track means to do it right after sending out card data.

4: Transmit SS/ES This function is used to determine whether the SS and ES of each track will be sent with the card data. The default setting is enable. (SS: start sentinel; ES: end sentinel) **** ss/es send **** 1:send 2:no send 0:back reader status = enable

5: Caps Lock This function is used to set the send data as capital letters. The default setting is enable. No matter what the Caps Lock on the keyboard is ON or OFF, the reader is always sending out the capital letters while the setting is enable. Once this setting is disable, the letters of the sent data are consistent with the Caps Lock status. The default setting is enable. 1:enable 2:disable 0:back reader status = enable

5-5

MSR210U Programmers Manual 6: Track Output Order

UDN PM044-U Rev. C

The track output order is used to control the order and appearance of each track output. The default setting is 1, 2, 3. You have to input the track in order; i.e.: FIRST, SECOND, and then THIRD. 1:track 1 2:track 2 3:track 3 0:back reader status = 1,2,3 first: second: third:

7: Change Carriage Return Code The change carriage return code is used to change the code of carriage return. The default setting is [enter]. 1:change 2:reset 0:back reader status = [enter]

After setting, you may re-confirm it by entering change carriage return code section. You shall see: 1:change 2:reset 0:back reader status = [shift]4

8: Output CR If Read Nothing The default setting is disable. no data, output carriage return 1:enable 2:disable 0:back

5-6

MSR210U Programmers Manual 9: Raw Data Output (U.S.A. only) The default setting is disable. **** set raw data output **** 1:enable 2:disable 0:back

UDN PM044-U Rev. C

Set String Editing


In the main menu, select [3] to enter set string editing sub-menu. 1:set prefix 2:set suffix 3:set magnetic stripe preamble 4:set magnetic stripe postamble 5:block output order 6:send control 7:field output order 8:exp date format 9:exp date separator 0:back

5-7

MSR210U Programmers Manual 1: Set Prefix

UDN PM044-U Rev. C

The track 1, 2, 3 prefix are 6-character strings that are transmitted prior to the track data. It will be shown as below: 1:track 1 2:track 2 3:track 3 0:back **** set track 1 prefix **** 1:enable 2:disable 0:back reader status = disable enter prefix (6 chars max) then press ` when finished important! [caps] key is not allowed

After selecting tracks, user set the prefix for the specific track. If the track needs prefix, choose [1], users can input 1~6 characters to be as the prefix; if not, choose [2]. The default setting is disable.

5-8

MSR210U Programmers Manual 2: Set Suffix

UDN PM044-U Rev. C

The track 1, 2, 3 suffix are 6-character strings that are transmitted after to the track data. It will be shown as below: 1:track 1 2:track 2 3:track 3 0:back **** set track 1 suffix **** 1:enable 2:disable 0:back reader status = disable enter suffix (6 chars max) then press ` when finished important! [caps] key is not allowed

After selecting tracks, user set the suffix of the specific track. If the track needs suffix, choose [1], users can input 1~6 characters to be as the suffix; if not, choose [2]. The default setting is disable.

3: Set Magnetic Stripe Preamble The preamble is a 6-character string that is transmitted before all card data. This string allows you to ensure that the cursor is positioned at the desired location at the time of a card swipe. **** set preamble **** 1:enable 2:disable 0:back reader status = disable enter preamble (6 chars max) then press ` when finished important! [caps] key is not allowed

If choose [1], then users can input 1~6 characters to be as the preamble; if not, choose [2]. The default setting is disable. 5-9

MSR210U Programmers Manual 4: Set Magnetic Stripe Postamble

UDN PM044-U Rev. C

The postamble is a 6-character string that is transmitted after all card data. This string allows you to ensure that the cursor is positioned at the desired location at the time of a card swipe. **** set postamble **** 1:enable 2:disable 0:back reader status = disable enter postamble (6 chars max) then press ` when finished important! [caps] key is not allowed

If choose [1], then users can input 1~6 characters to be as the postamble; if not, choose [2]. The default setting is disable. Note: For 1~4 item in the Set String Editing mode, if users input up to 6 characters, this mode will be finished automatically, if less than 6 characters, users can click the key ` escaping this mode. The key ` is the character for U.S. keyboard configuration. For the same function, please click the exact position on the keyboard as below.

5-10

MSR210U Programmers Manual 5: Block Output Order

UDN PM044-U Rev. C

The Block Output Order is used to control the order and appearance of each block output. Each track has three blocks (A, B, C) which could be set conforming to ISO, DMV, AAMVA or Trade Show, and the characters of each block could be set during 1~109. Example: Controlling the output data format of block A on track 1 is ISO standard card, 15th character to 30th character. The procedure is as follows: Step 1: Choosing [1] to set data format of track 1. **** set block output order **** 1:track 1 2:track 2 3:track 3 0:back

Step 2: Choosing [1] to set block a. 1:block a 2:block b 3:block c 0:back

Step 3: Choosing [3] to set the card type is ISO standard. ** set track1 block a ** reader status = disable 1:dmv 2:aamva 3:iso 4:trade show 9:disable 0:back

Step 4: To set the range of the transmitting data format. Please click [Enter] key on the Configuration Setup AP to confirm the input data. START = 15 END = 30 5-11

MSR210U Programmers Manual Example:

UDN PM044-U Rev. C

For track 1, if you set block A is ISO type 1-4, block B is DMV type 6-9 and block C is ISO type 11-25, then 1.while you swipe an ISO card, itll output char 1-4 plus 11-25 of track 1 data. 2.while you swipe a DMV card. Itll output char 6-9 of track 1 data. 3.while you swipe an AAMVA card/ itll output all char of track1 data.

6: Send Control This function is used to control the reader send out data until users input a specific key or any key by the MSR210U setup application program after swiping cards. After choosing [1] and a beep sound, a user starts to set the key, which will become to control the send data. That means the reader will not send data until users click the exact key. If choose [2], the reader will send data once clicking any key excluding extension key(s). The default setting is disable. 1:set key 2:any key 3:disable 0:back reader status = disable

7: Field Output Order The Field Output Order is used to control the order and appearance of each field output. Each card has three fields could be set (i.e.: name, account, and expire date). You may set one, two, or three fields that depend on actual application. The default setting is disable. 1:enable 2:disable 0:back reader status = disable

5-12

MSR210U Programmers Manual Step: Choosing [1] to enable field output order. 1:name 2:account 3:expire date 0:back first: second: third:

UDN PM044-U Rev. C

Example: Setting the Field Output Order as expire date, name, and account in order. The procedure is as follows: Step 1: Choosing [1] to enable field output order. 1:name 2:account 3:expire date 0:back first:

Step 2: Click [3] to choose expire date as the first output field. 1:name 2:account 3:expire date 0:back first: second:

5-13

MSR210U Programmers Manual Step 3: Click [1] to choose name as the second output field. 1:name 2:account 3:expire date 0:back first: second: third:

UDN PM044-U Rev. C

Step 4: Click [2] to choose account as the third output field. After setting done, you may re-confirm it by entering Field Output Setting section. You shall see: 1:enable 2:disable 0:back reader status = expire date,name,account

8: Exp Date Format The Expire Date Format is used to set the format of expiration date of the Field Output Order. This function only is effective while Field Output Order is enable, and wont impact on general card data output. The default setting is YYMM. 1:yymm 2:mmyy 0:back reader status = yymm

5-14

MSR210U Programmers Manual 9: Exp Date Separator

UDN PM044-U Rev. C

The Expire Date Separator is used to set a specific character to separate the MM and YY that is defined in Expire Date Format. This function only is effective while Field Output Order is enable, and wont impact on general card data output. The default setting is disable. 1:change 2:reset 0:back reader status = disable

Set Buzzer
In the main menu, choose [4] to enter set buzzer mode. Clicking [1] to makes the buzzer of the device active, or click [2] makes buzzer of the device inactive. But when the device is in the mode of Default Interface Configuration Working (S1_1 ON), the buzzer will beep once after attaching the device. The default setting is enable. **** set buzzer enable/disable **** 1:enable 2:disable 0:back

Reset To Default
In the main menu, choose [5] to enter reset to default mode. Clicking [1] to reset all defaults returns the unit to initial factory settings. 1:reset to default 0:back

5-15

MSR210U Programmers Manual Show Status

UDN PM044-U Rev. C

In the main menu, click [6] to display all of the existing settings of the reader. For example: keyboard country=u.s. transmit speed=120 char/sec enable tracks=track 1,2,3 require tracks=any track carriage return=after each track ss/es send=enable caps lock=enable raw data output=disable buzzer=enable data output=1,2,3 keyboard=standard configuration press 0 to back

To click any key checks other settings of the reader, and click [0] escaping show status mode backing to the main menu. track 1 prefix=disable track 2 prefix=disable track 3 prefix=disable track 1 suffix=disable track 2 suffix=disable track 3 suffix=disable preamble=disable postamble=disable press 0 to back

To click any key checks other settings of the reader, and click [0] escaping show status mode backing to the main menu.

5-16

MSR210U Programmers Manual track1 block a=disable track1 block b=disable track1 block c=disable track2 block a=disable track2 block b=disable track2 block c=disable track3 block a=disable track3 block b=disable track3 block c=disable

UDN PM044-U Rev. C

After showing all of the settings, press any key to back to the main menu.

5-17

MSR210U Programmers Manual

UDN PM044-U Rev. C

Section 6 Operation of Download Mode


Please refer to the Users Instruction of MSR210U Download Application Program.

6-1

MSR210U Programmers Manual

UDN PM044-U Rev. C

Section 7 Configuration Mode Specification


This section provides the information about operating in configuration mode via HID Class API to send the scan code of PS/2 interface from host to the device.

Enter Configuration Mode


The device can accept PS/2 scan codes in Normal Mode and Configuration Mode.

Procedure
1. Attach the device into a USB port. 2. Send the scan codes 14h (Left Ctrl make code), 11h (Left Alt make code), 09h (F10 make code) and then F0h 09h (F10 break code), F0h 11h (Left Alt break code), F0h 14h (Left Ctrl break code) to the device. As soon as the device acknowledges these scan codes, it will go into configuration mode and the LED goes blinking. 3. The device will send out entire data of the configuration mode menu to where cursor is.

Configuration Settings
In the configuration mode, host only needs to send the make codes and break codes to device sequentially to emulate a keystroke for configuration settings. Caution: The break code must be sent to the device if a relative make code has been accept, otherwise host will assume that the specific key is not released.

PS/2 Scan Code Table


key location 1 2 3 4 5 6 101/102 Enhanced Keyboard ~ ! @ # $ % ` 1 2 3 4 5 scan 1 make 29 02 03 04 05 06 scan 1 break A9 82 83 84 85 86 scan 2 make 0E 16 1E 26 25 2E scan 2 brake F0 0E F0 16 F0 1E F0 26 F0 25 F0 2E

7-1

MSR210U Programmers Manual


key location 7 8 9 10 11 12 13 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29* 30 31 32 33 34 35 36 37 38 39 40 41 42** : { } | 101/102 Enhanced Keyboard ^ 6 & * ( ) _ + 7 8 9 0 = scan 1 make 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 [ ] \ 1A 1B 2B 3A 1E 1F 20 21 22 23 24 25 26 ; 27 28 2B scan 1 break 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B AB BA 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 AB

UDN PM044-U Rev. C


scan 2 make 36 3D 3E 46 45 4E 55 66 0D 15 1D 24 2D 2C 35 3C 43 44 4D 54 5B 5D 58 1C 1B 23 2B 34 33 3B 42 4B 4C 52 5D scan 2 brake F0 36 F0 3D F0 3E F0 46 F0 45 F0 4E F0 55 F0 66 F0 0D F0 15 F0 1D F0 24 F0 2D F0 2C F0 35 F0 3C F0 43 F0 44 F0 4D F0 54 F0 5B F0 5D F0 58 F0 1C F0 1B F0 23 F0 2B F0 34 F0 33 F0 3B F0 42 F0 4B F0 4C F0 52 F0 5D

Backspace Tab Q W E R T Y U I O P

Caps Lock A S D F G H J K L

7-2

MSR210U Programmers Manual


key location 43 44 45** 46 47 48 49 50 51 52 53 54 55 56*** 57 58 60 61 62 64 75 76 79 80 81 83 84 85 86 89 90 91 92 93 95 R SHIFT L CTRL L ALT Space Bar R ALT R CTRL Insert Delete L Arrow Home End Up Arrow Dn Arrow Page Up Page Down R Arrow Num Lock Numeric 7 Numeric 4 Numeric 1 Numeric / Z X C V B N M < > ? , . / 101/102 Enhanced Keyboard Enter L SHIFT scan 1 make 1C 2A 56 2C 2D 2E 2F 30 31 32 33 34 35 73 36 1D 38 39 E0 38 E0 1D E0 52 E0 53 E0 4B E0 47 E0 4F E0 48 E0 50 E0 49 E0 51 E0 4D 45 47 4B 4F E0 35 scan 1 break 9C AA D6 AC AD AE AF B0 B1 B2 B3 B4 B5 F3 B6 9D B8 B9 E0 B8 E0 9D E0 D2 E0 D3 E0 CB E0 C7 E0 CF E0 C8 E0 D0 E0 C9 E0 D1 E0 CD C5 C7 CB CF E0 B5

UDN PM044-U Rev. C


scan 2 make 5A 12 61 1A 22 21 2A 32 31 3A 41 49 4A 51 59 14 11 29 E0 11 E0 14 E0 70 E0 71 E0 6B E0 6C E0 69 E0 75 E0 72 E0 7D E0 7A E0 74 77 6C 6B 69 E0 4A scan 2 brake F0 5A F0 12 F0 61 F0 1A F0 22 F0 21 F0 2A F0 32 F0 31 F0 3A F0 41 F0 49 F0 4A F0 51 F0 59 F0 14 F0 11 F0 29 E0 F0 11 E0 F0 14 E0 F0 70 E0 F0 71 E0 F0 6B E0 F0 6C E0 F0 69 E0 F0 75 E0 F0 72 E0 F0 7D E0 F0 7A E0 F0 74 F0 77 F0 6C F0 6B F0 69 E0 F0 4A

7-3

MSR210U Programmers Manual


key location 96 97 98 99 100 101 102 103 104 105 106 107*** 108 110 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 Numeric Enter Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Print Screen Scroll Lock Pause C5 Left Win Right Win Application E0_5B E0_5C E0_5D E0_DB E0_DC E0_DD 101/102 Enhanced Keyboard Numeric 8 Numeric 5 Numeric 2 Numeric 0 Numeric * Numeric 9 Numeric 6 Numeric 3 Numeric . Numeric Numeric + scan 1 make 48 4C 50 52 37 49 4D 51 53 4A 4E 7E E0 1C 01 3B 3C 3D 3E 3F 40 41 42 43 44 57 58 E0 2A E0 37 46 E1 1D 45 E1 9D None scan 1 break C8 CC D0 D2 B7 C9 CD D1 D3 CA CE FE E0 9C 81 BB BC BD BE BF C0 C1 C2 C3 C4 D7 D8 E0 B7 E0 AA C6

UDN PM044-U Rev. C


scan 2 make 75 73 72 70 7C 7D 74 7A 71 7B 79 6D E0 5A 76 05 06 04 0C 03 0B 83 0A 01 09 78 07 E0 12 E0 7C 12 7E E1 14 77 E1 F0 None 14 F0 77 E0_1F E0_27 E0_2F E0_F0 1F E0_F0 27 E0_F0 2F F0 7E scan 2 brake F0 75 F0 73 F0 72 F0 70 F0 7C F0 7D F0 74 F0 7A F0 71 F0 7B F0 79 F0 6D E0 F0 5A F0 76 F0 05 F0 06 F0 05 F0 0C F0 03 F0 0B F0 83 F0 0A F0 01 F0 09 F0 78 F0 07 E0 F0 7C E0 F0

Note * Key 29 is available on the US and not on the International Keyboard. 7-4

MSR210U Programmers Manual Note **

UDN PM044-U Rev. C

Keys 42 and 45 are available on the International Keyboard and not on the US Keyboard. Note *** Keys 56 and 107 are used on Brazilian and some Far East keyboards. They are not available on US Keyboards.

7-5

MSR210U Programmers Manual

UDN PM044-U Rev. C

Section 8 Download Mode Specification


This section provides the information about firmware download via HID Class API to send packet commands from host to the device.

Enter Boot Mode


The device can accept packet commands only in Boot Mode.

Procedure
1. 2. Attach the device into a USB port. Send the single command C5 to the device. As soon as the device acknowledges this command, it will go into boot mode and the LED goes amber from green. When the device is in boot mode, it can accept packet commands from host to do download firmware. For download firmware, the host shall send packet command(s) to device sequentially. When finishes download, the host shall send the packet command to reset the device. If any errors that except LRC error are occurred during download, the host will receive a packet command that indicates error code from the device. After the host received the packet command, it shall abort the process.

Command Sets
This section describes the packet commands and responses available for the device. Each system packet command format includes its data element, size and comments. The comments provide an explanation of each data element. The letter 'h' written in size column is an abbreviation of 'hexadecimal'. Except single commands, all system packet commands are preceded by a header, hex code C2h, and terminated with one byte {LRC}. {LRC} is an XOR of the 8 data bits, excluding header, of each character in the entire packet command.

8-1

MSR210U Programmers Manual System Packet Command Format: <Header><Command Type><Data Length>[Data]{LRC}

UDN PM044-U Rev. C

Data Element <Header> <Command Type> <Data Length> [Data] {LRC}

Size 01h 01h 01h 1~256 01h

Comments Packet Command Header, Value: C2h Command code Indicate the length of [Data] Optional Error Check Minimum: 5 characters

Maximum: 260 characters

The devices packet commands can be divided into two categories as below: Single Commands System Packet Commands

Single Commands
The single commands are used to enter boot mode and active/inactive the interface between host and keyboard. The device will react to these commands without responding any message to host.

Command (Hexadecimal) C5h C7h C8h

Description Request the reader to enter boot mode Active the path between host and keyboard Inactive the path between host and keyboard

C5 Request the reader to enter boot mode After power on the device, the host sends this command to device for entering boot mode and the LED goes amber from green. C7 Active the path between host and keyboard While the device is in boot mode, the host sends this command to active the interface between host and keyboard after finishing firmware download. C8 Inactive the path between host and keyboard While the device is in boot mode, the host sends this command to inactive the interface between host and keyboard before starting firmware download.

8-2

MSR210U Programmers Manual

UDN PM044-U Rev. C

System Packet Commands


When the device is in boot mode, the system packet commands are used to do firmware related functions between host and device.

Command (Hexadecimal) 01h 02h 03h 04h 05h 10h 21h 22h 23h 24h Programming Programming restart

Description

Fill in unused location with zero Request checksum of system program Response checksum of system program Reset reader Request firmware version of boot loader Response firmware version of boot loader Request firmware version of system program Response firmware version of system program

Command 01 Programming The host sends this command to download system program into device. If the device receives this command at first time after entering into boot mode, it will erase all data stored in system program area and start download firmware from the very first location. If the device receives this command at second times or above, it depends on if the command 02 is preceded by or not. If yes, the device will start download firmware from the very first location; if not, the device will download firmware from behind the location that firmware is downloaded before. During download process, the LED goes red blinking. After download done, the LED returns to amber.

Command: 01 Command Format: <Header><Command Type><Data Length>[Data]{LRC} Data Element <Header> <Command Type> <Data Length> [Data] {LRC} Size 01H 01H 01H 1~256 01H Comments Packet Command Header, Value: C2h Command code Indicate the length of [Data] Optional Error Check Minimum: 5 characters

Maximum: 260 characters

8-3

MSR210U Programmers Manual

UDN PM044-U Rev. C

Host to Device Flow of System Packet Command 01 Host Send command to device == ACK if LRC okay NAK if LRC incorrect, and prompt host to re-send == EOT if any errors are occurred, and will follow a packet command with error code Note: Host will send packet command 01 continuously till the firmware download is completed. Device

Command 02 Programming restart As long as any errors are occurred during download firmware process, this command shall be preceded prior to download firmware again. When the device receives this command, it will initial download parameters stored in boot loader area.

Command: 02, 03, 04, 21, 23 Command Format: <Header><Command Type><Data Length>{LRC} Data Element <Header> <Command Type> <Data Length> {LRC} Size 01H 01H 01H 01H Comments Packet Command Header, Value: C2h Command code Indicate the length of [Data], Value: 00h Error Check Minimum: 4 characters

Maximum: 4 characters

Host to Device Flow of System Packet Command 02, 03, 10 Host Send command to device == ACK if LRC okay NAK if LRC incorrect, and prompt host to re-send == EOT if any errors are occurred, and will follow a packet command with error code Device

Command 03 Fill in unused location with zero When the device receives this command, the LED goes red and the device starts to fill zero into unused system program area. After finished, the LED returns to orange. Note: The command format and flow sequence can be found in the section of command 02. 8-4

MSR210U Programmers Manual Command 04 Request checksum of system program

UDN PM044-U Rev. C

The host sends this command to request the checksum (2-byte) of system program. Note: The command format can be found in the section of command 02.

Host to Device Flow of System Packet Command 04, 05 Host Send command to device == ACK if LRC okay NAK if LRC incorrect, and prompt host to re-send == EOT if any errors are occurred, and will follow a packet command with error code == Response command 05 with 2-byte checksum Device

Command 05 Response checksum of system program The device responses this command to host to indicate the checksum (2-byte) of system program.

Command: 05 Command Format: <Header><Command Type><Data Length>[Data]{LRC} Data Element <Header> <Command Type> <Data Length> [Data] {LRC} Size 01H 01H 01H 02h 01H Comments Packet Command Header, Value: C2h Command code Indicate the length of [Data] Checksum of system program Error Check Minimum: 6 characters

Maximum: 6 characters Note:

The command flow sequence can be found in the section of command 04.

8-5

MSR210U Programmers Manual Command 10 Reset reader

UDN PM044-U Rev. C

When the device receives this command, it will return to normal mode from boot mode. The LED goes green.

Command: 10 Command Format: <Header><Command Type><Data Length>[Data]{LRC} Data Element <Header> <Command Type> <Data Length> [Data] {LRC} Size 01H 01H 01H 02h 01H Comments Packet Command Header, Value: C2h Command code Indicate the length of [Data] Reset password, Value: AAh 55h Error Check Minimum: 6 characters

Maximum: 6 characters Note:

The command flow sequence can be found in the section of command 02. Command 21 Request firmware version of boot loader The host sends this command to request the firmware version (8-byte) of boot loader. Note: The command format can be found in the section of command 02.

Host to Device Flow of System Packet Command 21, 22, 23, 24 Host Send command to device == ACK if LRC okay NAK if LRC incorrect, and prompt host to re-send == EOT if any errors are occurred, and will follow a packet command with error code Response command 22/24 with 8-byte firmware == version of boot loader/system program Device

8-6

MSR210U Programmers Manual Command 22 Response firmware version of boot loader

UDN PM044-U Rev. C

The device responses this command to host to indicate the firmware version (8-byte) of boot loader.

Command: 22, 24 Command Format: <Header><Command Type><Data Length>[Data]{LRC} Data Element <Header> <Command Type> <Data Length> [Data] {LRC} Size 01H 01H 01H 08h 01H Comments Packet Command Header, Value: C2h Command code Indicate the length of [Data] Firmware version of boot loader/system program Error Check Minimum: 12 characters

Maximum: 12 characters Note:

The command flow sequence can be found in the section of command 21. Command 23 Request firmware version of system program The host sends this command to request the firmware version (8-byte) of system program. Note: The command format can be found in the section of command 02, and flow sequence can be found in the section of command 21. Command 24 Response firmware version of system program The device responses command 23 by responding this command to host to indicate the firmware version (8-byte) of system program. Note: The command format can be found in the section of command 22, and flow sequence can be found in the section of command 21.

8-7

MSR210U Programmers Manual

UDN PM044-U Rev. C

Section 9 Usage of API


This section describes all used API roughly. Please refer to Microsoft MSDN for detailed information.

API Command Sets


HidD_GetHidGuid
The HidD_GetHidGuid routine returns the device interface GUID for HIDClass devices. For example: Public Declare Function HidD_GetHidGuid Lib "hid.dll" _ (ByRef HidGuid As GUID) As Long Public Type GUID Data1 As Long Data2 As Integer Data3 As Integer Data4(7) As Byte End Type

SetupDiGetClassDevs
The SetupDiGetClassDevs function returns a device information set that contains all devices of a specified class. For example: Public Declare Function SetupDiGetClassDevs Lib "setupapi.dll" _ Alias "SetupDiGetClassDevsA" (ByRef ClassGuid As GUID, _ ByVal Enumerator As String, ByVal hwndParent As Long, _ ByVal Flags As Long) _ As Long

SetupDiEnumDeviceInterfaces
The SetupDiEnumDeviceInterfaces function returns a context structure for a device interface element of a device information set. Each call returns information about one device interface; the function can be called repeatedly to get information about several interfaces exposed by one or more devices.

9-1

MSR210U Programmers Manual For example:

UDN PM044-U Rev. C

Public Declare Function SetupDiEnumDeviceInterfaces Lib "setupapi.dll" _ (ByVal DeviceInfoSet As Long, ByVal DeviceInfoData As Long, _ ByRef InterfaceClassGuid As GUID, ByVal MemberIndex As Long, _ ByRef DeviceInterfaceData As SP_DEVICE_INTERFACE_DATA) _ As Long Public Type SP_DEVICE_INTERFACE_DATA cbSize As Long InterfaceClassGuid As GUID Flags As Long Reserved As Long End Type

SetupDiGetDeviceInterfaceDetail
The SetupDiGetDeviceInterfaceDetail function returns details about a particular device interface. For example: Public Declare Function SetupDiGetDeviceInterfaceDetail Lib "setupapi.dll" _ Alias "SetupDiGetDeviceInterfaceDetailA" (ByVal DeviceInfoSet As Long, _ ByRef DeviceInterfaceData As SP_DEVICE_INTERFACE_DATA, _ ByVal DeviceInterfaceDetailData As Long, _ ByVal DeviceInterfaceDetailDataSize As Long, _ ByRef RequiredSize As Long, ByVal DeviceInfoData As Long) _ As Long

CreateFile
The CreateFile function creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe. The function returns a handle that can be used to access the object. For example: Public Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" _ (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, _ ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Long, _ ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, _ ByVal hTemplateFile As Long) _ As Long 9-2

MSR210U Programmers Manual

UDN PM044-U Rev. C

HidD_GetAttributes
The HidD_GetAttributes routine returns the attributes of a specified top-level collection. For example: Public Declare Function HidD_GetAttributes Lib "hid.dll" _ (ByVal HidDeviceObject As Long, ByRef Attributes As HIDD_ATTRIBUTES) _ As Long Public Type HIDD_ATTRIBUTES size As Long VendorID As Integer ProductID As Integer VersionNumber As Integer End Type

HidD_GetPreparsedData
The HidD_GetPreparsedData routine returns a top-level collection's preparsed data. For example: Public Declare Function HidD_GetPreparsedData Lib "hid.dll" _ (ByVal HidDeviceObject As Long, ByRef PreparsedData As Long) _ As Long

HidP_GetCaps
The HidP_GetCaps routine returns a top-level collection's HIDP_CAPS structure. For example: Public Declare Function HidP_GetCaps Lib "hid.dll" _ (ByVal PreparsedData As Long, ByRef Capabilities As HIDP_CAPS) _ As Long Public Type HIDP_CAPS Usage As Integer UsagePage As Integer InputReportByteLength As Integer OutputReportByteLength As Integer FeatureReportByteLength As Integer Reserved(16) As Integer NumberLinkCollectionNodes As Integer 9-3

MSR210U Programmers Manual NumberInputButtonCaps As Integer NumberInputValueCaps As Integer NumberInputDataIndices As Integer NumberOutputButtonCaps As Integer NumberOutputValueCaps As Integer NumberOutputDataIndices As Integer NumberFeatureButtonCaps As Integer NumberFeatureValueCaps As Integer NumberFeatureDataIndices As Integer End Type

UDN PM044-U Rev. C

HidD_GetManufacturerString
The HidD_GetManufacturerString routine returns a top-level collection's embedded string that identifies the manufacturer. For example: Public Declare Function HidD_GetManufacturerString Lib "hid.dll" _ (ByVal Handle As Long, ByRef BufferPtr As Byte, _ ByVal Length As Long) _ As Long

HidD_SetFeature
The HidD_SetFeature routine sends a feature report to a top-level collection. For example: Public Declare Function HidD_SetFeature Lib "hid.dll" _ (ByVal HidDeviceObject As Long, ByRef ReportBuffer As Byte, _ ByVal ReportBufferLength As Long) _ As Byte

HidD_GetFeature
The HidD_GetFeature routine returns a feature report from a specified top-level collection. For example: Public Declare Function HidD_GetFeature Lib "hid.dll" _ (ByVal HidDeviceObject As Long, ByRef ReportBuffer As Byte, _ ByVal ReportBufferLength As Long) _ As Byte 9-4

MSR210U Programmers Manual

UDN PM044-U Rev. C

CloseHandle
The CloseHandle function closes an open object handle. For example: Public Declare Function CloseHandle Lib "kernel32" _ (ByVal hObject As Long) _ As Long

9-5

Vous aimerez peut-être aussi