Vous êtes sur la page 1sur 11

JavaPOS Driver User Guide for Windows V1.2.

12 October 10, 2011


1 NOTES.....................................................................................................................................................................2 2 Install the Java2 Runtime Environment...................................................................................................................2 3 Install the Honeywell Service Object and JavaPos files..........................................................................................2 4 How to use RS232 scanner with JavaPOS Driver...................................................................................................2 4.1 Configuring the Scanner via barcodes...............................................................................................................2 4.2 Running the JavaPOS Test utility to evaluate installation................................................................................4 4.3 How to Use Honeywell JavaPOS Driver at your application............................................................................4 5 How to use IBM OEM USB scanner with JavaPOS Driver...................................................................................5 5.1 Configuring the Scanner via barcodes...............................................................................................................5 5.2 Running the JavaPOS Test utility to evaluate installation................................................................................6 5.3 How to Use Honeywell JavaPOS Driver in your application...........................................................................6 6 How to use USB Serial scanner with java pos driver...............................................................................................7 6.1 Configuring the Scanner via barcode................................................................................................................7 6.2 Running the JavaPOS Test utility to evaluate installation...............................................................................7 6.3 How to Use Metrologic JavaPOS Driver in your application..........................................................................7 7 How to enable/disable Extended ASCII Support.....................................................................................................9 8 How to enable/disable ReM.....................................................................................................................................9 9 Check Health / BEL / Connect/Disconnect RS232 Scanner .................................................................................9 10 Disable Device On Close ...................................................................................................................................10 11 Enable Logging ...................................................................................................................................................11 12 How to use Scale with java pos driver.................................................................................................................11

Page 1 4/19/2013

1 NOTES.
The JRE used to create these directions was jre-1_5_0_10. Honeywell JavaPOS driver now is compatible with JavaPOS1.7, JavaPOS1.8, JavaPOS1.9 and JavaPOS1.10

2 Install the Java2 Runtime Environment


The JRE is Javas virtual machine that allows for applications to run on the target computer. The 1.5 version of the JRE is needed to run the JavaPOS application. (Note: If there is one JRE later than 1.5 has been existed at your system, its no need to reinstall one JRE again. So please ignore the following JRE install part.) Go to http://java.sun.com, and select this version of Java Runtime Environment. Install the program following the instructions.

3 Install the Honeywell Service Object and JavaPos files


Download HoneywellJPOS_v1.2.12 folder. It should have all the necessary files needed for JavaPOS driver usage. Set your application classpath so that it includes honeywelljpos.jar, jpos110.jar, RXTXComm.jar, xerces.jar and jpos folder. Also set your applications java library path so it contains all the dlls from HoneywellJPOS_v1.2.12 folder (HoneywellJNIHIDWin.dll, JScannerConfigUtilityWrapper.dll, rxtxParallel.dll, rxtxSerial.dll, ScannerConfigUtility.dll, zlib1.dll) and also copy the related JPosEntry option from the jpos.xml to your applications jpos.xml.

4 How to use RS232 scanner with JavaPOS Driver 4.1 Configuring the Scanner via barcodes
Scan the bar codes on the next page, in the sequence given, to configure the scanner. (Note: if you have a Stratos scanner, use one of the bar codes on page 3, instead of the ones on the other pages.)

Page 2 4/19/2013

JavaPOS configuration bar codes: (scan in order, left column, then right column)
Recall Defaults

9 9 9 9 9 8

Enable RS232

4 1 5 5 5 4

Enable STX Prefix

Enable ETX Suffix

Enable D/E Disable/Enable Commands

Enable LED brightness

If you have a Stratos Scanner/scale, scan ONE of the following bar codes to configure your scanner:

Page 3 4/19/2013

Scanning the following bar code will configure a single-cable Stratos for Metrologic OPOS/JPOS Single Cable RS232 Mode English.
JPOS English

9 9 9 9 5 8

Scanning the following bar code will configure a single-cable Stratos for Metrologic OPOS/JPOS Single Cable RS232 Mode Metric.
JPOS Metric

9 9 9 9 5 7

4.2 Running the JavaPOS Test utility to evaluate installation


If you have a scanner/scale, the scale needs to be entered as a separate device. It doesnt matter if it is single cable or dual cable. Please run the test application by running the MetroJPOStest.bat file from the downloaded HoneywellJPOS_v1.2.12 folder. The batch file will set all the environment variables assuming all the needed files are in the current HoneywellJPOS_v1.2.12 folder.

4.3 How to Use Honeywell JavaPOS Driver at your application


1. Refer section 3. 2. Please select one service object based on your JavaPOS version. Class com.honeywell.javapos.so.MetroScanRS232v17 com.honeywell.javapos.so.MetroScanRS232v18 com.honeywell.javapos.so.MetroScanRS232v19 com.honeywell.javapos.so.MetroScanRS232v110 JavaPos Specification 1.7 1.8 1.9 1.10

Page 4 4/19/2013

3. Modify the jpos.xml based on your JavaPos version/Scanner model/COM PORT. 4. Sample jpos.xml file content
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE JposEntries PUBLIC "-//JavaPOS//DTD//EN" "jpos/res/jcl.dtd"> <JposEntries> <!--Saved by JavaPOS jpos.config/loader (JCL) version 2.2.0 on 8/13/07 4:29 PM--> <JposEntry logicalName="MetroScannerRS232"> <creation factoryClass="com.honeywell.javapos.so.MetroScannerServiceFactory" serviceClass="com.honeywell.javapos.so.MetroScanRS232v19"/> <vendor name="Honeywell Scanning and Mobility" url="http://www.honeywellaidc.com"/> <jpos category="Scanner" version="1.7"/> <product description="Honeywell bar code scanner" name="Focus/1690" url="http://www.honeywellaidc.com"/> <!--Other non JavaPOS required property (mostly vendor properties and bus specific properties i.e. RS232 )--> <prop name="portName" type="String" value="COM1"/> <prop name="Interface" type="String" value="RS232"/> <prop name="dataBits" type="String" value="8"/> <prop name="Model" type="String" value="Focus/1690"/> <prop name="parity" type="String" value="None"/> <prop name="flowControl" type="String" value="None"/> <prop name="stopBits" type="String" value="1"/> <prop name="deviceBus" type="String" value="RS232"/> <prop name="baudRate" type="String" value="9600"/> <prop name=USBSerial type=String value=no/> <prop name=ConnectionDetectRS232 type=String value=true/> <!above property is used to enable checkHealth(), and direction(BELL) commands --> </JposEntry> </JposEntries>

5 How to use IBM OEM USB scanner with JavaPOS Driver 5.1 Configuring the Scanner via barcodes
Scan the bar codes below, in the sequence given, to configure the scanner to HID mode. JavaPOS configuration bar codes: (scan in order, left column, then right column)

Recall Defaults

9 9 9 9 9 8

FSUSB

Enable LED brightness


Page 5 4/19/2013

5.2 Running the JavaPOS Test utility to evaluate installation


Run the MetroJPOStest.bat file from the HoneywellJPOS_v1.2.12 folder. It is assumed that all the needed files are in the current folder. Check out the classpath and library path settings in the batch file. This will give you a good idea of the requirements for the application also.

5.3 How to Use Honeywell JavaPOS Driver in your application


1. Refer to section 3. 2. Please select one service object based on your JavaPOS version. Class com.honeywell.javapos.so.MetroScanFUSBv17 com.honeywell.javapos.so.MetroScanFUSBv18 com.honeywell.javapos.so.MetroScanFUSBv19 com.honeywell.javapos.so.MetroScanFUSBv110 JavaPos Specification 1.7 1.8 1.9 1.10

3. Modify the jpos.xml based on your JavaPos version/Scanner model/Interface. 4. Sample jpos.xml file content
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE JposEntries PUBLIC "-//JavaPOS//DTD//EN" "jpos/res/jcl.dtd"> <JposEntries> <!--Saved by JavaPOS jpos.config/loader (JCL) version 2.2.0 on 8/13/07 4:29 PM--> <JposEntry logicalName="MetroScannerFSUSB"> <creation factoryClass="com.honeywell.javapos.so.MetroScannerServiceFactory" serviceClass="com.honeywell.javapos.so.MetroScanFUSBv19"/> <vendor name="Honeywell Scanning and Mobility" url="http://www.honeywellaidc.com"/> <jpos category="Scanner" version="1.7"/> <product description="Honeywell bar code scanner" name="Focus/1690" url="http://www.honeywellaidc.com"/> <!--Other non JavaPOS required property (mostly vendor properties and bus specific properties i.e. RS232 )--> <prop name="hasScale" type="String" value="0"/> <prop name="model" type="String" value="Focus/1690"/> <prop name="interface" type="String" value="Full Speed USB"/> <prop name="productID" type="String" value="0x0009"/> </JposEntry> </JposEntries>

Page 6 4/19/2013

6 How to use USB Serial scanner with java pos driver 6.1 Configuring the Scanner via barcode
Scan following barcode to send the scanner in USB Serial interface

6.2 Running the JavaPOS Test utility to evaluate installation


Run the MetroJPOStest.bat file from the HoneywellJPOS_v1.2.12 folder. It is assumed that all the needed files are in the current folder. Check out the classpath and library path settings in the batch file. This will give you a good idea of the requirements for the application also.

6.3 How to Use Metrologic JavaPOS Driver in your application


1. Refer section 3. 2. Please select one service object based on your JavaPOS version. Class com.honeywell.javapos.so.MetroScanRS232v17 com.honeywell.javapos.so.MetroScanRS232v18 com.honeywell.javapos.so.MetroScanRS232v19 com.honeywell.javapos.so.MetroScanRS232v110 JavaPos Specification 1.7 1.8 1.9 1.10

3. Modify the jpos.xml based on your JavaPos version/Scanner model/COM PORT. 4. Sample jpos.xml file content shown below.

Page 7 4/19/2013

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE JposEntries PUBLIC "-//JavaPOS//DTD//EN" "jpos/res/jcl.dtd"> <JposEntries> <!--Saved by JavaPOS jpos.config/loader (JCL) version 2.2.0 on 8/13/07 4:29 PM--> <JposEntry logicalName="MetroScannerRS232"> <creation factoryClass="com.honeywell.javapos.so.MetroScannerServiceFactory" serviceClass="com.honeywell.javapos.so.MetroScanRS232v19"/> <vendor name="Honeywell Scanning and Mobility" url="http://www.honeywellaidc.com"/> <jpos category="Scanner" version="1.7"/> <product description="Honeywell bar code scanner" name="Focus/1690" url="http://www.honeywellaidc.com"/> <!--Other non JavaPOS required property (mostly vendor properties and bus specific properties i.e. RS232 )--> <prop name="portName" type="String" value="COM1"/> <prop name="Interface" type="String" value="RS232"/> <prop name="dataBits" type="String" value="8"/> <prop name="Model" type="String" value="Focus/1690"/> <prop name="parity" type="String" value="None"/> <prop name="flowControl" type="String" value="None"/> <prop name="stopBits" type="String" value="1"/> <prop name="deviceBus" type="String" value="RS232"/> <prop name="baudRate" type="String" value="9600"/> <prop name=USBSerial type=String value=no/> </JposEntry> </JposEntries>

Eaample code for using Bell command in an application: try { String ret[] = new String[1]; Scanner.DirectIO(30,null,ret); } catch(Exception e){} For using checkHealth() method following is an example: try{ Scanner.checkHealth(JposConst.JPOS_CH_INTERNAL); Scanner.getCheckHealthText(); } catch(Exception e){} checkHealth() method should be called after OPEN,CLAIM,Enabeling the device. getCheckHealthText(); can be called after OPEN method call. Call to Scanner.DirectIO can be made after OPEN call. However Bell will not ring so one will have to call OPEN, CLAIM methods to actually hear the bell.

Page 8 4/19/2013

7 How to enable/disable Extended ASCII Support


Add EnableExtendedASCII to jpos.xml to instruct jpos driver to support extended ASCII characters. It can have two possible values. they are "True" or "False". If this entry is True, jpos driver will enable the support for extended ascii characters. To make this change work perfectly, REM must be disabled in the scanner otherwise it will send REM data to the test application. This feature will also not send any data to MBean (this is same as setting ReMEnable off). When this option is used for RS232 interface, scanner must be configured for NixDorf ID character to report correct symbology as shown in following screen shot taken from metroset

Following is the example to enable extended ascii characters <prop name="EnableExtendedASCII" type="String" value="True"/> Following is the example to disable extended ascii characters <prop name="EnableExtendedASCII" type="String" value="False"/>

8 How to enable/disable ReM


Add ReMEnable entry to jpos.xml with Auto, On or Off value to enable/disable ReM support in javapos driver. Following are the entries. Auto o If Bean is already running, It will work as it works with MBean. If MBean is not running then it will work as it works when ReMEnable value is "Off" On o It works same as it works when jpos.xml does not have ReMEnable entry Off o It disables ReM feature of the jpos driver. It will run independent of MBean. 2) Following are the examples of ReMEnable entry <prop name="ReMEnable" type="String" value="Auto"/> <prop name="ReMEnable" type="String" value="On"/> <prop name="ReMEnable" type="String" value="Off"/>

9 Check Health / BEL / Connect/Disconnect RS232 Scanner


We can enable jpos driver to check whether scanner is connected or not on RS232 interface. For that we have to put following entry in jpos.xml file.
<prop name=ConnectionDetectRS232 type=String value=true/>

Also to support Check Health / BEL Functionality we need to have the above entry in jpos.xml. The scanner should be configured to support response to I Command. Also to support BEL command you need to configure the scanner as shown in figure 9.0. To enable Check Health/BEL Command One needs to do the following sequence of steps:

Page 9 4/19/2013

Metro Set->Operation ->Host Control-> Check Support beep on BEL and Transmit Metrologic on I Check box.

figure 9.0

10 Disable Device On Close .


Below property allows to Disable Device on close. <prop name="DisableDeviceOnClose" type="String" value="On"/> DisableDeviceOnClose property On will disable device on calling Close method. DisableDeviceOnClose property Off will not disable the device on calling Close.

Page 10

4/19/2013

11 Enable Logging
Instructions to use "logfile" tag to enable logging for the data received from the scanner. eg. Entry : <prop name="logfile" type="String" value="c:\LogFolder\JPOS.txt"/> Above entry tells the JPOS driver to send logging data to file JPOS.txt in directory c:\LogFolder. If LogFolder does not exit in C:\ drive then it will get created. Eg. Entry : <prop name="logfile" type="String" value="JPOS.txt"/> If only file name is specified as value then a file by the name of JPOS.txt will be created in the current folder. If "logfile" entry is not present in jpos.xml or its value is empty string, JPOS Driver will not log any data.

12 How to use Scale with java pos driver.


Scale use in jpos driver needs following change in jpos.xml factoryClass and serviceClass change in jpos.xml . <creation factoryClass="com.honeywell.javapos.so.MetroScaleServiceFactory" serviceClass = "com. honeywell.javapos.so.MetroScale17"/> Example of the full jpos.xml file is show in the below box.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE JposEntries PUBLIC "-//JavaPOS//DTD//EN" "jpos/res/jcl.dtd"> <JposEntries> <!--Saved by JavaPOS jpos.config/loader (JCL) version 2.2.0 on 8/13/07 4:29 PM--> <JposEntry logicalName="MetroScannerRS232"> <creation factoryClass="com.honeywell.javapos.so.MetroScaleServiceFactory " serviceClass=" com. honeywell.javapos.so.MetroScale17"/> <vendor name="Honeywell Scanning and Mobility" url="http://www.honeywellaidc.com"/> <jpos category="Scale" version="1.7"/> <product description="Honeywell bar code scanner" name="Focus/1690" url="http://www.honeywellaidc.com"/> <!--Other non JavaPOS required property (mostly vendor properties and bus specific properties i.e. RS232 )--> <prop name="portName" type="String" value="COM1"/> <prop name="Interface" type="String" value="RS232"/> <prop name="dataBits" type="String" value="8"/> <prop name="Model" type="String" value="Focus/1690"/> <prop name="parity" type="String" value="None"/> <prop name="flowControl" type="String" value="None"/> <prop name="stopBits" type="String" value="1"/> <prop name="deviceBus" type="String" value="RS232"/> <prop name="baudRate" type="String" value="9600"/> </JposEntry> </JposEntries>

Page 11

4/19/2013

Vous aimerez peut-être aussi