MAGTEK DEVICE DRIVERS FOR WINDOWS PROGRAMMING REFERENCE MANUAL Manual Part Number: 99875125 Rev 8 OCTOBER 2004 REGISTERED TO ISO 9001:2000 1710 Apollo Court Seal Beach, CA 90740 Phone: (562) 546-6400 FAX: (562) 546-6301 Technical Support: (651) 415-6800 www.magtek.
Copyright© 1996-2004 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.
REGISTERED TO ISO 9001:2000 1710 Apollo Court, Seal Beach, CA 90740 Voice: (562) 546-6400 Fax: (562) 546-6301 MagTek Part Number 99875125-2 13 June 2003 SOFTWARE LICENSE AGREEMENT IMPORTANT: YOU SHOULD CAREFULLY READ ALL THE TERMS, CONDITIONS AND RESTRICTIONS OF THIS LICENSE AGREEMENT BEFORE INSTALLING THE SOFTWARE PACKAGE. YOUR INSTALLATION OF THE SOFTWARE PACKAGE PRESUMES YOUR ACCEPTANCE OF THE TERMS, CONDITIONS, AND RESTRICTIONS CONTAINED IN THIS AGREEMENT.
TABLE OF CONTENTS SECTION 1. OVERVIEW ............................................................................................................................. 1 PROBLEMS WITH CONTROLLING DEVICES........................................................................................ 1 BENEFITS OF A CONTROL LANGUAGE AND DRIVER........................................................................ 2 LANGUAGE OVERVIEW.........................................................................................
chk_transit ........................................................................................................................................... 12 cmd_pending ....................................................................................................................................... 12 dblpinentry ........................................................................................................................................... 12 dev_status ........................................
reset .................................................................................................................................................... 26 set ....................................................................................................................................................... 26 ver ....................................................................................................................................................... 26 write ..............................
Installing USB HID Swipe Reader: ..................................................................................................... 85 Sample MTDINST.INI FILE ................................................................................................................ 86 UNINSTALLING OLD MTD VERSIONS................................................................................................. 88 Uninstalling Old Drivers from Windows 95, 98/ME.........................................................
MTD MagTek Device Drivers for Windows Figure 1-1.
SECTION 1. OVERVIEW The MagTek Device (MTD) Drivers for Windows is a collection of individual drivers that support a number of MagTek products. These drivers provide a uniform application interface for controlling a wide range of MagTek devices. The drivers, combined with a device control language, solve many of the difficulties application developers face when attempting to control hardware devices.
MagTek Device Driver for Windows • `MagTek devices are attached to the host in different ways. MagTek devices may be attached to a serial port, parallel port, to another device or even to the keyboard port. All these ports differ greatly in nature and would all have to be accessed by the application. Additionally, meaningful communication with a device attached to the keyboard port would be tricky at best.
Section 1. Overview usually remain unchanged, even though the new device may be very different from the old one. The features of a driver that implement a device control language completely shield an application developer from the complexities of device-specific functionality. LANGUAGE OVERVIEW The device control language is text based and designed to utilize the read and write file I/O facilities of the underlying operating system.
MagTek Device Driver for Windows COMMANDS Like properties, commands are identified by a string name and have string arguments. All commands are terminated by line feed or a carriage return. To invoke a command, an application simply writes it to the driver in the same manner as writing to a file or serial port. If the command has a response defined for it, the application reads it from the driver using the same I/O handle as in the write.
Section 1. Overview TYPICAL OPERATION This section describes a typical pattern that an application developer may use to operate a device. Although it is the most typical pattern, it is by no means the only viable one. Refer to Section 5, Example Applications, to see how to use the drivers in various applications. Open a device Access to the device is obtained by opening the comxx: port that the device was installed as.
MagTek Device Driver for Windows prompted to swipe a card by using the display command, followed by a read command to instruct the device to return the card data when swiped. All the facilities of the driver are utilized during this stage of operation. Close the device When the application is finished with the device, it simply closes the port using the handle obtained when it opened it. The driver shuts down the device if required.
Section 1. Overview 'set error handling On Error Resume Next ‘open the port for binary access Open “\\.\micr+” For Binary Access Read Write As #1 If Err.Number <> 0 Then <> End If on error goto 0 Note The friendly name of the device, as found in the operating system’s device UI (Device Manager in Windows 98, for example), must be prefixed with “\\.\” in order to open the device.
MagTek Device Driver for Windows ‘set up error handling On Error Resume Next ‘submit echo command Put #1, , "/echo Hello" + Chr$(10) ‘declare an input buffer a$ = String(2000, Chr$(0)) ‘read echo response from device Get #1, , a$ If Err.Number <> 0 Then <> End If Note File I/O interaction with the device is synchronous; the read operation will block until a response is received from the device or is returned by the driver (as in a property request).
Section 1. Overview 1. It can prompt the user to repeat the action and re-submit the command. This is typical if the status does not indicate a failure, per se, but that the device may not be ready yet or first needs some other interaction by the user. 2. It can reset the device and prompt the user to repeat the action. Typically, this action is necessary if the device’s state or configuration has been corrupted, but is otherwise functioning correctly. 3.
MagTek Device Driver for Windows The format number can be changed to another value (e.g., 7700 to allow use of a flex format) by editing the field following the format number entry (%CheckFormatCodeName%) in the OEMSETUP.INF file. This must be changed in three places depending on which drivers are to be used (MICR+, MiniMICR RS232, and MiniMICR Wedge).
SECTION 2. PROPERTIES This section lists the properties that are used in the MagTek Drivers. Properties can be interrogated by issuing a get command and modified with a set command. Refer to Section 3. Commands for complete description and examples of all commands. The c_xxx properties are set by the driver and reflect the device’s capabilities. However, the c_xxx properties do not indicate the configuration of the device.
MagTek Device Driver for Windows Property c_write c_wr_secure capitalize card_stat chk_account chk_amount chk_bankid chk_data chk_format chk_mod10 chk_number chk_routing chk_status chk_transit cmd_pending Access Description R 1 if the device can encode a magnetic card in either LoCo or HiCo; 2 if the device can encode a magnetic card in only the setting indicated in wr_coer R 0 if the device does not support secure mode; 1 if the device can switch between secure and non-secure mode (see wr_secure); 2
Section 2. Properties Property enc_key Access Description R/W Encryption key to use for the next encryption process (IntelliPIN): Set M S 0-3 A-J WA-WZ Wa-Wz enc_key_sn R/W enc_mode entry_echo R/W R/W entry_len R/W entry_tout R/W events_on R/W invalcmdrsp R/W key_parity lasterr R/W R max_pin_len R/W Get 4 5 0-3 A-J A-Z a-z Key Master key Session key Lower working keys Upper working keys Working keys A-Z Working keys a-z Serial number of encryption key.
MagTek Device Driver for Windows Property Access Description msg1 - msg4 R/W Messages to show on LCD screen with various commands. msg1 – used by the read and display commands msg2 – used by the display and read Card_w_pin commands msg3 – used by the read Card_w_pin command msg4 – used by the key_press and key_string operations To specify leading spaces, use \x20. See the display command for more information.
SECTION 3. COMMANDS This section describes all of the commands that can be used with the MagTek Windows Device Drivers. Some commands require parameters to indicate to the driver exactly what function is to be performed. While there are a few device-specific commands, most commands can be used with any device. DATA FORMAT All commands sent to the driver and all responses received are strings of printable ASCII characters delimited by . The driver will also accept as a delimiter.
MagTek Device Drivers for Windows Examples: 000000000011111111112222222222 012345678901234567890123456789 /read -00082 /get trk_enable 110 NOTATION CONVENTIONS The following conventions are used in the tables that follow. Fixed Size (Bold) Italic [] (a|b) Used to represent literals (symbols, exactly as sent or received from driver) Used to represent placeholders (variable fields) Expression parts in brackets are optional. The brackets are never a part of the syntax ASCII control character.
Section 3. Commands display Function Syntax Show a single message or two alternating messages on the device’s display. /display [x] The optional argument x indicates the message to be displayed. Errors none Remarks If the optional argument x is provided, this command displays it as a single message. If x is @, the driver sends a command to the device to display the idle message 00 (“Welcome”). If x is omitted, the command uses the values of the msg1 and msg2 properties for the message texts.
MagTek Device Drivers for Windows event Function Syntax Errors Remarks Response to an unsolicited event notification. none none This response can occur when an unsolicited event, such as card inserted, occurs.
Section 3. Commands load_key Function Syntax Errors Load an encryption key into the device. /load_key n key n can be one of the following values: M – master key (key is in clear text) S – session key (key is encrypted under Master Key) 0 ... 3 – lower working keys (key is encrypted under Session Key) A ... J – upper working keys (key is encrypted under Session Key) key is the 16- or 32-character value of the key to be loaded.
MagTek Device Drivers for Windows rawrecv Function Syntax Errors Receive data from the device. /rawrecv /rawrecv 45 If a command is already pending. /rawrecv 82 If the command was canceled by the user (e.g., with CLEAR key) Remarks This command overrides the default processing of the next message that comes from the device and returns it to the application as a rawrecv response.
Section 3. Commands rawsend Function Syntax Send arbitrary data to the device. /rawsend x x is an arbitrary string which is transmitted directly to the device. The string x is passed as-is to the device, except for ‘\’ which is used as an ‘escape’ character: • • • • \r is converted to \n is converted to \\ is converted to \ \xhh is converted to a character with ASCII value hh (always two hex digits), e.g., \x20 is converted to a space.
MagTek Device Drivers for Windows read Function Syntax Read data from the device. /read [[x] y] The optional argument x specifies the data source; if x is missing, a card will be read. Refer to the Read Argument table below for a description data sources. The optional argument y is used to specify a message to be displayed on the LCD screen, if supported, before carrying out the command. If y is omitted and the device supports a display, the text in the msg1 property is shown.
Section 3. Commands Read Arguments The optional argument x used in the read command specifies the type of data to read and y specifies the text to be displayed. The following table describes the recognized x arguments for the read command: Read Argument any card card_w_pin check Description Read any type of data. This option is equivalent to read without any arguments. Read magnetic stripe card. Display message (msg 1) if defined.
MagTek Device Drivers for Windows Read Argument chk_or_card key_press key_string 24 Description Read magnetic stripe card or check data. When a card or check is swiped through the device, the driver sends the respective response. Display a message (msg4) on the LCD screen, if available, and wait for a key on the keypad to be pressed. The device will wait for entry_tout seconds for the key press (by default 0 for no timeout).
Section 3. Commands Read Argument pin Description Collect PIN from cardholder and read PIN data from the device. The following properties may be set before issuing this command: • account_no – cardholder account number, including check digit, if required • amount – transaction amount in cents, without punctuation, if required • enc_key – (MSK mode only) encryption key to use: M for master, S for session, 0-3 for lower working keys, A-J for upper working keys.
MagTek Device Drivers for Windows reset Function Syntax Errors Remarks Reset the device. /reset none Clear any pending operations and reset the device to initial state. This does not affect any of the properties. Example To return a device to its initial state: Command Response /reset none set Function Syntax Set a property. /set prop val prop is one of the valid properties (R/W) shown in Section 2. Properties val represents the value of that property.
Section 3. Commands write Function Syntax Errors Data encode command. /write data /write 94 Encode is not supported on this device. /write 34 The data field was in the incorrect format. /write 82 The write command was canceled. /write 45 Device in wrong mode (e.g., if /read already issued) /write 60 Error during write operation (e.g.
MagTek Device Drivers for Windows 28
SECTION 4. MAGNETIC CARD DATA PARSING This section describes the flexible data parsing language to be used by the MagTek device drivers to parse specific fields from magnetic card data and expose those fields as properties which may be retrieved by an application using the /get command. The data parsing language is flexible in that it can define both standard and custom formats to be parsed by the driver.
MagTek Device Drivers for Windows • • • Property names specified in format rules are 11 characters or less, consisting of alphabetic characters, digits, and ‘_’. The property name begins with an alphabetic character. Properties used in format strings do not conflict with properties defined by the driver. If there is a duplicate property (e.g., dev_version) specified in the format strings, the driver will return the value of the parsed property rather than the device version string.
Section 4. Magnetic Card Data Parsing If the driver is successful in applying one of the rules, the name of the applied format is available in the property applied_fmt. LANGUAGE FORMAT Format Name (fmtx_name) The format name specifies an identifier by which to identify the format template and/or rules being applied. The maximum length of this property is 11 characters. The names can be repeated on subsequent templates.
MagTek Device Drivers for Windows A format rule describes how the data is to be parsed. Characters that must be matched as literals are placed as is in the string or preceded with a ‘\’ if the character is one of the following: ‘[’, ‘]’, ‘(’, ‘)’, ‘*’, ‘_’, ‘<’, ‘>’, ‘:’, ‘.’, or ‘\’. Fields that are either to be parsed or ignored are contained within <>. The format rules string cannot exceed 1027 characters.
Section 4. Magnetic Card Data Parsing Field Type Literal Example ^ Non-ASCII literal \r, \n, \\, \xhh Optional choice (x|y|…) Optional field [x] Optional track {xy} Description A literal is placed in the string as is and is used to determine if a particular format should be applied and to mark the end of a variable-length field. Specify an escape character or non-ASCII character.
MagTek Device Drivers for Windows The property name can also contain a modifier at the end preceded by a ‘:’ which specifies the type of data to store in that property. For example specifies that customer name should contain alphabetic characters, spaces, and punctuation. The modifier may also be used with ignore-fields (i.e., <*>). If no modifier is provided, any type of characters is assumed.
Section 4. Magnetic Card Data Parsing DEFAULT FORMATS The MTD drivers will be assigned parameters with default formats for parsing magnetic stripe data. The formats will be placed in the INF file for the driver and written to the registry when the driver is installed. Some examples are shown below; more are included with the drivers. In these examples, spaces are inserted between fields for readability; they should not be included in the actual rules.
MagTek Device Drivers for Windows fmt5_name "AAMVA" fmt5_template"%<*>?;<*>?{(+|%|#|!)<*>?}" fmt5_rules "{%^$$^^<*>? ;<*[6]>=<*>? {(+|!|#|%)<*[2]><*[16]> <*>?}}, {%^$^^<*>? ;<*[6]>=<*>? {(+|!|#|%)<*[2]><*[16]> <*>?}}" In the examples for CADL (Califo
Section 4. Magnetic Card Data Parsing The application issues /get applied_fmt. The driver responds with /get applied_fmt BankCard. The application issues /get FirstName to the driver. The driver responds with /get FirstName JOHN. The application issues /get LastName to the driver. The driver responds with /get LastName SMITH. The application issues /get PAN to the driver. The driver responds with /get PAN 1234567890074589. The application issues /get ExpDate to the driver.
MagTek Device Drivers for Windows 38
SECTION 5. EXAMPLE APPLICATIONS While each application in this section is oriented toward a specific programming language, different devices are addressed in each example. It may be useful for the reader to look at all examples to understand how the MagTek Windows Drivers can operate with various MagTek devices. PROGRAMMING HINTS When opening a Keyboard Wedge device, the application must wait for any key press to complete, e.g., ALT-0. The application should wait until all keys have been released.
MagTek Device Drivers for Windows ' The form needs to contain: ' 1) an "MSComm" object named MSComm1 ' ' 2) a button named btnStart, should be set to Enabled and Visible with the caption "Start" ' ' 3) a button named btnRead, should be set to Disabled and Visible with caption "Read" ' ' 4) a button named btnExit, should be set to Enabled and Visible with caption "Exit" ' ' ' 5) a text box named txtInfo, should be set to Visible, Enabled and MultiLine containing initial text of "Click the Start butto
Section 5. Example Applications MSComm1.Output = "/read card" & Chr$(10) ' ' ' ' If the device has check reading capability, then the following command would be used to read only the check data MSComm1.Output = "/read check" & Chr$(10) ' ' ' ' If the device can read only one media type (e.g. a card reader) then the read command "/read" command can be is issued by itself. MSComm1.
MagTek Device Drivers for Windows ' will hold the numeric port number Dim PortNumber As Integer ' prevent the Start button from being pressed again btnStart.Enabled = False txtInfo.Text = "Please wait. txtInfo.Refresh Opening the port as File IO" ' declare space for an input buffer buf$ = String(2000, Chr$(0)) ' If the virtual serial port number is unknown, it can be ' obtained by opening the driver in "File" mode with ' the "Friendly Name" and asking for the virtual COM port number.
Section 5. Example Applications If Err.Number <> 0 Then ' Process error using Err.Description ' contains error description for the demo, ' we'll just display it txtInfo.Text = Err.
MagTek Device Drivers for Windows ' Set the com port number retrieved from the response MSComm1.CommPort = PortNumber ' Open the com port and establish communications with the device MSComm1.PortOpen = True ' enable the read button btnRead.Enabled = True txtInfo.Text = "Click on the Read button to read a” _ & “card or Exit to quit." Else ' If we got here, then the device did not open correctly ' as a file IO so some kind of error handling is needed txtInfo.
Section 5. Example Applications C++ EXAMPLE The following is an example of C++: /* /* /* /* /* /* /* -------------------------------------------------------------------------- */ TST: Test Application */ */ MTDTEST.C - Test module for Mag-Tek device drivers */ -------------------------------------------------------------------------- */ Version 1.00 $Revision:: $ */ -------------------------------------------------------------------------- */ #include #include #include #include
MagTek Device Drivers for Windows /** clear overlapped structure */ memset ( &ov_r, 0, sizeof (ov_r) ); memset ( &ov_w, 0, sizeof (ov_w) ); if (argc < 2) drv_h = OPEN_DEVICE ("COM5"); /* Must Specify proper COM# as default */ else drv_h = OPEN_DEVICE (argv[1]); if (drv_h == INVALID_HANDLE_VALUE) { ws = GetLastError(); printf("Can NOT open device : %s. Error : 0x%lx", "", ws); return ( stage); } { DCB dcb; GetCommState(drv_h, &dcb); dcb.BaudRate = CBR_9600; dcb.Parity = NOPARITY; dcb.ByteSize = 8; dcb.
Section 5. Example Applications NULL, // address of thread security attributes 0L, // initial thread stack size, in bytes (LPTHREAD_START_ROUTINE)input_thread,// addr of thread function NULL, // argument for new thread 0L, // creation flags 0-run immediately &retdw // address of returned thread identifier ), "Can't Create input thread" ); in_threadh = ret_h; Sleep(100); printf("\nTest Console started. (press <^Z> to terminate).
MagTek Device Drivers for Windows } #else gets(str); strcat(str, "\n"); ch = str[0]; #endif switch (ch) { case 0x1a: // - emergency exit printf("\n---Exit---\n");//@@ quit = TRUE; break; default: if (ch < 0x100) { BOOL rs; DWORD ret_len; #ifdef SINGLE_CHARS rs = WriteFile(drv_h, &ch, 1, &ret_len, &ov_w); #else rs = WriteFile(drv_h, str, strlen(str), &ret_len, &ov_w); #endif if (!rs) { ws = GetLastError (); if ( ws != ERROR_IO_PENDING) printf("DeviceIOControl (Write) Error : %i (0x%x)\n", ws, ws );
Section 5. Example Applications DWORD char char* read_len=0; wbuff[1]; p; while (!quit) { rs = ReadFile(drv_h, wbuff, sizeof(wbuff), &read_len, &ov_r); if ( !rs) { rs = GetLastError (); if ( rs != ERROR_IO_PENDING) { printf("DeviceIOControl (Read) Error : %i (0x%x)\n", rs, rs ); break; } } rs = WaitForSingleObject ( ov_r.
MagTek Device Drivers for Windows C#.NET EXAMPLE Active control names Source (Form1.CS) using using using using using using System; System.Drawing; System.Collections; System.ComponentModel; System.Windows.Forms; System.Data; namespace MTD_Example { /// /// Example code for using the MTD Driver with C#.Net /// public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.Button btnOpen; private System.Windows.Forms.TextBox txtCommand; private System.Windows.Forms.
Section 5. Example Applications public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.
MagTek Device Drivers for Windows this.btnOpen.TabIndex = 0; this.btnOpen.Text = "&Open Port"; this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click); // // txtCommand // this.txtCommand.Location = new System.Drawing.Point(8, 136); this.txtCommand.Name = "txtCommand"; this.txtCommand.Size = new System.Drawing.Size(376, 20); this.txtCommand.TabIndex = 1; this.txtCommand.Text = "/read"; // // lblCommand // this.lblCommand.AutoSize = true; this.lblCommand.Location = new System.Drawing.
Section 5. Example Applications this.btnClose.Size = new System.Drawing.Size(80, 20); this.btnClose.TabIndex = 6; this.btnClose.Text = "&Close Port"; this.btnClose.Click += new System.EventHandler(this.btnClose_Click); // // nudComPort // this.nudComPort.Location = new System.Drawing.Point(16, 24); this.nudComPort.Maximum = new System.Decimal(new int[] { 16, 0, 0, 0}); this.nudComPort.Minimum = new System.Decimal(new int[] { 1, 0, 0, 0}); this.nudComPort.Name = "nudComPort"; this.nudComPort.
MagTek Device Drivers for Windows // this.lblOpenResults.AutoSize = true; this.lblOpenResults.Location = new System.Drawing.Point(8, 64); this.lblOpenResults.Name = "lblOpenResults"; this.lblOpenResults.Size = new System.Drawing.Size(68, 13); this.lblOpenResults.TabIndex = 12; this.lblOpenResults.Text = "Open results"; // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(496, 267); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.
Section 5. Example Applications axMSComm1.PortOpen = true; if(!axMSComm1.PortOpen) { txtOpenResults.Text="Port failed to open"; return; } else { txtOpenResults.Text="Port opened " + axMSComm1.CommPort; } btnSend.Enabled=true; btnOpen.Enabled=false; btnClose.Enabled=true; } // // Close the comm (MTD) port // private void btnClose_Click(object sender, System.EventArgs e) { if(axMSComm1.PortOpen) { axMSComm1.PortOpen = false; } txtOpenResults.Text="Port closed"; btnClose.Enabled = false; btnSend.
MagTek Device Drivers for Windows C EXAMPLE #include #include
Section 5. Example Applications HANDLE oev_write = CreateEvent(NULL,TRUE,FALSE,NULL); OVERLAPPED ov_write; DWORD dwWriteStatus=0; ZeroMemory(&ov_write, sizeof(OVERLAPPED)); ov_write.hEvent = oev_write; DWORD dwLen = strlen(lpParam); BOOL bDone=FALSE; while (!bDone) { if(!WriteFile(*phMTD, lpParam,dwLen,lpdwWritten,&ov_write)) { dwWriteStatus = WaitForSingleObject (ov_write.
MagTek Device Drivers for Windows int main(int argc, char* argv[]) { HANDLE hMTD; OpenMTD(&hMTD); char sBuffer[BUF_LEN]=""; DWORD dwLenRet=0; WriteMTD(&hMTD,"/rawxact 44\r\n",&dwLenRet); ReadMTD(&hMTD,sBuffer,BUF_LEN,&dwLenRet); printf("%s\n",sBuffer); CloseMTD(&hMTD); return 0; } 58
Section 5. Example Applications POWER BUILDER EXAMPLE The following example illustrates how to set up PowerBuilder (from Sybase) to read magnetic data from the IntelliPIN device. Since PowerBuilder does not interface to a serial port very easily, a third-party OCX is required. The first part of this application note shows how to load an ActiveX component. The main program script shows how to interface with the OCX, the MTD Windows Driver, and the MagTek device (in this case the IntelliPIN).
MagTek Device Drivers for Windows 8. Close the PowerScript Painter window and answer “Yes” to “Save changes…”. 9. Close the Window Painter window and answer “Yes” to “Save changes…”. At the “Save Window” dialog box, enter “ole_io” then click “OK”. 10. Open the PowerScript window for the main application and integrate the following commands into the application. (This demo application prompts the user to read a card. The program will continue to loop until the “Cancel” button is pushed.
APPENDIX A. INSTALLATION AND SETUP The distribution CD contains the MTD Driver files for many of the MagTek products. When the files are acquired from the Internet, unzip the files into an installation directory (DISK1) and run the setup from that location. In addition to the drivers, there are many files that are required to support the installation and operation of these drivers.
MagTek Device Drivers for Windows Installing USB HID Devices on Windows 2000 and XP Note Do not attach the USB HID Swipe reader until the MTD Disk image has been created and the MTD Drivers have been installed. During installation of the MTD Drivers, select Port-Powered Swipe Reader; it will be used to communicate with the USB HID Swipe reader. After the disk image has been created and the MTD Drivers have been installed, follow the steps below to install the USB driver: 1.
Appendix A. Installation and Setup 5. Select Search for a suitable driver… and click Next. 6. Check Specify a location then click Next. 7. Enter the location of the USB HID folder and click OK. At the next screen, click Next.
MagTek Device Drivers for Windows 8. When the driver is being copied, Windows will indicate that the Digital Signature is not found. 9. Answer Yes,. then complete the next sequence of dialog boxes as you did above. Wait for TI UMP Port add hardware wizard and repeat from step 4. 10. After the driver has been installed, run ISConfigDlgMFC.exe (found in C:\Program Files\MagTek\MTDInstall). 11. Click the Change button next to the Port Powered Swipe Reader entry.
Appendix A. Installation and Setup 12. Select USB as the Physical Port then click OK. 13. The USB HID Swipe Reader will now be available to the MTD application on the virtual port number identified in step 11 above. Installing MTD Drivers The MTD Drivers can be easily installed on any supported Windows operating system simply by running the setup program on the installation disk. After the installation begins, follow the instructions on the screen.
MagTek Device Drivers for Windows Use the next window to select the MagTek devices that will be used. If you do not plan to use OPOS, you can deselect this box. Be sure to click on the box for each MTD drivers to be installed.
Appendix A. Installation and Setup After all required drivers have been selected, click Next. After the necessary files have been copied, you will be requested to indicate the physical and logical configuration. This process is slightly different on different version of Windows. If using Windows 98 or ME, skip to section Installing on Windows 98 and ME below.
MagTek Device Drivers for Windows Installing on Windows NT, 2000 and XP With Window NT, 2000, and XP, you will use the MTD Configurator to set the device properties. You will have to select a virtual port for each device that has been installed. Each RS-232 serial device will have to be configured but keyboard wedge devices do not have to be configured. You can either accept the default friendly name, or you can modify it to match your system requirements.
Appendix A. Installation and Setup Click Finish after all device instances have been configured. After the devices have been configured, the installation program will complete the process by copying the appropriate files and configuring the system. If you have installed a keyboard wedge device, the Keyboard Hook Driver will have to be installed. Windows 2000 and XP try to ensure that certain drivers have been authorized for installation.
MagTek Device Drivers for Windows Then click Continue Anyway to complete the installation. Go to the Completing the Installation below. Installing on Windows 98 and ME For Window 98 and ME, you will be presented with a properties box for each device.
Appendix A. Installation and Setup Click OK after selecting the correct transport. The device properties box for each device will pop up. You will need to define the Port Name (virtual port) for each device. Unless you have a reason to select a specific COM port, you can usually leave the default value. Change the friendly name if necessary and specify the physical port to which the device is connected. In some cases, you may need to modify the communication settings; if so, click the Advanced… button.
MagTek Device Drivers for Windows After all of the settings have been verified, click OK. You can then use the Test button to confirm that the device has been installed properly and is operating correctly. If the device is not connected, you can bypass this step. Completing the Installation All the files have been copied and all of the settings have been confirmed. Click Finish.
Appendix A. Installation and Setup When the computer restarts, you will be able to use any application that communicates with the MTD drivers. Modifying MTD Driver Installation If you need to add a new device or modify one of the existing devices, you may run the setup program from your original location or you can go to the control panel and use the Add/Remove Programs applet. If you choose the latter approach, select MagTek Device Drivers (MTD) and click Add/Remove.
MagTek Device Drivers for Windows If you select Modify then click Next, you will be presented with the same selections you had when you initially installed the MTD Drivers. At this point, you can either choose to uncheck any existing devices (effectively removing that driver) or to add new ones.
Appendix A. Installation and Setup 4. Select the Settings tab to view the driver configuration. Port Name indicates the virtual port number and Connect to indicates the physical port. 5. Click the Advanced button to view the communication settings. Some devices (e.g., MICR+) support automatic settings, which allow the driver to determine the present setup of the device.
MagTek Device Drivers for Windows required, click the Specify settings manually radio button and modify the communication setup. Click OK when done. Modifying Device Settings in Windows NT/2000/XP If you do not need to add or remove one of the device drivers but wish to modify one of the device’s configuration parameters, you do not have to go back to the original installation disk. You can use the Configurator program that you used during the installation of the drivers.
Appendix A. Installation and Setup This will bring up the Configurator showing all of the installed devices. You can make changes to any of the parameters as required. For example, if you need to change the Virtual Port number, use the pull down to modify the setting. If you need to change one of the communication settings on a serial device, click the Configure… button. Now you can change any of the settings as required. Click OK when all settings are correct. Then click Finish in the main dialog box.
MagTek Device Drivers for Windows AUTOMATING MTD DRIVER INSTALLATION In order to automate MTD driver installation, pre-select the Magtek device(s) in the text file MTDINST.INI. This file is provided on the installation CD. If no devices are selected in this MTDINST.INI file then installation runs in normal mode. This is the default setting from the factory. Pre-selecting The Device(s): There is a section “INSTALL” in the mtdinst.ini file. This section lists all the devices.
Appendix A. Installation and Setup Installing Generic Driver: The Generic driver supports RS-232 device and wedge devices. Set “Generic” to 1 under the “INSTALL” section. By default Generic is set to 0. If you have selected to install the generic driver then change the device settings under the “Generic” section. If you want the generic driver for an RS-232 device then change the value of PortName, UsePort, baud, datasize, stopbits, and parity under the “Generic” section.
MagTek Device Drivers for Windows Installing IntelliPIN: Set :IntelliPIN” to 1 under the “INSTALL” section. If you have selected to install the IntelliPIN driver then change the device settings under the “IntelliPIN” section. If the IntelliPIN is a RS-232 device then change the value of PortName, UsePort, baud, datasize, stopbits, and parity.
Appendix A. Installation and Setup Installing MiniMICR: Set MiniMICR to 1 under the “INSTALL” section. If you have selected to install the MiniMICR driver then change the device settings under the “MiniMICR” section. If the MiniMICR is a RS-232 device then change the values of PortName, UsePort, baud, datasize, stopbits, and parity.
MagTek Device Drivers for Windows Installing MT-85: Set “MT-85” to 1 under the “INSTALL” section. If you have selected to install the MT-85 driver then change the device settings under the “MT-85” section. Change the value of PortName, UsePort, baud, datasize, stopbits, and parity. Example: [MT-85] DEVICE= MT-85 FriendlyName= MT-85 PortName=COM8: UsePort=COM1: baud=9600 datasize=7 stopbits=1 parity=EVEN Installing MT-95: Set “MT-95” to 1 under the “INSTALL” section.
Appendix A. Installation and Setup Installing Port Powered Swipe Reader: Set “PPSR” under the “INSTALL” section. If you have selected to install the Port powered swipe reader driver then change the device settings under the “PPSR” section. Change the value of PortName, UsePort, baud, datasize, stopbits, and parity.
MagTek Device Drivers for Windows Installing Port powered Insert Reader: Set “PPIR” under the “INSTALL” section. If you have selected to install the Port powered insert reader driver then change the device settings under the “PPIR” section. Change the value of PortName, UsePort, baud, datasize, stopbits, and parity.
Appendix A. Installation and Setup Installing MiniWedge: Set “MiniWedge” to 1 under the “INSTALL” section. . If you have selected to install the MiniWedge driver then change the device settings under the “MiniWedge ” section. Only PortName needs to be changed. The UsePort is already set to “KB:”. Example: [MiniWedge] DEVICE=MiniWedge FriendlyName=MiniWedge PortName=COM5: UsePort=KB: Installing USB HID Swipe Reader: Set “PPSR” to 1 under the “INSTALL” section.
MagTek Device Drivers for Windows Sample MTDINST.
Appendix A.
MagTek Device Drivers for Windows UNINSTALLING OLD MTD VERSIONS If your system contains MTD drivers with a version prior to 1.12, you will need to uninstall them before installing the version 1.12 MTD drivers.
Appendix A. Installation and Setup Uninstalling Old Drivers from Windows 95, 98/ME Caution The following assumes familiarity with the Registry Editor. Improper use of the Registry Editor can cause Windows to cease to function. Please follow the instructions carefully. Complete removal of the drivers requires two steps: (1) remove the drivers from the system using the Device Manager and (2) remove the driver files manually after all devices have been removed by the Device Manager.
MagTek Device Drivers for Windows 7. 8. 9. MAGCxxx.DLL (locale specific) Find and remove the copy of the MagTekOEMSETUP.INF file made by Windows. In release 1 of Windows 95, it is located in C:\Windows\inf\. With the OSR2 release of Windows 95 (Win95B) and Windows 98/ME, the files will be located in C:\Windows\inf\other\. Run the Registry Editor by clicking on Start button then select Run. Type REGEDIT into the text box and press the Enter key.
Appendix A. Installation and Setup Uninstalling Old Drivers from Windows NT Close any application that may have the MTD driver open before attempting to uninstall it. Failure to do this will cause the uninstallation to fail−after that the system must be re-booted before a subsequent attempt to uninstall the driver could be performed. The driver can be uninstalled by using the Windows NT Installation Wizard. Open the Wizard by doubleclicking on the Add/Remove Programs icon in the Control Panel.
MagTek Device Drivers for Windows 8. Click the Update Driver button to load the “Update Device Driver Wizard”. 9. Click the Next button to advance to the next screen. 10. Select the “Search for a suitable driver…” radio button. 11. Click Next button to advance to the next screen.
Appendix A. Installation and Setup 12. Uncheck all “Optional search locations” check boxes. 13. Click Next to advance to the next screen. 14. Check “Install one of the other drivers” check box. 15. Click Next to advance to the next screen.
MagTek Device Drivers for Windows 16. Select “Standard 101/102-Key or Microsoft Natural PS/2 Keyboard” driver. 17. Click Next to advance to the next screen. 18. Answer Yes to the “Confirm Device Install”. (Note: This uninstallation procedure may hang at step 18. This is a non-disruptive hang-up. User should wait 10 seconds and do a hard reboot. Windows 2000 should recover without a system check or scan disk.
Appendix A. Installation and Setup 1. Open the Control Panel and double click on the “System” icon. 2. Click on the “Hardware” tab. 3. Click on the Device Manager button. 4. Click on the ‘+’ to expand the “Keyboards” entry in the Device Manager list. 5. Right click on the “PC/AT Enhanced PS/2 Keyboard (101/102-Key)” entry. 6. Click the Properties item in the dialog box. 7. Click on the “Driver” tab. 8. Click the Update Driver button. 9. Select “Install the software automatically…” option.
MagTek Device Drivers for Windows Using the MTCFG Utility (WNT/2000/XP) While the Configurator program will usually be adequate to make changes to the MTD device installation, you may need to have more control in certain situations. For instance, you may need to investigate a problem with the installation of a particular device driver. The MTCFG utility offers more capability in dealing with the MTD drivers; however, it should only be used if the Configurator cannot be used for a particular case. MTCFG.
Appendix A. Installation and Setup mtcfg COMx –all | more The pipe symbol and “more” will present the information one screen at a time. Configuring New Devices (WNT/2000/XP) To add a new device use the following command syntax: mtcfg port-name model or mtcfg port-name model settings port-name is the name (virtual port) chosen for the new device. It must not be used by another device in the system (MagTek or other). The port name in the form COMxxx (valid values are COM5 .. COM255).
MagTek Device Drivers for Windows Device or driver Generic RS-232 Generic KB IntelliPIN RS-232 IntelliPIN RS-232 IntelliPIN KB Mag-Wedge MICR+ Mini MICR RS-232 Mini MICR KB MiniWedge MT-85 MT-95 Port Powered Insert Reader Port Powered Swipe Reader Command Line MTCFG COM5 "Generic Serial (RS232)" FriendlyName=MT-80 UsePort=COM1 baud=4800 parity=0 datasize=7 MTCFG COM6 "Generic Wedge (Keyboard)" FriendlyName=MagReader MTCFG COM7 "IntelliPIN MICR Aux" FriendlyName=IntelliPIN "UsePort=AUX port on MICR+"
Appendix A. Installation and Setup Name baud parity datasize stopbits UsePort FriendlyName EnableFDP PortName Use (optional, used for serial devices only) device’s baud rate, specified as an integer (e.g., 9600) (optional, used for serial devices only) an integer specifying the parity used by the device: use -1, 0, 1, 2, or 3 for None, Even, Odd, Space and Mark parity respectively. (optional, used for serial devices only) specifies the device’s serial word size in bits: 7 or 8.
MagTek Device Drivers for Windows File or Directory Name 100 DESCRIPTION \EXAMPLES\CPP Visual C++ example application (executable and source).
APPENDIX B. COMMAND LIST SUMMARY This is a consolidated list of all available commands for the MagTek Windows Drivers. Command /cancel cmd /display [x] /echo string /event n data /get prop /load_key n key /rawrecv /rawsend x /rawxact x /read [[x] y] /reset /set prop val /ver /write data Description Cancel a command. cmd can be any of the transaction commands. Display a message or two alternating messages on the LCD screen. Driver test command. Response to an unsolicited event notification. Get a property.
MagTek Device Drivers for Windows 102
APPENDIX C. STATUS CODES The following table defines the status codes returned in command responses. Note that it is not meant as a complete list of status codes–new codes may be added as necessary.
MagTek Device Drivers for Windows 104
APPENDIX D. DEVICE DRIVER SUMMARIES This section contains summaries of Device Drivers for the for the following models: • • • • • • • • • • IntelliPIN MagWedge Reader MiniWedge Reader MICR+ Reader Mini-MICR Reader Port Powered RS-232 Swipe Reader Port Powered RS-232 Insertion Reader MT-85 Encoder MT-95 Encoder Generic The summary for each model contains a list of the commands properties supported.
MagTek Device Drivers for Windows INTELLIPIN PINPAD & MSR File Name IPIN Friendly Name(s) IntelliPIN RS-232, IntelliPIN Wedge & IntelliPIN MICR+ Aux Remarks The Automatic Settings in the properties sheet are not supported; the communications must be specified manually. When using the IntelliPIN on the MICR+ Aux port, the MICR+ driver must be installed before the IntelliPIN driver; also the IntelliPIN driver must be closed before the MICR+ driver is closed.
Appendix D. Device Drive Summaries MAGWEDGE SWIPE READER File Name MAGWEDGE Friendly Name(s) MagWedge Remarks The driver cannot determine which tracks are supported on the device, so the c_tracks and trk_enable properties will always indicate 111.
MagTek Device Drivers for Windows MINIWEDGE MSR File Name MINIWEDG Friendly Name(s) MiniWedge Remarks When operating in the Windows Driver mode, the MiniWedge transmits data as ASCII characters instead of scan codes in order to reduce the transmission time. (A full 3-track card can be transmitted in about 0.5 second whereas in the non-driver mode it would take almost 4 seconds.
Appendix D. Device Drive Summaries MICR+ CHECK READER & MSR File Name MICRPLUS Friendly Name(s) MICR+ Remarks These devices may or may not have an MSR installed. If not installed, the driver may not properly indicate the c_tracks capability.
MagTek Device Drivers for Windows MINI MICR CHECK READER & MSR File Name MINIMICR Friendly Name(s) Mini MICR RS-232 & Mini MICR Wedge Remarks These devices may or may not have an MSR installed. If not installed, the driver may not properly indicate the c_tracks capability.
Appendix D. Device Drive Summaries PORT-POWERED RS-232 SWIPE READER File Name MTPPSWIP Friendly Name(s) Port-powered swipe reader Remarks This driver supports all port-powered swipe readers.
MagTek Device Drivers for Windows PORT-POWERED RS-232 INSERTION READER File Name MTPPINSR Friendly Name(s) Port-powered insert reader Remarks If events_on is enabled, the driver will send /event 1 M when the card is inserted. It is suggested that events be disabled (/set events_on 0) before the data is read to prevent the removal event from being included at the end of card data. If a card has already been inserted when the driver is opened, there will not be any notification when events_on is enabled.
Appendix D. Device Drive Summaries MT-85 LOCO ENCODER MT85 Friendly Name(s) MT-85 Remarks The driver attempts to connect to the device by automatically scanning all connection modes.
MagTek Device Drivers for Windows MT-95 HICO ENCODER File Name MT95 Friendly Name(s) MT-95 Remarks Commands Supported /cancel cmd /set prop val /ver X X /rawxact x X /write data X /read [[x] y] X X X /rawsend x /event n data /get prop X /load_key n key /rawrecv /display [x] /echo string /reset X X X Properties Supported Property account_no amount applied_fmt c_card_stat c_cardwpin c_check c_events c_keypress c_keystring c_magnetic c_mechanics c_pin c_smart c_tracks c_write c_wr_secur
Appendix D. Device Drive Summaries GENERIC GENERIC Friendly Name(s) Generic Remarks This driver only supports raw commands. None of the properties are supported.
MagTek Device Drivers for Windows 116
INDEX A Access to the device ..................................................6 account_no...............................................................11 Action properties .......................................................3 Adding New Devices (WNT) ..................................97 amount .....................................................................11 any - Read Argument...............................................23 Asynchronous devices ...............................................
MagTek Device Drivers for Windows Driver benefits ...........................................................2 Echo Command .......................................................17 enable_cmc7 ............................................................12 enc_key....................................................................13 enc_key_sn ..............................................................13 enc_mode.................................................................
Appendix D. Device Drive Summaries N Non-interactive commands........................................4 Notation Conventions ..............................................16 O offline_enc...............................................................14 Open a device ........................................................5, 6 oper_tout..................................................................14 Operational Timeout (oper_tout) .............................14 OPOS.....................................
MagTek Device Drivers for Windows visa_mac1-3.............................................................14 Visual Basic...............................................................2 Visual Basic Example..............................................39 W wr_coer ....................................................................14 120 wr_secure.................................................................14 Write Command ......................................................27 X xact_type........