Installation and Configuration

Overview

This chapter describes installation instructions and settings to configure the Zebra Scanner JPOS Driver on a host computer.

For custom installation instructions on installing the Zebra scanner JPOS driver, refer to the Installation and Configuration of Scanner SDK for Windows.

NOTE (for Windows) JPOS components are installed by default with the standard scanner SDK installation. If a custom scanner SDK installation is performed, the JPOS option must be selected to install the JPOS components.

NOTE (for Linux) JPOS components can be installed using RPM and Debian packages separately.


Configuration

Configuration for Windows

After a successful installation of the Zebra Scanner SDK with the JPOS driver, an XML file named jpos.xml is created in the folder C:\Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\JPOS\Sample Applications\bin.

Configuration for Linux

Following prerequisites are needed to run JPOS in Linux distributions.

  • libudev-dev
  • JDK (1.6 or above)
  • libgtk2.0-dev
  • ant

JPOS package can be installed by executing the following command inside the folder containing the .deb/.rpm packages.

For Debian distributions:


sudo dpkg -i zebra-scanner-javapos_X.X.X-X_amd64.deb

For RPM distributions:


rpm –ivh zebra-scanner-javapos-X.X.X-X.x86_64.rpm

Use the appropriate Package names when using the above commands. After the installation is completed, jpos.xml can be found in the location given below.


/usr/share/zebra-scanner/javapos/xml

The JPOS Sample Application can be found at:


/usr/share/zebra-scanner/samples/jpos-sample-app

Note that, this Application can only be run with JDK version 1.8 or above. In order to run the JPOS Sample Application in Linux, navigate to the location where the executable is located.


cd /usr/share/zebra-scanner/samples/jpos-sample-app

Execute the command mentioned below.


./jpos-sample-app.sh

Furthermore, a Sample Application especially catered to run with JDK 1.6 is provided to the users in the form of a zip file, 'jpos-sample-app-java1.6_vX.X.X-X.tar.gz' along with the package. In order to run the Application, extract and navigate to the below location.


cd jpos-sample-app-java1.6_vX.X.X-X/jpos-sample-app-java1.6

Please include the appropriate version in the above command. The Sample App can be run by executing the relevant '.sh' file.


./jpos-sample-app-java1.6.sh

Note that, this Sample Application has a limited set of features than what the above Sample App offers.

JPOS Logical Devices

The Zebra Scanner JPOS Driver reads jpos.xml to retrieve required configurations such as the baud rate for serial scanners and scanner filtering rules to form the logical scanner defined by the user. Each <JposEntry logicalName="LogicalScannerName"> tag defines a logical scanner. The following sample JPOSEntries represents serial, USB IBM Hand-held and USB SNAPI logical devices.

Wincor-Nixdorf Mode B


<JposEntry logicalName="ZebraScannerSerialNIXMODB">
    <creation factoryClass="com.zebra.jpos.service.scanner.SymScannerSvc112Factory" serviceClass="com.zebra.jpos.service.scanner.SymScannerSvc112"/>
    <vendor name="Zebra Technologies" url="https://www.zebra.com"/>
    <jpos category="Scanner" version="1.12"/>
    <product description="Zebra Serial" name="Zebra Serial NIXMODB Scanner" url="https://www.zebra.com"/>		
    <prop name="ScannerType" value="NIXMODB"/>
    <prop name="ExclusiveClaimLevel" value="0" />
</JposEntry>

SSI Serial Scanners


<JposEntry logicalName="ZebraScannerSerialSSI">
    <creation factoryClass="com.zebra.jpos.service.scanner.SymScannerSvc112Factory" serviceClass="com.zebra.jpos.service.scanner.SymScannerSvc112"/>
    <vendor name="Zebra Technologies" url="https://www.zebra.com"/>
    <jpos category="Scanner" version="1.12"/>
    <product description="Zebra Serial" name="Zebra Serial SSI Scanner" url="https://www.zebra.com"/>		
    <prop name="ScannerType" value="SSI_SERIAL"/>
    <prop name="ExclusiveClaimLevel" value="0" />
</JposEntry>

USB IBM Hand-held Scanners


<JposEntry logicalName="ZebraUSBHandHeld">
    <creation factoryClass="com.zebra.jpos.service.scanner.SymScannerSvc112Factory" serviceClass="com.zebra.jpos.service.scanner.SymScannerSvc112"/>
    <vendor name="Zebra Technologies" url="https://www.zebra.com"/>
    <jpos category="Scanner" version="1.12"/>
    <product description="Zebra USB Scanner" name="Zebra Scanner" url="https://www.zebra.com"/>
    <prop name="ScannerType" value="USBIBMHID"/>
    <prop name="ExclusiveClaimLevel" value="0" />
</JposEntry>

USB SNAPI Scanners


<JposEntry logicalName="ZebraScannerSNAPI">
    <creation factoryClass="com.zebra.jpos.service.scanner.SymScannerSvc112Factory" serviceClass="com.zebra.jpos.service.scanner.SymScannerSvc112"/>
    <vendor name="Zebra Technologies" url="https://www.zebra.com"/>
    <jpos category="Scanner" version="1.12"/>
    <product description="Zebra SNAPI Scanner" name="Zebra Scanner" url="https://www.zebra.com"/>
    <prop name="ScannerType" value="SNAPI"/>
    <prop name="ExclusiveClaimLevel" value="0" />
</JposEntry>

All Scanners


<JposEntry logicalName="ZebraAllScanners">
    <creation factoryClass="com.zebra.jpos.service.scanner.SymScannerSvc112Factory" serviceClass="com.zebra.jpos.service.scanner.SymScannerSvc112"/>
    <vendor name="Zebra Technologies" url="https://www.zebra.com"/>
    <jpos category="Scanner" version="1.12"/>
    <product description="Zebra Serial/USB Scanner" name="Zebra Scanner" url="https://www.zebra.com"/>
    <prop name="ScannerType" value="ALL"/>
    <prop name="ExclusiveClaimLevel" value="0" />
    <prop name="NcrScanNOFPattern" type="String" value="12"/>
    <prop name="NcrScanTonePattern" type="String" value="4"/>
    <prop name="DioScannerNotOnFile" type="String" value="12"/>
    <prop name="DioScannerDioNof" type="String" value="12"/>
</JposEntry>

Scale Devices


<JposEntry logicalName="ZebraScale">
    <creation factoryClass="com.zebra.jpos.service.SvcServiceInstanceFactoryImpl" serviceClass="com.zebra.jpos.service.scale.ScaleService113Impl"/>
    <vendor name="Zebra Technologies" url="https://www.zebra.com"/>
    <jpos	category="Scale" version="1.13"/>
    <product description="Zebra Scale" name="Zebra Scale" url="https://www.zebra.com"/>
    <prop name="ErrorOnSameWeight" value="1"/>
</JposEntry>

NOTE When a scale device (such as MP6200) is connected to a host PC via an RSM-supported host mode, scale functionality is available. The scale is accessible using the JPOS Open and Claim methods. RSM-supported host modes include SNAPI, IBM HH, IBM TT and SSI.


Scanner Configuration Bar Codes

Scan the Set All Defaults bar code below to return all parameters to the scanner's default values. Refer to the scanner's Product Reference Guide for default values.

Set All Defaults

Scan the appropriate bar code below to configure the scanner for either USB or RS-232 communication protocols.

USB Communication Protocol

Set All Defaults
Set All Defaults
Set All Defaults

RS-232 Communication Protocol

Set All Defaults

Logging

Logging for Windows

To configure logging for Scanner JPOS and Scale JPOS, use the jpos_trace.properties file located at C:\Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\JPOS\bin.

Following is a sample log section of this file.


###############################################################################
#################### JPOS Configurations Zebra Scanners #######################
# ZEBRA, ZEBRA TECHNOLOGIES, and the Zebra Logo are trademarks or registered  #
# trademarks of Zebra Technologies International, LLC, © 2022 Zebra           #
# Technologies International, LLC. All Rights Reserved.                       #
###############################################################################

###############################################################################
# logFileName:
# File name or lable for the log file
###############################################################################
logFileName=jpos.log

###############################################################################
# logFilePath:
# log file storing location default location is /var/log/corescanner/jpos
###############################################################################
logFilePath=C:\\Program Files\\Zebra Technologies\\Barcode Scanners\\Scanner SDK\\JPOS\\bin\\Logs

###############################################################################
# logFileSize:
# size of a single log file, this can be changed
###############################################################################
logFileSize=1048576

###############################################################################
# logFileCount:
# Maximum number of log files created by JPOS, new log file will be created once
# the current log file archive "logFileSize" in byte
###############################################################################
logFileCount=2

###############################################################################
# logLevel:
# Currently support only 2 values
# 0 - Disable logging
# 1 - Enable logging
###############################################################################
logLevel=1

Logging for Linux

The file jpos_trace.properties in Linux platform can be found in the location /usr/share/zebra-scanner/javapos/config

The following is the content present in the file jpos_trace.properties


###############################################################################
#################### JPOS Configurations Zebra Scanners #######################
# ZEBRA, ZEBRA TECHNOLOGIES, and the Zebra Logo are trademarks or registered  #
# trademarks of Zebra Technologies International, LLC, © 2022 Zebra           #
# Technologies International, LLC. All Rights Reserved.                       #
###############################################################################

###############################################################################
# logFileName:
# File name or lable for the log file
###############################################################################
logFileName=jpos.log

###############################################################################
# logFilePath:
# log file storing location default location is /var/log/zebra-scanner/jpos
###############################################################################
logFilePath=/var/log/zebra-scanner/jpos

###############################################################################
# logFileSize:
# size of a single log file, this can be changed
###############################################################################
logFileSize=1048576

###############################################################################
# logFileCount:
# Maximum number of log files created by JPOS, new log file will be created once
# the current log file archive "logFileSize" in byte
###############################################################################
logFileCount=2

###############################################################################
# logLevel:
# Currently support only 2 values
# 0 - Disable logging
# 1 - Enable logging with input output values for functions
# 2 - Enable logging with input output values for functions along with function names
###############################################################################
logLevel=1

###############################################################################
# ShowSensitiveInfo:
# Log sensitive information (Scan Data, Read Weight Values)
# 0 - Disable logging
# 1 - Enable logging
###############################################################################
showSensitiveInfo=1

###############################################################################
# enableCimPropertyFile:
# Log CIM properties related log file. Applicable for Linux only
# 0 - Disable creation of CIM property log file
# 1 - Enable creation of CIM property log file
###############################################################################
enableCimPropertyFile=1

JPOS Scanner and Scale related logs get created in the folder /var/log/zebra-scanner/jpos