IDTECH SecuRED Encrypted Magstripe Reader
JPOS Reference Guide for Windows
Document Revision: A. 9/9/13
Model Number: 80128504-001
Table of Contents
- Introduction
- System Requirements
- Reference Document
- Environment Build
- Run POSTest
- A Sample for using MSR JPOS
1. Introduction
This document provides information for using JPOS Service Object (SO) for MSR readers.
2. System Requirements
This JPOS Service Object is for Windows XP, Windows Vista, Windows 7 and Windows 8.
3. Reference Document
- Unified POS Retail Peripheral Architecture Version 1.13.1
- International Standard for Implementation of Point Of Service Peripherals
4. Environment Build
Install Sun JRE 1.5 or JDK 5.0, JRE 6 or JDK 6, JRE 7 or JDK 7.
Download the newest JRE 1.5 installation package from: http://java.sun.com/j2se/1.5.0/download.jsp, then click: Download JDK 5.0 Update and select a proper platform JDK version to download. Install the package and make sure the "java" command functions properly. There may be a need to add the JRE bin directory into the system environments variables by following steps:
For Microsoft Windows XP
- Right click "My Computer" in the desktop
- Select the "properties" menu item
- Select "Advanced" tab
- Click button "Environment Variables"
- Select "Path" and insert the JRE bin directory.
When Java is working, the following can be observed in the command prompt:
C:\>java Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -client to select the "client" UM -server to select the "server" UM -hotspot is a synonym for the "client" UM [deprecated] The default UM is client. -cp <class search path of directories and zip/jar files>
Enter DOS command shell, and enter java. It shows information about how to use.
File Lists
The following files are included:
jmsrso.jar
- JPOS device service control for MSRjpos.xml
- jpos configure filejpos.properties
- jpos configure file, specifiesjpos.xml
com_securemsr_connector_JNIConnector.dll
- JNI DLLusbkbConnector.dll
- extension DLLkbhidConn.dll
- wrap DLL to usbhid and kbhidusbhidConn.dll
- extension DLL to access usbhidMSRKeyboardHook.dll
- extension DLL
The .DLL files should be located in a directory specified in the PATH environment variable. For example, if the current working directory is included in the PATH variable, set PATH=%PATH%;.
.
Device Names: The jpos.xml
file specifies the device names. Several entries exist in this file, with entry names such as:
- "defaultMSR"
- “IDTECHSECURED_USBHID"
- “IDTECHSECURED_USBKB"
- “IDTECHSECUREMAG_USBHID”
- “IDTECHSECUREMAG_USBKB”
- “IDTECHMINIMAG_USBHID
- “IDTECHMINIMAG_USBKB"
- “IDTECHVALUEMAG_USBHID"
- “IDTECHVALUEMAG_USBKB"
- “IDTECHMSR_PS2KB"
- “IDTECHMSR_RS232"
- “IDTECHMSR_USBCDC"
"defaultMSR" is a copy of another entry and serves as the default name for the POSTest program.
The line <prop name="connector" type="String" value=" usbhid/0acd/2810 "/>
specifies the connector driver name and configuration value. 0acd
is the IDTECH Vendor ID; 2810
is the product ID.
jpos/res/jpos.properties: This file specifies which configure file is used. By default, it specifies the “jpos.xml”. Add jmsrso.jar
to your CLASSPATH or specify it in the javac / java command.
Example:
set CLASSPATH=%CLASSPATH%;yourDir\jmsrso.jar For example: if jmsrso.jar is placed in c:\so, it should be: set CLASSPATH=%CLASSPATH%;c:\so\jmsrso.jar
5. Run POSTest
POSTest is the official recommended JPOS compatible test program. The release version includes the program, or it can be obtained from http://sourceforge.net/projects/postest/.
Steps:
- Unzip the file to a directory, for example,
c:\temp
. - The directory structure should be similar to this:
Enter "c:\temp" Postest directory under the DOS command shell:
C:\temp>dir Volume in drive C is NEW SYS Volume Serial Number is AC64-BBF1 Directory of C:\temp ... <DIR> dest <DIR> ext <DIR> lib <DIR> POStest 0 bytes 5,738,045,440 bytes free
Then enter subdirectory "POStest":
C:\temp>cd POStest C:\temp\POStest>
Then enter the following command to run POSTest:
C:\temp\POStest>postest
A POSTest program screen will appear, showing:
POSTest
The JavaPOS Device Tester.
v1.13.1
POStest is a community project under the direction of the JavaPOS working group. Original code donated by 360 Commerce.
Contributors:
- Jeff Lange - Ultimate Technology Corporation
- Rory K. Shaw - IBM/Raleigh RSS Drivers and Diagnostics
- William White - IBM/Raleigh Retail Store Solutions
- Bracci A. Sistemi Digitali s.r.l. Pisa (Italy)
Using the MSR Tab in POSTest:
- Click the "MSR" Tab.
The screen shows fields for MSR Reading, Authentication, and MSR Writing. Key fields include:
- Logical name:
defaultMSR
- Track 1 Data, Track 2 Data, Track 3 Data, Track 4 Data
- Track 1 Encrypted Data, Track 2 Encrypted Data, Track 3 Encrypted Data, Track 4 Encrypted Data
- Additional Security Information
- Account number, Expiration date, Title, First name, Middle initial, Surname, Suffix, Service Code
- Track 1 discretionary data, Track 2 discretionary data, Data Count
The logical name is the entry name in the jpos.xml
file.
- Click the "Open" button, and then "Claim". Three beeps should sound from the device, indicating successful connection.
- Check the choices "Data event enabled" and "Device enabled".
- Observe the text field and swipe a card. The data from the card swipes should appear in the respective Track Data fields.
- Click "Release" or "Close" to release or close the JPOS connection. NOTE: This ensures the device returns to its normal state.
- Click "EXIT" to quit the program.
For more details, please check http://www.javapos.com and the release help files.
6. A Sample for using MSR JPOS
The following code is a sample:
import jpos.*; import jpos.config.*; import jpos.config.simple.*; import jpos.loader.*; import jpos.loader.simple.*; import jpos.profile.*; import jpos.services.*; import jpos.util.*; import jpos.util.tracing.*; public class YourClass { public static void main(String[] args){ MSR msr = new MSR(); /* new an instance */ try{ msr.open(TestConst.testdevicename); }catch(JposException e){ System.err.print(e); } /** Do something here. */ try { msr.close(); }catch(JposException e){ System.err.print(e); } } }
Important Note: If the reader has been authenticated, the application should cancel the authentication before closing the POS. Otherwise, the reader will stay in the authentication state for 120 seconds.