Datalogic™ JavaPOS Device Services User Manual
Datalogic ADC, Inc. 959 Terry Street Eugene, OR 97402 USA Telephone: (541) 683-5700 Fax: (541) 345-7140 ©2006-2014 Datalogic ADC, Inc. An Unpublished Work - All rights reserved. No part of the contents of this documentation or the procedures described therein may be reproduced or transmitted in any form or by any means without prior written permission of Datalogic ADC, Inc. or its subsidiaries or affiliates ("Datalogic" or "Datalogic ADC").
Table of Contents DATALOGIC™ JAVAPOS DEVICE SERVICES ............................................................................................................................................... 1 Introduction ...............................................................................................................................................................................................................1 Document Conventions ......................................................................
Contents AUTO INSTALLATION SCRIPT .................................................................................................................................................................. 39 Creation and use of auto-installation script .......................................................................................................................................................39 Contents of install.bat .........................................................................................
Chapter 1 Datalogic™ JavaPOS Device Services Introduction Document Conventions Formatting conventions are used throughout this guide to provide a consistent method for representing screen shots and command entries. Notes contain additional information of interest to the reader. Filenames, paths, field selections, and data or keystrokes entered by the user are shown in this monospaced typeface.
Introduction Datalogic Products Supported Products with RS-232 Std, RS-232 SC, and OEM USB interfaces are generally supported. Products released after the publication of this manual may not be listed in this table, but may still be supported by JavaPOS. Please contact Datalogic Technical support or your Datalogic representative for questions about specific models. Table 1.
Introduction OEM USB RS232 SC RS232 Std Scale OEM USB RS232 SC Device Type RS232 Std Scanner Handheld Scanners GD41XX GM41XX GBT41XX GD44XX GBT44XX GM44XX QS6000+ QS2500 QS6500 QS6500BT QD23XX QD21XX PD71XX Limitations The following limitations apply to this version of the Datalogic JavaPOS Device Services: • • • • User Manual For an RS-232 Standard scale device, only the SASI scale interface is supported
Installation Installation Introduction Datalogic JavaPOS is a set of Java based drivers that allow Java application developers to communicate with Datalogic based Point of Sale Scales and Scanners. As long as the Java application adheres to the JavaPOS specification up to 1.13, it does not need to be written with the Datalogic drivers in mind, but rather should work with any JavaPOS 1.13 or less compliant drivers.
Installation 1. Double-click the setup.jar file. The installer starts and a Welcome dialog is displayed. 2. Click Next. You must click to indicate you accept the terms of the End User License Agreement (EULA) in order to continue with the installation. 3. Click Next. You are prompted to enter an installation path (the default is C:\Program Files\Datalogic\JavaPOS).
Installation If Datalogic JavaPOS is already present on your computer, a warning is displayed. CAUTION Click No to halt the installation. Uninstall Datalogic JavaPOS, then return to step 1 of this procedure. 4. Available packages for the current version are displayed. Only the Base Datalogic Drivers are absolutely required. If installing on a system for the first time to test the functionality of the drivers, it is recommended that all packages be installed.
Installation 5. Click Next. An installation progress dialog is displayed. When the Installation Completed message is displayed, click Done. A message appears to remind that a system reboot is required for the changes to take effect. 6. Click OK, then re-log onto your computer.
Installation Linux Installation As with the Windows operating system, Linux requires version 1.5 or later of the Java Runtime Environment. Visit http://www.oracle.com/technetwork/ java/index.html for downloading and installation instructions. The Java application must exist in your system path in order for the Datalogic JavaPOS application links to function properly. If Fedora Core 3, CentOS or Ubuntu is installed as a Workstation, it installs a GNU java runtime environment.
Installation Verification The Datalogic JavaPOS installer automatically installs a POSTest application for testing all kinds of JavaPOS devices. If one of the previously discussed Datalogic/Datalogic scanners or scales is available, you can test the drivers to make sure they were installed correctly. There are shell scripts in the /opt/dls/JavaPOS directory that can be used to run POSTest or JEREditor. You can run POSTest from a command prompt or terminal window by issuing the following command: java com.
Installation Example - Configuring a Scanner The following procedure describes how to configure a scanner, using the Datalogic Magellan 1000i Scanner under Windows as an example. Perform the following steps: 1. Plug the scanner into an active USB port. If Windows prompts you to restart your computer, do so. 2. Click the Scanner tab. The Scanner properties are displayed. 3. In the Logical Name field, select DLS-1000i-USB-Scanner 4. Click Open, then Claim. 5.
Installation JER Editor The JER Editor helps you configure the devices listed in the jpos.xml file. You can edit this file manually, but JER Editor provides an easier mechanism for editing the devices’ configuration properties. You can use it to add new devices or change COM port assignments. The Datalogic JavaPOS installer places a shortcut to JER Editor in your Start menu. If under Linux there is no shortcut link, you may have to log back onto the GUI desktop as the root user.
Installation Most of the properties of predefined Datalogic devices will never need to be changed. One notable exception is the COM port assignments for RS-232 devices, which have to be modified if they are different from the default value. To change the COM port for an RS-232 device, perform the following steps: 1. Select the device’s logical name (for example, Datalogic-6000-RS232-Scanner for a scanner device). 2. Select the Bus Properties tab. Click Edit. 3.
Installation Technical Details Support Jars The installation procedure for these drivers provides everything that is required to completely run the drivers with a standalone test application that uses JavaPOS. This may mean that on an actual POS system, some of these files may already exist in different folders.
Installation “Update CLASSPATH” Windows A new system environment variable DLS_CLASSPATH is created that contains the following string: .;C:\Program Files\Datalogic\JavaPOS;C:\Program Files\Datalogic\JavaPOS\SupportJars;C:\Program Files\Datalogic\JavaPOS\DLSJavaPOS.jar;C:\Program Files\Datalogic\JavaPOS\SupportJars\jsr801.0.2.jar;C:\WINDOWS\system32\comm.jar;C:\Program Files\Datalogic\JavaPOS\SupportJars\jsr80_linux1.0.3.jar;C:\Program Files\Datalogic\JavaPOS\SupportJars\jsr80_ri1.0.2.
Installation chmod a+rw /dev/ttyS2 chmod a+rw /dev/ttyS3 If need be these changes can be manually undone after the installation process has completed. It is also just as easy to add more com ports to the list, if required. The com ports are changed to “raw” mode. The default behavior for com ports under Linux is for them to act as remote terminals. This means that certain binary data is converted — this needs to be turned off. The first four com ports are changed to “raw” mode in the / etc/rc.d/rc.
Device Service Control then appended to the LD_LIBRARY_PATH variable, as in the following example lines: DLS_LD_LIBRARY_PATH=/opt/dls/JavaPOS/SupportJars LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DLS_LD_LIBRARY_PATH export LD_LIBRARY_PATH Any JavaPOS app must use the java command line option: -Djava.library.
Device Service Logging and Debug Capabilities Device Service Logging and Debug Capabilities The Datalogic Device Services provide the ability to turn on logging of certain events and to control the level of detail associated with the log. Events are logged to a file named dlstrace.log, which is created in the directory from which the user’s JavaPOS application is launched.
Standard JavaPOS Scanner Operations Standard JavaPOS Scanner Operations See the Unified POS Retail Peripheral Architecture v1.13 for details on Properties and Methods Power Reporting Property Scanner CapPowerReporting is STANDARD. Power reporting is supported by some USB COM Datalogic scanners. Check Health Method The scanner supports health check.
Standard JavaPOS Scanner Operations Statistics CapStatisticsReporting Property = True Scanner supports retrieveStatistics method. This method returns a pointer to an XML data buffer. Supported statistics are: • • • • • • • • Device category Manufacturer Model number Serial Number Firmware revision Interface type Power on time Number of label scans CapUpdateStatistics = False Statistics cannot be updated or reset. Datalogic scanners do not support the ResetStatistics( ) or UpdateStatistics( ) methods.
Standard JavaPOS Scanner Operations The dialog box will let the user compare or update the firmware. The following is a screen shot of a successful compare when the versions are equal.
Standard JavaPOS Scanner Operations The following is a screen shot of a successful compare when the versions are different. This is a screen shot of the firmware update in progress. The status indicator is updated periodically to inform the user of the percentage of update completed. Below is an example of a successfully completed firmware update.
Standard JavaPOS Scale operations Standard JavaPOS Scale operations See the Unified POS Retail Peripheral Architecture v1.13 for Properties and Methods. Power Reporting Property Scale CapPowerReporting is JavaPOS_PR_NONE:0. Power reporting is not supported by Datalogic scanner/scales. The PowerNotify property is not used, and changes to it are ignored by Datalogic JavaPOS Device Services. StatusUpdate events are not fired by the Datalogic JavaPOS Device Services.
Standard JavaPOS Scale operations 1 2 3 After this sequence has been performed, the Live Weight and Live Status fields in the Scale tab will be automatically updated as items are added or removed from the attached scale.
Scanner Direct IO Commands Scanner Direct IO Commands The scanner supports a number of Direct IO commands that allow access to the commands available on the interface which are not directly supported by UPOS. Applications may utilize the Direct IO commands by accessing the Direct IO Method (see the Unified POS Retail Peripheral Architecture, version 1.13 for details) with the appropriate arguments, as detailed below.
Scale Direct IO Commands Scale Direct IO Commands The scale supports a number of Direct IO commands that allow access to the commands available on the OEM/IBM USB interface which are not directly supported by UPOS. Applications may utilize the Direct IO commands by accessing the Direct IO Method with the appropriate arguments, as detailed below. For a complete list of commands and implementation details, see DR90000351, Datalogic UPOS DirectIO Commands (available at www.datalogic.com). Table 6.
Scanner and Device Service Configuration Table 8. RS-232 Single Cable Configuration Scanner configuration item JavaPOS XML configuration item Baud rate Parity Data bits Stop bits Prefix value, prefix enable/disable Suffix value, suffix enable/disable BCC Baudrate Parity Databits Stopbits rxPrefix, txPrefix (note: 0 = disable) rxTrailer, txTrailer (note: 0 = disable) UseBCC Table 9.
Appendix A. Remote Management Support This section describes Remote Management support features included in the DLSJavaPOS version 1.13 and above. Remote Management consists of methods to retrieve statistical data about connected devices and the ability to update firmware through the JavaPOS interface. This update feature is also known as Host Download.
Remote Management Support Sequence Diagram The following diagram portrays the normal process with which the WMI or MBeans properties are populated.
Remote Management Support WMI Browser JMX MBeans Browser using jconsole The following are screen shots of the jconsole application supplied with the JDK 1.5 or above. The JavaPOS application must be started with the option: -Dcom.sun.management.jmxremote so that the JVM will accept and reply to remote management calls.
Remote Management Support JMX MBeans Browser using jconsole (continued) 30 Datalogic™ JavaPOS Device Services
Remote Management Support WMI/JMX MBeans Properties This data is also returned by the getStatistics command. Some items are either null or 0 depending on the connected device. Scale-relevant information will not be valid for a scanner-only device. Items listed below are unique to Datalogic's implementation and differ from the properties listed in the UPOS specification. Some of the following properties may be omitted for configurations where they are not applicable.
Remote Management Support Property: MotorHealth Device Category: Scanner, Portal Scanner Property: HorizontalLaserHealth Device Category: Scanner, Portal Scanner Property: VerticalLaserHealth Device Category: Scanner, Portal Scanner Property: CameraHealth Device Category: Scanner, Portal Scanner Property: MotorOnTime Device Category: Scanner, Portal Scanner Property: LaserTime Device Category: Scanner, Portal Scanner Property: EASSystemHealth Device Category: Scanner, Portal Scanner Property: EASDeactivateC
Remote Management Support Property: RadioSoftwareVersion Device Category: Scanner Property: BaseSoftwareVersion Device Category: Scanner Property: BaseModelNumber Device Category: Scanner Property: BaseSerialNumber Device Category: Scanner Property: BaseHoursPoweredCount Device Category: Scanner Property: BatteryChargeCycles Device Category: Scanner Property: TriggerPulls Device Category: Scanner Property: KeyPresses Device Category: Scanner Property: LaserTime Device Category: Scanner Property: LabelsScann
Remote Management Support Avalanche Support The following are the contents of the scanner_info.txt file as well as the scanner_info.prf file. The scanner_info.prf file is used by Avalanche to populate its database for remote management.
Remote Management Support DLSJavaPOS Properties The following are the contents of the properties file, dls.properties, and property descriptions. Property: com.dls.jpos.service.ScannerService.convertBCDtoASCII Default Value: true Description: When true the data from the scanner is converted to ASCII for numbers 0 thru 9 Property: com.dls.jpos.interpretation.
Remote Management Support Property: com.dls.jpos.common.LogManager.LogFilesToKeep Default Value: 5 Property: com.dls.jpos.common.LogManager.TraceLevel Default Value: 4 Property: com.dls.jpos.common.LogManager.TraceSourceName Default Value: true Description: When true the module name is prepended to messages written to the log file Property: com.dls.jpos.common.LogManager.NumberOfWritesBeforeFlush Default Value: 1 Property: com.dls.jpos.common.LogManager.
Remote Management Support Property: com.dls.jpos.service.ScannerService.useClaimLockFile Default Value: false Property: com.dls.jpos.service.ScannerService.suppressErrors Default Value: false Property: com.dls.jpos.service.ScannerService.FirmwareSendNulls Default Value: false Property: com.dls.jpos.service.ScannerService.FirmwareSendReset Default Value: true JavaPOS Registry The contents of the jpos.xml file are used to make decisions on how JavaPOS behaves when the Datalogic devices are attached.
Remote Management Support Property: ipAddress Default Value: 192.168.0.2 Description: Address number used to communicate with the PortalScanner Property: laneNumber Default Value: 0 Description: lane number used to identify location of PortalScanner Property: imageBuffers Default Value: 1 Description: number of buffers the connected application maintains Property: serviceVersion Default Value: 1.13.
Appendix B. Auto Installation Script Creation and use of auto-installation script This section describes how to create an auto-installation script for use in unattended installs. The example below uses the standard Windows install directories. Figure 10.
Auto Installation Script Creation and use of auto-installation script 1. Click the "Generate an automatic installation script" button 2.
Creation and use of auto-installation script Auto Installation Script 3. Enter "auto-install.xml" as the file name 4.
Auto Installation Script Creation and use of auto-installation script 5. The "auto-install.xml" file is now located in the installation directory Use this file along with the install.bat and setup.jar to perform command line installation, as the contents of the install.bat imply. Contents of install.bat @echo off java -jar setup.jar auto-install.xml Contents of auto-install.xml file
Appendix C. DLSJavaPOS Command-Line Host Download Utility About the Command-Line Host Download Utility DLSJavaPOS provides the ability to update scanners using a command-line utility that is written in Java and uses the DLSJavaPOS drivers. Shell scripts and batch files are provided below as examples.
DLSJavaPOS Command-Line Host Download Utility About the Command-Line Host Download Utility Help output cmdfw version: 1.0.0 Usage: cmdfw.UpdateScanner [-verbose] [-help] [-hilc] scanner -filename The default behavior is to update the firmware using the -scanner -filename options: Options: -h -i -c -l -v -help print this information print info to screen and to scannerinfo.
www.datalogic.com ©2006-2014 Datalogic ADC, Inc. All rights reserved. Datalogic and the Datalogic logo are registered trademarks of Datalogic S.p.A. in many countries, including the U.S.A. and the E.U. Datalogic ADC, Inc.