Zebra Scanner SDK for Windows Scanner JPOS Driver Developer’s Guide

SCANNER JPOS DRIVER
DEVELOPER’S GUIDE
SCANNER JPOS DRIVER
DEVELOPER’S GUIDE
72E-149781-06
Revision A
April 2019
ii SCANNER JPOS DRIVER DEVELOPER’S GUIDE
The software is provided strictly on an “as is” basis. All software, including firmware, furnished to the user is on a licensed basis. Zebra grants to the user a non-transferable and non-exclusive license to use each software or firmware program delivered hereunder (licensed program). Except as noted below, such license may not be assigned, sublicensed, or otherwise transferred by the user without prior written consent of Zebra. No right to copy a licensed program in whole or in part is granted, except as permitted under copyright law. The user shall not modify, merge, or incorporate any form or portion of a licensed program with other program material, create a derivative work from a licensed program, or use a licensed program in a network without written permission from Zebra. The user agrees to maintain Zebra’s copyright notice on the licensed programs delivered hereunder, and to include the same on any authorized copies it makes, in whole or in part. The user agrees not to decompile, disassemble, decode, or reverse engineer any licensed program delivered to the user or any portion thereof.
Zebra reserves the right to make changes to any software or product to improve reliability, function, or design.
Zebra does not assume any product liability arising out of, or in connection with, the application or use of any product, circuit, or application described herein.
No license is granted, either expressly or by implication, estoppel, or otherwise under any Zebra Technologies Corporation, intellectual property rights. An implied license only exists for equipment, circuits, and subsystems contained in Zebra products.

Revision History

Changes to the original guide are listed below:
Change Date Description
-01 Rev A 5/2011 Initial release.
-02 Rev A 3/2012 Updates for 64-bit.
-03 Rev A 4/2014 Updates to include scale information.
-04 Rev A 3/2015 Zebra Rebranding.
-05 Rev A 11/2017 Updated sample configuration code
-06 Rev A 4/2017 Updated:
iii
Added Logging section Replaced JPOS Test Window screen captures Updated DirectIO commands
- Configuration on pg. 2-2, 2-3 and 2-4
- Code Sample in Table 4-1 on pg. 4-2 and Table 4-2 on pg. 4-5
- File path in Step 2 on pg. 4-4
- File path in Step 2 on pg. 4-7
- DirectIO Java Package on pg. 5-2
- Using DirectIO on pg. 5-8
- Copyright statement on last page.
iv SCANNER JPOS DRIVER DEVELOPER’S GUIDE

TABLE OF CONTENTS

Revision History .............................................................................................................................. iii
About This Guide
Introduction ..................................................................................................................................... vii
Chapter Descriptions ...................................................................................................................... vii
Notational Conventions................................................................................................................... viii
Service Information ......................................................................................................................... viii
Chapter 1: INTRODUCTION TO THE SCANNER JPOS DRIVER
Overview ........................................................................................................................................ 1-1
Zebra Scanner JPOS Driver Architecture ................................................................................ 1-2
Chapter 2: INSTALLATION & CONFIGURATION
Overview ........................................................................................................................................ 2-1
Configuration .................................................................................................................................. 2-2
Wincor-Nixdorf Mode B RS-232 Scanners .............................................................................. 2-2
USB IBM Hand-held Scanners ................................................................................................ 2-3
USB SNAPI Scanners .............................................................................................................. 2-3
All Scanners ............................................................................................................................. 2-3
Scale Device ............................................................................................................................ 2-4
Scanner Configuration Bar Codes ................................................................................................. 2-5
USB Communication Protocol ................................................................................................. 2-5
RS-232 Communication Protocol ............................................................................................. 2-5
Logging .......................................................................................................................................... 2-6
Chapter 3: JPOS PROPERTIES, METHODS, EVENTS
Overview ........................................................................................................................................ 3-1
Deviations from JPOS Specifications ............................................................................................ 3-2
Supported Feature Set ................................................................................................................... 3-3
Properties ................................................................................................................................. 3-3
Methods ................................................................................................................................... 3-5
vi SCANNER JPOS DRIVER DEVELOPER’S GUIDE
Events ...................................................................................................................................... 3-6
Chapter 4: SAMPLE APPLICATION (SCANNER JPOS TEST)
Overview ........................................................................................................................................ 4-1
JPOS Sample Application (JPOS Test Utility) ............................................................................... 4-1
JPOS Test Utility Scanner Functionality ........................................................................................ 4-2
Viewing Bar Code Data ............................................................................................................ 4-4
Return Value ............................................................................................................................ 4-5
JPOS Test Utility Scale Functionality ............................................................................................ 4-5
Measuring the Weight of an Item ............................................................................................. 4-7
Chapter 5: DIRECTIO
Overview ........................................................................................................................................ 5-1
DirectIO Java Package .................................................................................................................. 5-2
com.zebra.jpos.service.directio ................................................................................................ 5-2
DirectIOCommand ......................................................................................................................... 5-2
Command Descriptions ............................................................................................................ 5-2
Input: .................................................................................................................................. 5-4
Output: ............................................................................................................................... 5-4
DirectIOStatus ............................................................................................................................... 5-6
The DirectIO Method ..................................................................................................................... 5-7
DirectIO Method Arguments .................................................................................................... 5-7
Using the JPOS Sample Application to Send Direct I/O Commands ....................................... 5-7
Using DirectIO ............................................................................................................................... 5-8
Chapter 6: SUPPORTED SYMBOLOGY TYPES VS. SCANNER MODE
Overview ........................................................................................................................................ 6-1
Supported Symbology Types vs. Scanner Mode ........................................................................... 6-2
Index

ABOUT THIS GUIDE

Introduction

This guide provides information about the Zebra Scanner JPOS Driver.

Chapter Descriptions

Topics covered in this guide are as follows:
Chapter 1, INTRODUCTION TO THE SCANNER JPOS DRIVER provides an overview of the Zebra Scanner
JPOS Driver.
Chapter 2, INSTALLATION & CONFIGURATION describes specific installation instructions and settings to
configure the Zebra Scanner JPOS Driver on a host computer.
Chapter 3, JPOS PROPERTIES, METHODS, EVENTS provides information about JPOS properties,
methods, and events.
Chapter 4, SAMPLE APPLICATION (SCANNER JPOS TEST) provides information about the sample
application in the Zebra Scanner JPOS Driver suite.
Chapter 5, DIRECTIO describes how the DirectIO feature allows a POS application to communicate directly
with the underlying CoreScanner Service.
Chapter 6, SUPPORTED SYMBOLOGY TYPES VS. SCANNER MODE provides a matrix of scanner modes
and supported symbology types in each mode.
viii SCANNER JPOS DRIVER DEVELOPER’S GUIDE

Notational Conventions

The following conventions are used in this document:
Courier New font is used for code segments.
Italics are used to highlight:
Chapters and sections in this and related documents
Dialog box, window and screen names
Drop-down list and list box names
Screen field names
Check box and radio button names
File names
Directory names.
Bold text is used to highlight:
Parameter and option names
Icons on a screen
Key names on a keypad
Button names on a screen.
bullets (•) indicate:
Action items
Lists of alternatives
Lists of required steps that are not necessarily sequential
Sequential lists (e.g., those that describe step-by-step procedures) appear as numbered lists.
Notes, caution and warning statements appear as follows:
NOTE This symbol indicates something of special interest or importance to the reader. Failure to read the note
will not result in physical harm to the reader, equipment or data.
CAUTION This symbol indicates that if this information is ignored, the possibility of data or material damage may
occur.
WARN I N G ! This symbol indicates that if this information is ignored the possibility that serious personal

Service Information

injury may occur.
If you have a problem using the equipment, contact your facility's technical or systems support. If there is a problem with the equipment, they will contact the Zebra Global Customer Support Center at:
www.zebra.com/support
.
CHAPTER 1 INTRODUCTION TO THE
SCANNER JPOS DRIVER

Overview

The POS application is either a Java application or an applet that uses one or more JavaPOS devices. An
application accesses the JavaPOS device through the JavaPOS Device Interface, which is specified by Java
interfaces.
Each JavaPOS device is a combination of these components:
JavaPOS Device Control is a Java class that provides the interface between the application and the device category. It contains no graphical component and is therefore invisible at runtime and conforms to the JavaBeans API. The Device Control was designed so that all implementations of a device category's control are compatible. The Device Control can be developed independently of a Device Service for the same device category. They may even be developed by different companies.
JavaPOS Device Service is a Java class that is called by the Device Control through the JavaPOS Device Service Interface. The Device Service is used by the Device Control to implement JavaPOS-prescribed functionality for a physical device. It can also call special event methods provided by the Device Control to deliver events to the application.
The JPOS driver included with the Zebra Scanner SDK for Windows provides JNI (Java Native Interface) mechanisms to scanner and scale devices (csjposscanner.dll and csjposscale.dll) for the JavaPOS Device Service layer to interface with the Corescanner driver.
1 - 2 SCANNER JPOS DRIVER DEVELOPER’S GUIDE
Zebra Scanner JPOS Driver Architecture
Figure 1-1
For more information about JavaPOS, JavaPOS architecture, terminology and programmer's guides, refer to:
Zebra Scanner JPOS Driver Architecture
JavaPOS home page at http://www.javapos.com/
UPOS home page at http://www.nrf-arts.org.
NOTE The terms JavaPOS and JPOS are used interchangeably in this document.
CHAPTER 2 INSTALLATION &
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 Scanner SDK
Developers Guide.
NOTE 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.
2 - 2 SCANNER JPOS DRIVER DEVELOPER’S GUIDE
Configuration
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.
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 RS-232 Scanners

<JposEntry logicalName="ZebraScannerSerial">
<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 Scanner on COM1"
url="https://www.zebra.com"/>
<!--Other non JavaPOS required properties-->
<!--Scanner configuration--> <!--Comm port device name--> <prop name="port" value="COM1"/> <!--Baud rate, default=9600, valid values are: 9600, 19200, 38400, 57600, 115200--> <prop name="baud" value="9600"/> <!--Data bits, default=7, valid values are: 5, 6, 7, 8--> <prop name="databits" value="8"/> <!--Stop bits, default=1, valid values are: 1=1 stop bit, 2=2 stop bits, 3=1.5 stop
bits-->
<prop name="stopbits" value="1"/> <!--Parity, default='O' (Odd), valid values are: 'N'one, 'O'dd, 'E'ven, 'M'ark,
'S'pace-->
<prop name="parity" value="O"/> <!--Port mode, default='B', valid values are: 'B'=Nixdorf-B--> <prop name="mode" value="B"/> <!--UPC-A Length, default=13, indicates the number of digits generated by the scanner--> <!--for UPC-A labels based on the scanner's preamble and check digit settings.--> <!--The scanner service uses this value to determine when supplementals are present.--> <!--The default value of 13 assumes preamble is set to system character--> <!--and country code and that transmit check digit is enabled--> <prop name="UPCALength" value="13"/> <!--UPC-E Length, default=7, indicates the number of digits generated by the scanner--> <!--for UPC-E labels based on the scanner's preamble and check digit settings.--> <!--The scanner service uses this value to determine when supplementals are present.--> <!--The default value of 7 assumes preamble is set to system character--> <!--only and that transmit check digit is disabled--> <prop name="UPCELength" value="7"/>
<!--Scanner type, default=0, valid values are: 7 - NixdofrUSB--> <prop name="ScannerType" value="7"/> <prop name="ExclusiveClaimLevel" value="0" />
</JposEntry>
INSTALLATION & CONFIGURATION 2 - 3
USB IBM Hand-held Scanners
<JposEntry logicalName="ZebraScannerUSB">
<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" 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="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>S
2 - 4 SCANNER JPOS DRIVER DEVELOPER’S GUIDE
Scale Device
<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.
Scan the appropriate bar code below to configure the scanner for either USB or RS-232 communication
protocols.

USB Communication Protocol

INSTALLATION & CONFIGURATION 2 - 5
Set All Defaults

RS-232 Communication Protocol

USB (IBM Hand-held)
USB (IBM Table-top)
USB SNAPI
Wincor-Nixdorf RS-232 Mode B
Loading...
+ 37 hidden pages