Zebra Scanner SDK for Linux Scanner JPOS Driver for Linux User Guide (en)

Page 1
SCANNER JPOS DRIVER FOR LINUX
User Guide
MN-003395-02
Page 2

Copyright

ZEBRA and the stylized Zebra head are trademarks of Zebra Technologies Corporation, registered in many jurisdictions worldwide. All other trademarks are the property of their respective owners. ©2019 Zebra Technologies Corporation and/or its affiliates. All rights reserved.
COPYRIGHTS & TRADEMARKS: For complete copyright and trademark information, go to
www.zebra.com/copyright
.
WARRANTY: For complete warranty information, go to www.zebra.com/warranty
END USER LICENSE AGREEMENT: For complete EULA information, go to www.zebra.com/eula

For Australia Only

For Australia Only. This warranty is given by Zebra Technologies Asia Pacific Pte. Ltd., 71 Robinson Road, #05­02/03, Singapore 068895, Singapore. Our goods come with guarantees that cannot be excluded under the Australia Consumer Law. You are entitled to a replacement or refund for a major failure and compensation for any other reasonably foreseeable loss or damage. You are also entitled to have the goods repaired or replaced if the goods fail to be of acceptable quality and the failure does not amount to a major failure.
Zebra Technologies Corporation Australia’s limited warranty above is in addition to any rights and remedies you may have under the Australian Consumer Law. If you have any queries, please call Zebra Technologies Corporation at +65 6858 0722. You may also visit our website: www.zebra.com terms.

Terms of Use

Proprietary Statement
This manual contains proprietary information of Zebra Technologies Corporation and its subsidiaries (“Zebra Technologies”). It is intended solely for the information and use of parties operating and maintaining the equipment described herein. Such proprietary information may not be used, reproduced, or disclosed to any other parties for any other purpose without the express, written permission of Zebra Technologies.
Product Improvements
Continuous improvement of products is a policy of Zebra Technologies. All specifications and designs are subject to change without notice.
Liability Disclaimer
Zebra Technologies takes steps to ensure that its published Engineering specifications and manuals are correct; however, errors do occur. Zebra Technologies reserves the right to correct any such errors and disclaims liability resulting therefrom.
Limitation of Liability
In no event shall Zebra Technologies or anyone else involved in the creation, production, or delivery of the accompanying product (including hardware and software) be liable for any damages whatsoever (including, without limitation, consequential damages including loss of business profits, business interruption, or loss of business information) arising out of the use of, the results of use of, or inability to use such product, even if Zebra Technologies has been advised of the possibility of such damages. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you.
.
.
for the most updated warranty
2
Page 3

Revision History

Changes to the original guide are listed below:
Change Date Description
MN-003395-01 Rev A 10/2018 Initial release.
MN-003395-02 Rev A 7/2019 - Updated Supported Feature Set
3
Page 4

Table of Contents

Copyright ........................................................................................................................................... 2
For Australia Only ....................................................................................................................... 2
Terms of Use .................................................................................................................................... 2
Revision History ................................................................................................................................ 3
Table of Contents................................................................................................................................... 4
List of Figures ........................................................................................................................................ 6
List of Tables.......................................................................................................................................... 7
About This Guide
Introduction ....................................................................................................................................... 8
Chapter Descriptions ........................................................................................................................ 8
Notational Conventions ..................................................................................................................... 8
Service Information ........................................................................................................................... 9
Provide Documentation Feedback .................................................................................................... 9
Introduction to the Scanner JPOS Driver
Introduction ..................................................................................................................................... 10
Installation and Configuration
Introduction ..................................................................................................................................... 11
Install JPOS Driver with RPM Packages ........................................................................................ 11
Install JPOS Driver with Debian Packages ..................................................................................... 11
Installed Components ..................................................................................................................... 12
Configuration ................................................................................................................................... 13
USB IBM Table-Top Scanners .................................................................................................. 13
USB IBM Hand-Held Scanners ................................................................................................. 13
USB SNAPI Scanners ............................................................................................................... 14
All Scanners .............................................................................................................................. 14
Scale Device ............................................................................................................................. 14
4
Page 5
Table of Contents
Scanner Configuration Barcodes .................................................................................................... 15
Set Defaults ............................................................................................................................... 15
USB Communication Protocol ................................................................................................... 15
JPOS Properties, Methods, Events
Introduction ..................................................................................................................................... 16
Deviations from JPOS Specifications ........................................................................................ 16
Supported Feature Set .................................................................................................................... 17
Scanner Properties ................................................................................................................... 17
Scanner Methods ...................................................................................................................... 18
Scanner Events ......................................................................................................................... 18
Scale Properties ........................................................................................................................ 19
Scale Methods .......................................................................................................................... 20
Scale Events ............................................................................................................................. 21
Sample Application
Introduction ..................................................................................................................................... 22
JPOS Sample Application (JavaPOStester) ................................................................................... 22
JavaPOStester Scanner Functionality ...................................................................................... 22
Viewing Barcode Data ......................................................................................................... 22
JavaPOStester Scale Functionality ........................................................................................... 24
Measuring the Weight of an Item ........................................................................................ 24
Index
5
Page 6

List of Figures

Figure 1. JPOS Sample App Scanner Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Figure 2. Processed Driver Barcode Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 3. JPOS Sample App Scale Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6
Page 7

List of Tables

Table 1. Installed Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Table 2. Scanner Common Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Table 3. Scanner Specific Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Table 4. Scanner Common Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 5. Scanner Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 6. Scale Common Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table 7. Scale Specific Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
Table 8. Scale Common Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Table 9. Scale Specific Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Table 10. Scale Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
7
Page 8

About This Guide

Introduction

This guide provides information about the Zebra Scanner JPOS Driver.
NOTE Screens and windows pictured in this guide are samples and can differ from actual screens.

Chapter Descriptions

Topics covered in this guide are as follows:
Introduction to the Scanner JPOS Driver provides an overview of the Zebra Scanner JPOS Driver.
Installation and Configuration describes specific installation instructions and settings to configure the
Zebra Scanner JPOS Driver on a host computer.
JPOS Properties, Methods, Events provides information about JPOS properties, methods, and events.
Sample Application provides information about the sample application in the Zebra Scanner JPOS Driver
suite.

Notational Conventions

The following conventions are used in this document:
Bold text is used to highlight the following:
Dialog box, window and screen names
Drop-down list and list box names
Check box and radio button names
Icons on a screen
Key names on a keypad
Button names on a screen.
8
Page 9
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.

Service Information

If you have a problem with your equipment, contact Zebra Global Customer Support for your region. Contact information is available at: zebra.com/support
When contacting support, please have the following information available:
Serial number of the unit
Model number or product name
Software type and version number.
Zebra responds to calls by email, telephone or fax within the time limits set forth in support agreements.
About This Guide
.
If your problem cannot be solved by Zebra Customer Support, you may need to return your equipment for servicing and will be given specific directions. Zebra is not responsible for any damages incurred during shipment if the approved shipping container is not used. Shipping the units improperly can possibly void the warranty.
If you purchased your Zebra business product from a Zebra business partner, contact that business partner for support.

Provide Documentation Feedback

If you have comments, questions, or suggestions about this guide, send an email to EVM-Techdocs@zebra.com.
9
Page 10

Introduction to the Scanner JPOS Driver

Introduction

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.
10
Page 11

Installation and Configuration

Introduction

The Zebra CoreScanner daemon is a prerequisite component for the JPOS driver.
For CoreScanner installation instructions refer to the Installation & Configuration chapter in the Zebra Scanner SDK For Linux Developer’s Guide (p/n MN-003028-xx).

Install JPOS Driver with RPM Packages

The rpm command with "-i" option is used to install RPM packages. The zebra-scanner-corescanner package must be installed first, followed by the JPOS driver package.
# rpm -i <path>/zebra-scanner-corescanner-<version><build platform>.rpm # rpm -i <path>/zebra-scanner-javapos-<version><build platform>.rpm

Install JPOS Driver with Debian Packages

The Debian command with "-i" option is used to install DEB packages. The zebra-scanner-corescanner package must be installed first followed by the JPOS driver package.
# dpkg -i <path>/zebra-scanner-corescanner-<version><build platform>.deb # dpkg -i <path>/zebra-scanner-javapos-<version><build platform>.deb
11
Page 12

Installed Components

After installing CoreScanner and JavaPOS, the files listed in Table 1 are installed to the system.
Table 1 Installed Files
Installation Destination Directory File Module
Installation and Configuration
/lib/zebra-scanner/javapos/jni/ libcs-jniscanner.so[version]
libcs-jniscanner.so libcs-jniscale.so.[version] libcs-jniscale.so
/lib/zebra-scanner/javapos/jpos/ xml-apis.jar xercesImpl.jar
JposServiceScanner.jar JposServiceScale.jar JposServiceOnScanner.jar JposServiceOnScale.jar JposServiceJniScanner.jar JposServiceJniScale.jar jpos113.jar
/var/log/zebra-scanner/jpos JPOS log directory
/usr/share/zebra-scanner/javapos/xml/ jpos.xml JPOS configuration files
/usr/share/zebra-scanner/javapos/config/ rsm-id.xml rsm-id.dtd
msijpos.properties
/usr/share/zebra-scanner/samples/jpos-s ample-app
/usr/share/zebra-scanner/samples/jpos-d irectio-app
JposTest.jar jpos-sample-app.sh JPOS Sample application start
JposTestDio.jar jpos-directio-app.sh
JPOS-JNI library files
JPOS-Library files
JPOS configuration files
scripts
JPOS direct ioapplication start scripts
12
Page 13

Configuration

After a successful installation of the Zebra CoreScanner with the JPOS driver, an XML file named jpos.xml is created in the folder /usr/share/zebra-scanner/javapos/xml/. The Zebra Scanner JPOS Driver reads jpos.xml to retrieve required configurations such as scanner filtering rules to form the logical scanner defined by the user. Each tag defines a logical scanner. The following sample JPOSEntries represents USB IBM Table-Ttop, USB IBM Hand-held and USB SNAPI, All Scanners and Scale logical devices.

USB IBM Table-Top Scanners

<JposEntry logicalName="ZebraUSBTableTop"> <creation factoryClass="com.zebra.jpos.service.scanner.SymScannerSvc112Factory"
serviceClass="com.zebra.jpos.service.scanner.SymScannerSvc112"/> <vendor name="Zebra Technologies" url="http://www.zebra.com"/> <jpos category="Scanner" version="1.12"/> <product description="Zebra USB Scanner" name="Zebra Scanner"
url="http://www.zebra.com"/> <!--Other non JavaPOS required properties--> <!--Comm port device name, must be 'USB' for USB scanner--> <prop name="port" value="USBIBMTT"/> <!--Scanner type, default=0, valid values are: 18944=TableTop(0x4A00)--> <!--prop name="ScannerType" value="18944"--> <prop name="ScannerType" value="9"/> </JposEntry>
Installation and Configuration

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="http://www.zebra.com"/> <jpos category="Scanner" version="1.12"/> <product description="Zebra USB Scanner" name="Zebra Scanner"
url="http://www.zebra.com"/> <!--Other non JavaPOS required properties--> <!--Comm port device name, must be 'USB' for USB scanner--> <prop name="port" value="USBIBMHID"/> <!--Scanner type, default=0, valid values are: 19200=HandHeld(0x4B00)--> <prop name="ScannerType" value="19200"/> </JposEntry>
13
Page 14
Installation and Configuration

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="http://www.zebra.com"/> <jpos category="Scanner" version="1.12"/> <product description="Zebra SNAPI Scanner" name="Zebra Scanner"
url="http://www.zebra.com"/> <!--Other non JavaPOS required properties--> <!--Comm port device name, must be 'USB' for USB scanner--> <prop name="port" value="SNAPI"/> <!--Scanner type, default=0, valid values are: 2 - SNAPI--> <prop name="ScannerType" value="2"/> <prop name="Code 39" value="False"/> </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="http://www.zebra.com"/> <jpos category="Scanner" version="1.13"/> <product description="Zebra Serial/USB Scanner" name="Zebra Scanner"
url="http://www.zebra.com"/> <!--Scanner type, default=0, valid values are: 1- ALL Scanners--> <prop name="ScannerType" value="1"/> </JposEntry>

Scale Device

<JposEntry logicalName="ZebraScale"> <creation factoryClas s="com.zebra.jpos.serviceonsc ale.SvcServiceInstanceFactory Impl"
serviceClass="com.zebra.jpos.service.scale.ScaleService113Impl"/> <vendor name="Zebra Technologies" url="http://www.zebra.com"/> <jpos category="Scale" version="1.13"/> <product description="ZebraTechnologies" name="Zebra Scale"
url="http://www.zebra.com"/> </JposEntry>
14
Page 15
Installation and Configuration

Scanner Configuration Barcodes

Set Defaults

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

USB Communication Protocol

Scan the appropriate barcode below to configure the scanner for the desired USB communication protocol.
Set All Defaults
IBM Hand-held USB
IBM Table-top USB
Symbol Native API (SNAPI) with Imaging Interface
15
Page 16

JPOS Properties, Methods, Events

Introduction

The following steps depict the behavioral model of the JPOS driver and scanner.
1. The scanner reads encoded data from a label.
2. When the Control receives input, it queues a DataEvent.
3. If the AutoDisable property is TRUE, the Control is disabled when a DataEvent is queued.
4. The Control can deliver a queued DataEvent to the application when the DataEventEnabled property is TRUE.
Just before delivering this event, the Control copies the data into properties and disables further data events by setting the DataEventEnabled property to FALSE. This causes the Control to queue subsequent input data while the application processes the current input and associated properties. When the application finishes the current input and is ready for more data, it re-enables events by setting DataEventEnabled to TRUE.
5. The Control queues an ErrorEvent (or events) if it encounters an error while gathering or processing input, and
delivers this to the application when the DataEventEnabled property is TRUE.
6. The DataCount property contains the number of DataEvents queued by the Control.
7. Call the ClearInput method to delete all input that the Control queued.
Scanned data is placed into the property ScanData. If the application sets the property DecodeData to TRUE, the data is decoded into ScanDataLabel and ScanDataType.
The following steps depict the behavioral model of the JPOS driver and scale:
1. The POS application calls the ReadWeight method in JPOS control.
2. When JPOS control receives the method call, it passes the request to the JPOS scale service and JPOS scale
service passes that request to CoreScanner service.
3. The CoreScanner Service requests the weight data from the scale and reports it back up through the JPOS
scale service to the JPOS control.
JPOS control returns the ReadWeight method with the weight data retrieved to the POS application.

Deviations from JPOS Specifications

When there is no scanner connected to a cordless base, the Zebra Scanner JPOS Driver considers the cordless base as a scanner. Therefore, a claim succeeds with a cordless base.
16
Page 17

Supported Feature Set

This section describes the supported feature set per the JPOS specification.

Scanner Properties

Table 2 Scanner Common Properties
Property Version Type Access May Use After Zebra Driver Support
AutoDisable 1.2 Boolean R/W Open Supported
CapCompareFirmwareVersion 1.9 Boolean R Open Supported
CapPowerReporting 1.3 Int32 R Open Supported
CapStatisticsReporting 1.8 Boolean R Open Supported
CapUpdateFirmware 1.9 Boolean R Open Supported
CapUpdateStatistics 1.8 Boolean R Open Supported
JPOS Properties, Methods, Events
CheckHealthText 1.0 String R Open Not Supported
Claimed 1.0 Boolean R/W Open Supported
DataCount 1.2 Int32 R Open Supported
DataEventEnabled 1.0 Boolean R/W Open Supported
DeviceEnabled 1.0 Boolean R/W Open & Claim Supported
FreezeEvents 1.0 Boolean R/W Open Supported
OpenResult 1.5 Long R N/A Not Supported
PowerNotify 1.3 Long R/W Open Not Supported
PowerState 1.3 Int32 R Open Not Supported
ResultCode 1.0 Long R N/A Not Supported
ResultCodeExtended 1.0 Long R Open Not Supported
State 1.0 Int32 R N/A Supported
DeviceControlObjectDescription 1.0 String R N/A Supported
DeviceControlVersion 1.0 Int32 R N/A Supported
DeviceServiceDescription 1.0 String R Open Supported
DeviceServiceVersion 1.0 Int32 R Open Supported
PhysicalDeviceDescription 1.0 String R Open Supported
PhysicalDeviceName 1.0 String R Open Supported
17
Page 18
JPOS Properties, Methods, Events
Table 3 Scanner Specific Properties
Property Version Type Access May User After Zebra Driver Support
DecodeData 1.2 Boolean R/W Open Supported
ScanData 1.0 String R Open Supported
ScanDataLabel 1.2 String R Open Supported
ScanDataType 1.2 String R Open Supported

Scanner Methods

Table 4 Scanner Common Methods
Method Version May User After Zebra Driver Support
open 1.0 N/A Supported
close 1.0 Open Supported
claim 1.0 Open Supported
release 1.0 Open and Claim Supported
checkHealth 1.0 Open, Claim and Enable Supported
clearInput 1.0 Open and Claim Supported
clearInputProperties 1.10 Open and Claim Supported
directIO 1.0 Open Supported
compareFirmwareVersion 1.9 Open, Claim and Enable Not Supported
resetStatistic 1.8 Open, Claim and Enable Not Supported
retrieveStatistics 1.8 Open, Claim and Enable Not Supported
updateFirmware 1.9 Open, Claim and Enable Not Supported
updateStatistics 1.8 Open, Claim and Enable Not Supported

Scanner Events

Table 5 Scanner Events
Event Version May User After Zebra Driver Support
DataEvent 1.0 Open, Claim and Enable Supported
DirectIOEvent 1.0 Open and Claim Not Supported
ErrorEvent 1.0 Open, Claim and Enable Supported
StatusUpdateEvent 1.3 Open, Claim and Enable Not Supported
18
Page 19
JPOS Properties, Methods, Events

Scale Properties

Table 6 Scale Common Properties
Property Version Type Access May Use After Zebra Driver Support
AutoDisable 1.2 Boolean R/W Open Supported
CapCompareFirmwareVersion 1.9 Boolean R Open Supported
CapPowerReporting 1.3 Int32 R Open Supported
CapStatisticsReporting 1.8 Boolean R Open Supported
CapUpdateFirmware 1.9 Boolean R Open Supported
CapUpdateStatistics 1.8 Boolean R Open Supported
CheckHealthText 1.0 String R Open Not Supported
Claimed 1.0 Boolean R/W Open Supported
DataCount 1.2 Int32 R Open Supported
DataEventEnabled 1.0 Boolean R/W Open Supported
DeviceEnabled 1.0 Boolean R/W Open & Claim Supported
FreezeEvents 1.0 Boolean R/W Open Supported
OpenResult 1.5 Long R N/A Not Supported
PowerNotify 1.3 Long R/W Open Not Supported
PowerState 1.3 Int32 R Open Not Supported
ResultCode 1.0 Long R N/A Not Supported
ResultCodeExtended 1.0 Long R Open Not Supported
State 1.0 Int32 R N/A Supported
DeviceControlObjectDescription 1.0 String R N/A Supported
DeviceControlVersion 1.0 Int32 R N/A Supported
DeviceServiceDescription 1.0 String R Open Supported
DeviceServiceVersion 1.0 Int32 R Open Supported
PhysicalDeviceDescription 1.0 String R Open Supported
PhysicalDeviceName 1.0 String R Open Supported
Table 7 Scale Specific Properties
Property Version Type Access May Use After Zebra Scanner Support
CapDisplay 1.2 Boolean R Open Supported
CapDisplayText 1.3 Boolean R Open Supported
CapFreezeValue 1.14 Boolean R Open Supported
19
Page 20
JPOS Properties, Methods, Events
Table 7 Scale Specific Properties (Continued)
Property Version Type Access May Use After Zebra Scanner Support
CapPriceCalculating 1.3 Boolean R Open Supported
CapReadLiveWeightWithTare 1.14 Boolean R Open Supported
CapSetPriceCalculationMode 1.14 Boolean R Open Supported
CapSetUnitPriceWithWeightUnit 1.14 Boolean R Open Supported
CapSpecialTare 1.14 Boolean R Open Supported
CapStatusUpdate 1.9 Boolean R Open Supported
CapTarePriority 1.14 Boolean R Open Supported
CapTareWeight 1.3 Boolean R Open Supported
CapZeroScale 1.3 Boolean R Open Supported
AsyncMode 1.3 Boolean R/W Open Supported
MaxDisplayTextChars 1.3 Int32 R Open Not Supported
MaximumWeight 1.0 Int32 R Open Supported
MinimumWeight 1.14 Int32 R Open Supported
SalesPrice 1.3 Currency R Open, Claim
and Enable
ScaleLiveWeight 1.9 Int32 R Open Not Supported
StatusNotify 1.9 Int32 R/W Open Not Supported
TareWeight 1.3 Int32 R/W Open, Claim
and Enable
UnitPrice 1.3 Currency R/W Open, Claim
and Enable
WeightUnit 1.0 Currency R Open Supported
ZeroValid 1.13 Boolean R/W Open Supported
Not Supported
Not Supported
Not Supported

Scale Methods

Table 8 Scale Common Methods
Method Version May User After Zebra Scanner Support
open 1.0 N/A Supported
close 1.0 Open Supported
claim 1.0 Open Supported
release 1.0 Open and Claim Supported
checkHealth 1.0 Open, Claim and Enable Not Supported
20
Page 21
JPOS Properties, Methods, Events
Table 8 Scale Common Methods (Continued)
Method Version May User After Zebra Scanner Support
clearInput 1.0 Open and Claim Supported
clearInputProperties 1.10 Open and Claim Supported
directIO 1.0 Open Supported
compareFirmwareVersion 1.9 Open, Claim and Enable Not Supported
resetStatistic 1.8 Open, Claim and Enable Supported
retrieveStatistics 1.8 Open, Claim and Enable Supported
updateFirmware 1.9 Open, Claim and Enable Not Supported
updateStatistics 1.8 Open, Claim and Enable Supported
Table 9 Scale Specific Methods
Method Version May User After Zebra Driver Support
displayText 1.3 Open, Claim and Enable Not Supported
doPriceCalculating 1.14 Open, Claim and Enable Not Supported
freezeValue 1.14 Open, Claim and Enable Not Supported
readLiveWeightWithTare 1.14 Open, Claim and Enable Not Supported
readWeight 1.3 Open, Claim and Enable Supported
setPriceCalculationMode 1.14 Open, Claim and Enable Not Supported
setSpecialTare 1.14 Open, Claim and Enable Not Supported
setTarePrioity 1.14 Open, Claim and Enable Not Supported
setUnitPriceWithWeightUnit 1.14 Open, Claim and Enable Not Supported
zeroScale 1.0 Open, Claim and Enable Supported

Scale Events

Table 10 Scale Events
Event Version May User After Zebra Driver Support
DataEvent 1.0 Open, Claim and Enable Supported
DirectIOEvent 1.0 Open and Claim Not Supported
ErrorEvent 1.0 Open, Claim and Enable Supported
StatusUpdateEvent 1.3 Open, Claim and Enable Not Supported
21
Page 22

Sample Application

Introduction

The Zebra Scanner JPOS Driver suite includes a sample application that demonstrates all the JPOS operations on connected Zebra scanner and scale devices.

JPOS Sample Application (JavaPOStester)

The JPOS Test Utility allows to simulate an application communicating with the Zebra Scanner JPOS Driver. This utility displays scanner and scale data received from the devices through the Zebra Scanner SDK.

JavaPOStester Scanner Functionality

Viewing Barcode Data
To view barcode data using the Scanner JavaPOStester:
1. Scan the IBM Hand-held USB barcode or Symbol Native API (SNAPI) with Imaging Interface barcode on page
15 to configure the scanner for the correct communication protocol.
2. Open a terminal, go to the /usr/share/zebra-scanner/samples/jpos-sample-app folder, and type
# ./jpos-sample-app.sh to launch the Scanner JavaPOStester.
3. Enter the logical name of the scanner and select Open.
Figure 1 JPOS Sample App Scanner Tab
22
Page 23
Sample Application
0 12345 67890 5
4. From the JPOS Sample App Scanner tab select Claim.
5. Select the Data event enabled check box.
6. Select the Auto Data Event enabled check box.
7. Select the Device enabled check box.
8. Select the Decode data check box.
9. Scan the following sample barcode:
UPC-A
10. The processed driver barcode data displays in the Scan Data, Scan Data Type, and Scan Data Label boxes.
Figure 2 Processed Driver Barcode Data
11. Select Clear Fields to clear the data from all three boxes.
12. To perform a second test, scan another barcode.
23
Page 24
Sample Application

JavaPOStester Scale Functionality

Measuring the Weight of an Item
To measure the weight of an item using the Scanner JavaPOStester:
1. Scan the IBM Hand-held USB barcode, IBM Table-top USB barcode or Symbol Native API (SNAPI) with
Imaging Interface barcode on page 15 to configure the scanner for the correct communication protocol.
2. Open a terminal, go to the /usr/share/zebra-scanner/samples/jpos-sample-app folder, and type
# ./jpos-sample-app.sh to launch the Scanner JavaPOStester.
3. Select the Scale tab.
4. Enter the logical name of the scale and select Open.
Figure 3 JPOS Sample App Scale Tab
5. From the JPOS Sample App Scale tab select Claim.
6. Select the Device enabled check box.
7. Place an item on the scale platter.
8. Select the Read Weight button. The item's weight displays in the adjoining text box.
9. To measure the weight of another item, remove any items on the platter and place the new item on the scale;
select the Read Weight button.
10. Select Release to release the claimed device.
11. Select Close to close the logical device.
24
Page 25

Index

B
barcodes
IBM hand-held . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
IBM table-top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
set all defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
SNAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
UPC-A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
behavioral model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
bullets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
C
chapter descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
conventions
notational . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
D
Debian packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
device components . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
E
events
scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
F
feedback, guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
files installed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
G
guide feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
I
IBM hand-held barcode . . . . . . . . . . . . . . . . . . . . . . . . 15
IBM table-top barcode . . . . . . . . . . . . . . . . . . . . . . . . . 15
information, service . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
installed files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
J
javapos device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
JPOS drive prerequisite . . . . . . . . . . . . . . . . . . . . . . . 11
JPOS driver and scale behavioral model . . . . . . . . . . 16
JPOS driver and scanner behavioral model . . . . . . . . 16
JPOS events
scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
JPOS methods
scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
scale specific . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
JPOS properties
scale common . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
scale specific . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
scanner common . . . . . . . . . . . . . . . . . . . . . . . . . 17
scanner specific . . . . . . . . . . . . . . . . . . . . . . . . . . 18
M
methods
scale common . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
scanner common . . . . . . . . . . . . . . . . . . . . . . . . . 18
methods, scale specific . . . . . . . . . . . . . . . . . . . . . . . . 21
P
packages
Debian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
RPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
POS application type . . . . . . . . . . . . . . . . . . . . . . . . . . 10
prerequisite for JPOS driver . . . . . . . . . . . . . . . . . . . . 11
properties
scale common . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
scale specific . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
scanner common . . . . . . . . . . . . . . . . . . . . . . . . . 17
scanner specific . . . . . . . . . . . . . . . . . . . . . . . . . . 18
25
Page 26
R
RPM packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
S
sample
app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
JPOSEntries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
all scanners . . . . . . . . . . . . . . . . . . . . . . . . . . 14
scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
USB IBM hand-held . . . . . . . . . . . . . . . . . . . . 13
USB IBM table-top . . . . . . . . . . . . . . . . . . . . . 13
USB SNAPI . . . . . . . . . . . . . . . . . . . . . . . . . . 14
screens
JPOS sample app scale tab . . . . . . . . . . . . . . . . . 24
JPOS sample app scanner tab . . . . . . . . . . . . 22, 23
set all defaults barcode . . . . . . . . . . . . . . . . . . . . . . . . 15
SNAPI barcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
U
Index
UPC-A barcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
USB barcodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
26
Page 27
www.zebra.com
Loading...