USB HID SURESWIPE & USB HID SWIPE READER TECHNICAL REFERENCE MANUAL Manual Part Number 99875191 Rev 13 JANUARY 2012 REGISTERED TO ISO 9001:2008 1710 Apollo Court Seal Beach, CA 90740 Phone: (562) 546-6400 FAX: (562) 546-6301 Technical Support: (651) 415-6800 www.magtek.
Copyright© 2001-2012 MagTek©, Inc. Printed in the United States of America Information in this document is subject to change without notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of MagTek, Inc. MagTek is a registered trademark of MagTek, Inc.
LIMITED WARRANTY MagTek warrants that the products sold pursuant to this Agreement will perform in accordance with MagTek’s published specifications. This warranty shall be provided only for a period of one year from the date of the shipment of the product from MagTek (the “Warranty Period”). This warranty shall apply only to the “Buyer” (the original purchaser, unless that entity resells the product as authorized by MagTek, in which event this warranty shall apply only to the first repurchaser).
FCC WARNING STATEMENT This equipment has been tested and was found to comply with the limits for a Class B digital device pursuant to Part 15 of FCC Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a residential environment. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference with radio communications.
TABLE OF CONTENTS SECTION 1. FEATURES AND SPECIFICATIONS ..................................................................................... 1 USB HID SWIPE READER ....................................................................................................................... 1 USB HID SURESWIPE ............................................................................................................................. 1 FEATURES .....................................................................
Figure 1-1.
SECTION 1. FEATURES AND SPECIFICATIONS USB HID SWIPE READER The USB (Universal Serial Bus) HID (Human Interface Device) Swipe Reader is a compact magnetic stripe card reader with a single read head that conforms to ISO standards. The Reader is compatible with any device with a host USB interface. A card is read by sliding it, stripe down and facing the LED side, through the slot either forward or backward.
USB HID Swipe Reader FEATURES Major features of the Swipe Reader are as follows: • • • • • • • • • • • • • • Powered through the USB – no external power supply required Hardware Compatible with PC or any computer or terminal with a USB interface Bi-directional card reading Reads encoded data that meets ANSI/ISO/AAMVA standards and others such as ISO track 1 format on track 2 or 3. Reads up to three tracks of card data LED for status Compatible with USB specification Revision 1.
Section 1.
USB HID Swipe Reader SPECIFICATIONS Table 1-1 lists the specifications for the USB Swipe Reader. Figure 1-2 shows the dimensions for the standard product. Table 1-1. Specifications Reference Standards Power Input Recording Method Message Format Card Speed ISO 7810 and ISO 7811/AAMVA* 5V From USB bus Two-frequency coherent phase (F2F) ASCII 3 to 60 ips (7.62 – 152.4 cm/s) ELECTRICAL Current Normal Mode Suspend Mode 15 mA 200 uA 1.0 E06 Hrs based on Mil-217 MECHANICAL Length Width Height 3.94” (100.
Section 1. Features and Specifications Figure 1-2.
USB HID Swipe Reader 6
SECTION 2. INSTALLATION This section describes the cable connection, the Windows Plug and Play Setup, and the physical mounting of the unit. USB CONNECTION Connect the USB cable to a USB port on the host. The Reader, LED Indicator, and pin numbers for the 4-pin connector are shown in Figure 2-1. Figure 2-1. Reader Cable and Connector Pin numbers and signal descriptions for the cable shown in the illustration are listed in Table 2-1. Table 2-1.
USB HID Swipe Reader WINDOWS PLUG AND PLAY SETUP On hosts with the Windows operating system, the first time the device is plugged into a specific USB port, Windows will pop up a dialog box, which will guide you through the process of installing a device driver for the device. After this process is completed once, Windows will no longer request this process as long as the device is plugged into the same USB port.
Section 2. Installation Figure 2-2. Mounting Hole Dimensions for Surface 2. Ensure the Reader is positioned on a flat, accessible surface with at least 4 inches clearance on either end for room to swipe a card. Orient the Reader so the side with the LED is facing the direction of intended use. If fastening tape is to be used, clean the area that the Reader will be mounted on with isopropyl alcohol. Remove the adhesive protective cover on the fastening tape, and position the Reader and push down firmly.
USB HID Swipe Reader 10
SECTION 3. OPERATION This section describes the LED Indicator and Card Read. LED INDICATOR The LED indicator will be either off, red, or green. When the device is not powered, the LED will be off. When the device is first plugged in, the LED will be red. As soon as the device is plugged in, the host will try to enumerate the device. Once the device is enumerated the LED will turn green indicating that the device is ready for use.
USB HID Swipe Reader 12
SECTION 4. USB COMMUNICATIONS This device conforms to the USB specification revision 1.1. This device also conforms with the Human Interface Device (HID) class specification version 1.1. The device communicates to the host as a vendor-defined HID device. The details about how the card data and commands are structured into HID reports follow later in this section. The latest versions of the Windows operating systems come with a standard Windows USB HID driver.
USB HID Swipe Reader following table. The usage types are also listed. These usage types are defined in the HID Usage Tables document.
Section 4. USB Communications Item Usage (Command message) Report Count (24) Feature (Data, Variable, Absolute, Buffered Bytes) End Collection Value (Hex) 09 20 95 18 B2 02 01 C0 CARD DATA Card data is only sent to the host on the Interrupt In pipe using an Input Report. The device will send only one Input Report per card swipe. If the host requests data from the device when no data is available, the device will send a Nak to the host to indicate that it has nothing to send.
USB HID Swipe Reader TRACK 3 DECODE STATUS Bits Value 7-1 Reserved 0 Error This is a one-byte value, which indicates the status of decoding track 3. Bit position zero indicates if there was an error decoding track 3 if this bit is set to one. If it is zero, then no error occurred. If a track has data on it that is not noise, and it is not decodable, then a decode error is indicated.
Section 4. USB Communications TRACK DATA If decodable track data exists for a given track, it is located in the track data field that corresponds to the track number. 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. Track data located in positions greater than the track data length field indicates are undefined and should be ignored.
USB HID Swipe Reader COMMAND NUMBER This one-byte field contains the value of the requested command number. The following table lists all the existing commands. Value 0 1 2 Command Number GET PROPERTY SET PROPERTY RESET DEVICE Description Gets a property from the device Sets a property in the device Resets the device DATA LENGTH This one-byte field contains the length of the valid data contained in the Data field. DATA This multi-byte field contains command data if any.
Section 4. USB Communications Get Property Request Data: Data Offset 0 Value Property ID Data Offset 0–n Value Property Value Data Offset 0 1–n Value Property ID Property Value Get Property Response Data: Set Property Request Data: Set Property Response Data: None The result codes for the Get and Set Property commands can be any of the codes list in the generic result code table. Property ID is a one-byte field that contains a value that identifies the property.
USB HID Swipe Reader last 3 bytes represent the version. For example this string might be “21042812D01”.
Section 4. USB Communications Description: The value is a byte that represents the devices polling interval for the Interrupt In Endpoint. The value can be set in the range of 1 – 255 and has units of milliseconds. The polling interval tells the host how often to poll the device for card data packets. For example, if the polling interval is set to 10, the host will poll the device for card data packets every 10ms.
USB HID Swipe Reader card data transfer rate decreases the USB bus bandwidth used by the device. The value of this property will be sent to the host when the host requests the device’s USB endpoint descriptor. This property is stored in non-volatile memory, so it will persist when the unit is power cycled. When this property is changed, the unit must be reset (see Command Number 2) or power cycled to have these changes take effect.
Section 4.
USB HID Swipe Reader Example Get INTERFACE TYPE property Response (Hex): Result Code 00 Data Len 01 Prp Value 00 HOST POLL TIMEOUT PROPERTY Property ID: Property Type: Length: Get Property: Set Property: Default Value: Description: 0x52 Byte 1 byte Yes Yes 0x02 (2 seconds) This property can be used to adjust the device’s host poll timeout. The property can be set to 0 to disable the timeout or it can be set to a value in the range of 1 to 60 seconds.
Section 4. USB Communications Example Set HOST POLL TIMEOUT property Response (Hex): Result Code 00 Data Len 00 Data Example Get HOST POLL TIMEOUT property Request (Hex): Cmd Num 00 Data Len 01 Prp ID 52 Example Get HOST POLL TIMEOUT property Response (Hex): Result Code 00 Data Len 01 Prp Value 02 RESET DEVICE COMMAND Command number: 0x02 Description: This command is used to reset the device.
USB HID Swipe Reader 26
SECTION 5.
USB HID Swipe Reader SOURCE CODE Source code is included with the demo program. It can be used as a guide for application development. It is described in detail, with comments, to assist developers. The book USB Complete by Jan Axelson is also a good guide for application developers, especially the chapter on Human Interface Device Host Applications (see “Reference Documents” in Section 1).