Deployment of Scanner SDK for Linux

Overview

This chapter describes how to install the Zebra Scanner SDK and components on recommended platforms.

The SDK installation package includes:

  • Components that enable any Zebra scanner to communicate with applications or tools that execute on top of the Zebra Scanner SDK
  • Supporting documents
  • Test utilities
  • Sample applications and source projects

NOTE Uninstall any previous Zebra, Symbol, or third party drivers or SDKs which communicate with Zebra scanners before installing the Zebra Scanner SDK. This includes but is not limited to Zebra and Symbol supplied OPOS, JPOS, and SNAPI drivers.

NOTE For a list of a scanner's supported attribute (parameter) numbers and definitions, refer to the scanner Product Reference Guide, available on the Zebra Support website http://www.zebra.com/support. Attributes include configuration parameters, monitored data, and asset tracking information.


SDK Components

The SDK installation package installs the following SDK components to the default locations

  • Zebra Scanner SDK core components and drivers (USB API (libudev and libusb), imaging drivers)
  • JPOS drivers (scanner and scale)
  • Link to the latest developer's guide
  • Test and sample utilities with source code packages:

    • Scanner SDK GTK Sample Application (C++)
    • Scanner SDK Console Application (C++)
    • JPOS Test Utility for Scanner and Scale

System Requirements

Supported Linux Distributions

Please refer the supported distribution matrix.

Hardware Requirements

Minimum hardware requirements for the Zebra scanner driver and SDK depend on the minimum system requirement for the Linux distribution installation. The following requirements are provided as a guideline.

  • Processor: Pentium* 4 1.6 GHz or higher (Pentium 4 2.4 GHz or higher or any AMD64 or Intel64 processor recommended)
  • Main memory: 1 GB physical RAM (2 GB recommended)
  • Hard disk: 10 GB available disk space for a minimal install, 25 GB available for a graphical desktop (more recommended)

Third Party Software Libraries

Library Version Limitation GTK Java
Libudev 147 or above 2.24.10 6 (JDK 1.6)
GTK (for GUI applications) 147 or above 2.24.23 6 (JDK 1.6)
Java 147 or above 2.24.23 6 (JDK 1.6)

Scanner Communication Modes

Refer to the scanner's Product Reference Guide for supported communication modes, and specifically the appendix Functionality Supported via Communication (Cable) Interface for supported scanner functionality by communication protocol.


CoreScanner and SDK Installers

The CoreScanner Version 4.0 SDK and later offer three types of installers to accommodate many different Linux distributions:

  • RPM package-based installers - Installable only on RPM-based Linux distributions
  • Debian package-based installers - Installable only on Debian-based Linux distributions
  • Source tarball based installers - Installable on any Linux distribution. You are prompted to install all required dependent packages when configuring the source tarball extraction for installation.

Choosing an Installer

There are many different Linux bases/trees available. Perform the appropriate research or contact Zebra support to determine the base tree of your distribution. Select the CoreScanner and SDK installer based on the following categories:

  • RPM-based packages (.rpm) for the following distributions:

    • CentOS
    • Suse (Open Suse, Suse Linux Enterprise Server, etc.)
    • Opensus
    • Red Hat
    • Fedora
  • Debian-based packages (.dpkg) for the following distributions:

    • Debian
    • Ubuntu
  • Source tarball based installer for other Linux distributions such as Gentoo.

NOTE RPM and Debian are package managers supported for the Linux distributions above. Each package manager provides a shell command (rpm or dpkg) for installing/removing packages in a Linux distribution.

RPM and Debian Installer Packages

RPM and Debian installers provide three packages for installing different components:

  • zebra-scanner-corescanner - The core package of CoreScanner which includes the CoreScanner daemon and libraries. This package places files into the standard file installation locations of Linux systems (in this case /usr/share/zebra-scanner/etc.) Install this package before installing the JavaPOS and Corescanner API development packages, as it is required for both.
  • zebra-scanner-javapos - Part of the CoreScanner-SDK, this includes all JPOS libraries, sample applications, scripts, and C++ libraries for JNI. The zebra-scanner-corescanner package is required for JPOS package development and implementation.
  • zebra-scanner-devel - This provides the application programming interface exposed from CoreScanner, and contains header files required to develop C/C++ applications for CoreScanner and source files for simple console based sample applications. The zebra-scanner-corescanner package is required for this API development package.

Installing the CoreScanner and SDK

This section describes how to install each CoreScanner and SDK package after selecting the suitable installer for the Linux distribution.

Installing RPM Packages

  1. Check for existing CoreScanner and SDK installations using the rpm command -qa option:

    
    rpm -qa | grep zebra
    
    

    For example, list packages installed in a CentOS/Suse RPM based distribution:

    
    [root@localhost]# rpm -qa | grep zebra
    zebra-scanner-devel-3.0.0-0
    zebra-scanner-javapos-3.0.0-0
    zebra-scanner-corescanner-3.0.0-0
    
    
  2. Remove existing CoreScanner and SDK packages using the rpm command -e option. Since the zebra-scanner-corescanner package is required for JPOS and API development packages, remove this after uninstalling the other two packages.

    For example:

    
    rpm -e zebra-scanner-javapos-2.0.0-0
    rpm -e zebra-scanner-devel-2.0.0-0
    rpm -e zebra-scanner-corescanner-2.0.0-0
    
    
  3. Install new packages using the rpm command -i option. Install the CoreScanner packages first to avoid possible package dependency issues.

    For example:

    
    rpm -i zebra-scanner-corescanner-2.0.0-0-sles11_sp2-i586.rpm
    rpm -i zebra-scanner-devel-2.0.0-0-sles11_sp2-i586.rpm
    rpm -i zebra-scanner-javapos-2.0.0-0-sles11_sp2-i586.rpm
    
    

Installing Debian Packages

  1. Check for existing CoreScanner and SDK installations using the dpkg command -l option:

    dpkg -l | grep zebra
    

    For example, list packages installed in a Ubuntu distribution:

    
    zebra-scanner-corescanner 2.0.0-0 amd64 Zebra Technologies Linux Corescanner Daemon
    zebra-scanner-devel 2.0.0-0 amd64 Development files for Zebra Technologies Linux Corescanner
    zebra-scanner-javapos 2.0.0-0 amd64 Jpos 1.13 drivers for Zebra Technologies Linux Corescanner Daemon
    
    
  2. Remove existing CoreScanner and SDK packages using the dpkg command -r option. Since the zebra-scanner-corescanner package is required for JavaPOS and API development packages, remove this after uninstalling the other two packages

    For example:

    
    dpkg -r zebra-scanner-javapos
    (Reading database ... 219367 files and directories currently installed.)
    Removing zebra-scanner-javapos (2.0.0-0) ...
    
    
    
    dpkg -r zebra-scanner-devel
    (Reading database ... 219343 files and directories currently installed.)
    Removing zebra-scanner-devel (2.0.0-0) ...
    
    
    
    dpkg -r zebra-scanner-corescanner
    (Reading database ... 219328 files and directories currently installed.)
    Removing zebra-scanner-corescanner (2.0.0-0) ...
    update-rc.d: /etc/init.d/cscored exists during rc.d purge (use -f to force)
    Processing triggers for libc-bin (2.19-0ubuntu6.4) ...
    
    
  3. Install new packages using the dpkg -i option. Install the CoreScanner package first to avoid possible package dependency issues.

    For example:

    
    dpkg -i zebra-scanner-corescanner_2.0.0-0_ubuntu-14.04_amd64.deb
    
    

    Sample output:

    
    Selecting previously unselected package zebra-scanner-corescanner.
    (Reading database ... 219288 files and directories currently installed.)
    Preparing to unpack zebra-scanner-corescanner_2.0.0-0_ubuntu-14.04_amd64.deb ...
    Unpacking zebra-scanner-corescanner (2.0.0-0) ...
    Setting up zebra-scanner-corescanner (2.0.0-0) ...
    Adding system startup for /etc/init.d/cscored ...
    /etc/rc0.d/K20cscored -> ../init.d/cscored
    /etc/rc1.d/K20cscored -> ../init.d/cscored
    /etc/rc6.d/K20cscored -> ../init.d/cscored
    /etc/rc2.d/S20cscored -> ../init.d/cscored
    /etc/rc3.d/S20cscored -> ../init.d/cscored
    /etc/rc4.d/S20cscored -> ../init.d/cscored
    /etc/rc5.d/S20cscored -> ../init.d/cscored
    Processing triggers for ureadahead (0.100.0-16) ...
    Processing triggers for libc-bin (2.19-0ubuntu6.4) ...
    
    
    
    dpkg -i zebra-scanner-devel_2.0.0-0_ubuntu-14.04_amd64.deb
    
    

    Sample output:

    
    Selecting previously unselected package zebra-scanner-devel.
    (Reading database ... 219320 files and directories currently installed.)
    Preparing to unpack zebra-scanner-devel_2.0.0-0_ubuntu-14.04_amd64.deb ...
    Unpacking zebra-scanner-devel (2.0.0-0) ...
    Setting up zebra-scanner-devel (2.0.0-0) ...
    
    
    
    dpkg -i zebra-scanner-javapos_2.0.0-0_ubuntu-14.04_amd64.deb
    
    

    Sample output:

    
    Selecting previously unselected package zebra-scanner-javapos.
    (Reading database ... 219335 files and directories currently installed.)
    Preparing to unpack zebra-scanner-javapos_2.0.0-0_ubuntu-14.04_amd64.deb ...
    Unpacking zebra-scanner-javapos (2.0.0-0) ...
    Setting up zebra-scanner-javapos (2.0.0-0) ...
    Processing triggers for libc-bin (2.19-0ubuntu6.4) ....
    
    

Installing the Source Tarball

  1. Download zebra-scanner-4.0.0.tar.gz to the home directory. This source tarball contains a script file to install CoreScanner and SDK on the Linux system.
  2. Extract the zebra-scanner-4.0.0.tar.gz file, which creates the zebra-scanner-4.0.0 directory. $> tar -xvf zebra-scanner-4.0.0.tar.gz
  3. Change directory to the zebra-scanner-4.0.0 folder.
  4. Change the user to a super user using sudo/su commands. A super user password is required.
  5. Configure CoreScanner for the Linux distribution, specifying the destination directory as the root directory using the destdir option.

    
    $> configure --destdir = /
    
    
  6. Use the make build command to build the CoreScanner and SDK for the system. “make” searches for all dependent third party libraries, and displays errors and aborts the build if it can’t find a dependent package in the environment. Restart installation by installing these packages.

    
    $> make
    
    
  7. Use the make build command to build the CoreScanner and SDK for the system. “make” searches for all dependent third party libraries, and displays errors and aborts the build if it can’t find a dependent package in the environment. Restart installation by installing these packages.

    
    $> make install
    
    
  8. Use make uninstall to remove an existing source tarball installation from the system.

    
    $> make uninstall
    
    

Verifying CoreScanner and SDK Installation

CoreScanner version 4.0 and later include the Install Verify Application, which verifies the status of the CoreScanner installation and execution. See Install Verifier Application (IVA) Utility


Installed Components

CoreScanner daemon service (cscore) is installed with the zebra-scanner-corescanner package. This coordinates activity between the communication layer (SNAPI, IBMHH, IBMTT, etc.) and upper level drivers (JPOS, SDK API, etc.). Following table lists the component installed.

Table Zebra Scanner SDK Components

Component File Description Installation Path
CoreScanner cscore Scanner Driver Daemon Service /usr/bin/
CoreScanner libcs-iudev.so Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcs-iudev.so.4.0.0 Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcscl-hidkb.so Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcscl-hidkb.so.4.0.0 Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcscl-ibmhh.so Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcscl-ibmhh.so.4.0.0 Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcscl-ibmtt.so Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcscl-ibmtt.so.4.0.0 Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcscl-snapi.so Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcscl-snapi.so.4.0.0 Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcs-client.so Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcs-client.so.4.0.0 Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcs-common.so Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcs-common.so.4.0.0 Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcs-comm.so Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcs-comm.so.4.0.0 Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcs-clientscanner.so Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcs-clientscanner.so. 4.0.0 Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcs-clientscale.so Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner libcs-clientscale.so.4.0.0 Transport Component /usr/lib/zebra-scanner/corescanner
CoreScanner-JNI libcs-jniscanner.so.4.0.0 JPOS-JNI Component /usr/lib/zebra-scanner/javapos/jni
CoreScanner-JNI libcs-jniscanner.so JPOS-JNI Component /usr/lib/zebra-scanner/javapos/jni
CoreScanner-JNI libcs-jniscale.so.4.0.0 JPOS-JNI Component /usr/lib/zebra-scanner/javapos/jni
CoreScanner-JNI libcs-jniscale.so JPOS-JNI Component /usr/lib/zebra-scanner/javapos/jni
JPOS jpostest.sh Start Script for JPOS Test Application /usr/lib/zebra-scanner/javapos/jpos
JPOS dio.sh Start Script for JPOS Direct IO Test Application /usr/lib/zebra-scanner/javapos/jpos
JPOS xml-apis.jar Third party Java library used for JPOS /usr/lib/zebra-scanner/javapos/jpos
JPOS xercesImpl.jar Third party Java library used for JPOS /usr/lib/zebra-scanner/javapos/jpos
JPOS JposTest.jar JPOS sample application /usr/share/zebra-scanner/samples/ jpos-sample-app
JPOS JposTestDio.jar JPOS direct I/O sample application /usr/share/zebra-scanner/samples/ jpos-directio-app
JPOS JposServiceScanner.jar JPOS Library /usr/lib/zebra-scanner/javapos
JPOS JposServiceScale.jar JPOS Library /usr/lib/zebra-scanner/javapos
JPOS JposServiceOnScanner.jar JPOS Library /usr/lib/zebra-scanner/javapos
JPOS JposServiceOnScale.jar JPOS Library /usr/lib/zebra-scanner/javapos
JPOS JposServiceJniScanner.jar JPOS Library /usr/lib/zebra-scanner/javapos
JPOS JposServiceJniScale.jar JPOS Library /usr/lib/zebra-scanner/javapos
JPOS jpos113.jar JPOS Library /usr/lib/zebra-scanner/javapos
Console Application Makefile Local Make File for Console Application /usr/share/zebra-scanner/samples/ console-app
Console Application ConsoleApplication Execute File of Console Application /usr/share/zebra-scanner/samples/ console-app
Console Application ConsoleSampleEvent Listener.h Console Application Source File /usr/share/zebra-scanner/samples/ console-app
Console Application ConsoleMain.h Console Application Source File /usr/share/zebra-scanner/samples/ console-app
Console Application ConsoleSampleEvent Listener.cpp Console Application Source File /usr/share/zebra-scanner/samples/ console-app
Console Application ConsoleMain.cpp Console Application Source File /usr/share/zebra-scanner/samples/ console-app
Path Verifier Corescanner.conf Path Verifier for CoreScanner Shared Libraries /etc/ld.so.conf.d/
Init Script cscored Systemv Init Script /etc/init.d/
CoreScanner CsBarcodeTypes.h Header files required for application development on top of CoreScanner /usr/include/zebra-scanner
CoreScanner CsUserDefs.h Header files required for application development on top of CoreScanner /usr/include/zebra-scanner
CoreScanner CsIEventListenerXml.h Header files required for application development on top of CoreScanner /usr/include/zebra-scanner
CoreScanner Cslibcorescanner_xml.h Header files required for application development on top of CoreScanner /usr/include/zebra-scanner