About Scanner SDK for Linux

Overview

The Zebra Scanner Software Developer Kit (SDK) for Linux defines an architectural framework providing a single programming interface across multiple programming languages (such as C++, Java) and across multiple system environments (such as RPM based Linux distributions and Debian based Linux) for all scanner communication variants (such as IBMHID, SNAPI, and HIDKB).

The Zebra Scanner SDK includes a suite of components that provides a unified software development framework with a wide range of functions for interfacing Zebra scanners to user applications and solutions.

The CoreScanner driver creates a connection between the host and scanner. The SDK uses CoreScanner to receive data from and send commands to the scanner.

This SDK allows you to read barcodes, manage scanner configurations, capture images/videos, and select a list of scanners on which to work. While one application in one programming language uses a scanner or a set of scanners, you can use another application in a different language within the same system environment.

The SDK can build an application with complete control of scanner capabilities:

  • Data, barcode

    1. JPOS output
    2. SNAPI output
  • Command and control

    1. LED and beeper control
    2. Aim control
    3. Scan enable and disable
  • Imaging

    1. Capture and transfer of images
    2. Capture and transfer of video

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.


Scanner SDK Architecture

Figure 1 SDK Architecture

Host Communication Modes

You can configure Zebra scanner devices to operate in different host communication modes such as USB SNAPI, USB OPOS, USB HID Keyboard, and USB IBM Table-top. Device feature support varies by mode but all modes support barcode scanning. Refer to the scanner Product Reference Guide to set the host communication mode.

To use the Zebra Scanner SDK to switch between supported host communication modes, useful when advanced functionality is required but not supported by the current communication mode, call the Host Variant Switching command. This switches the scanner to a feature-rich mode to execute certain commands, and then reverts the scanner to the previous mode.

For example, to disable the UPC-A symbology when the device is in USB HID Keyboard mode, switch the scanner to USB SNAPI or USB OPOS (if supported by the scanner), disable UPC-A, and then revert the scanner to USB HID Keyboard mode.

Following table illustrates scanner capabilities supported in each communication mode. Refer to the scanner specifications for support of each communication mode.

Table 1 Scanner Device Communication Modes Vs. Capabilities

Capabilities USB SNAPI USB HID Keyboard USB IBM Table-top USB IBM Handheld
Data Supported Supported Supported Supported
Host Variant Switching Supported Supported Supported Supported
Management Supported Not Available Supported Supported
Image & Video Supported Not Available Not Available Not Available
Simulated HID Keyboard Output * Supported Not Available Supported Supported
Advanced Data Formatting Not Available Supported Partial Partial
Multicode Data Formatting Supported Supported Supported Supported
*Advanced Data Formatting (ADF) is not supported when using Simulated HID Keyboard Output.

Multiple Scanner Device Identification and Asset Tracking

The Zebra Scanner SDK supports connecting multiple scanners to any user application running on CoreScanner APIs. The application identifies each scanner by a unique scanner identification number. There cannot be multiple scanners with the same scanner ID.

Asset tracking information such as model number, serial number, firmware version, and date of manufacture is available if the scanner and its current host mode support the management feature. For example, asset tracking information does not appear for a scanner in USB HID Keyboard mode, but does appear if that scanner is in USB OPOS or USB SNAPI mode.

The format of device asset tracking information can vary between device models. For example, the length of a serial number for DS6707 and DS9808 scanners can be different.


Application Access to Multiple Scanners

The Zebra Scanner SDK supports multiple applications accessing multiple scanners connected to the host at the same time.

The scanner ID uniquely identifies a connected scanner to all applications, and is consistent among all applications for one SDK instance. Restarting the CoreScanner service or the host may assign a different scanner ID to a scanner, but it is unique and referenced by all applications.

Two Applications Connected To One Scanner

App 1 & App 2 support bi-directional (two way) communication with the scanner.

Figure 2 Two Applications Connected To One Scanner

Three Applications Connected To Two Scanners

App 1 and App 2 support bi-directional (two way) communication with the DS6878.

Figure 3 Two Applications Connected To One Scanner

Many Applications Connected To Many Scanners

App 1 performs image capture with the DS6878.

App 2 remotely manages both the DS6878 and LS4208.

App 3 receives OPOS data from both the DS6878 and LS4208.

Figure 4 Many Applications Connected To Many Scanners

One Application Connected to Two Scanners

One application can manage multiple scanners in multiple communication interfaces. The application can capture data, image, and video, send management commands, and receive responses from multiple scanners.

All scanner responses consist of details (ScannerID, serial number, model number, etc.) identifying the scanner that sent the response.

Figure 5 One Application Connected to Two Scanners

The following example shows a barcode event for a scanned label. The label data contains a unique ScannerID and the scanner's model number and serial number.


<?xml version="1.0" encoding="UTF-8"?>
<outArgs>
    <scannerID>1</scannerID>
    <arg-xml>
        <scandata>
            <modelnumber>DS6707-SR20001ZZR </modelnumber>
            <serialnumber>7114000503308	</serialnumber>
            <GUID>9008A01BB72BA34BB519806B63701AAA</GUID>
            <datatype>11 </datatype>
            <datalabel>0x39 0x37 0x38 0x30 0x32 0x30 0x31 0x34</datalabel>
            <rawdata>0x39 0x37 0x38 0x30 0x32 0x30 0x31 0x34</rawdata>
        </scandata>
    </arg-xml>
</outArgs>


Supported Devices

  • CS6080
  • DS2208-HC
  • DS2208-SR
  • DS2278-HC
  • DS2278-SR
  • DS3608-DP DS3678-DP Ultra Rugged Scanners
  • DS3608-DPA
  • DS3608-DPX
  • DS3608-ER DS3678-ER Ultra Rugged Scanners
  • DS3608-HD DS3678-HD Ultra Rugged Scanners
  • DS3608-HP DS3678-HP Ultra Rugged Scanners
  • DS3608-SR DS3678-SR Ultra Rugged Scanners
  • DS3678-DPA
  • DS3678-DPX
  • DS457 Series
  • DS8108-HC
  • DS8108-SR
  • DS8178-HC
  • DS8178-SR
  • DS9308
  • LI2208
  • LI3678-ER
  • LI3678-SR
  • MP6000 Scanner Scale
  • MP6200 Scanner Scale
  • MP7000 Multi-Plane Scanner
  • MS4717
  • MX101-SR00004ZZWR
  • SE2707 OEM Array Imager Scan Engine
  • Symbol DS4308
  • Symbol DS7708
  • Symbol DS9808 Hybrid Presentation Imager
  • Symbol LS2208 General Purpose Bar Code Scanner

Supported Linux Distributions

Scanner SDK for Linux latest version supporting following distributions.


Version History

Version 4.4.1-19 – 04/2021

  1. Added support for CentOS 7.9 (64bit).
  2. Enhanced JPOS driver v1.14 to include support for PNP events for both Scanner and Scale.
  3. Enhanced the SDK’s UI sample application to include Scale functionalities (Read Weight, Zero Scale, Reset Scale).
  4. Bug fix – The JPOS driver v1.14 for code 49 now returns the correct Symbology types when the Zebra scanner is in IBM Hand-Held or IBM Table-Top host modes.

Version 4.4.1-16 – 01/2021

  1. Enhanced log file - Resident scanner firmware update status (STATUS_FW_SWCOMP_RESIDENT) added to the log files.
  2. Enhanced console-based sample application for CoreScanner - The console app now shows call success and failure (Logging API return values) and output XML.
  3. Bug fix – The MS4717 now properly switches from HIDKB host mode to another com protocol and back.
  4. Bug fix – The CoreScanner now properly returns the valid status codes for “invalid firmware file” and “failed to read DAT file”.
  5. Bug fix – The SDK sample application now properly returns an error when launched without running the CoreScanner.

Version 4.4.1-15 – 10/2020

  1. Common JPOS driver bundled in both Linux and Windows SDKs. Since same driver, same features are now supported across both Linux and Windows.
  2. JPOS driver update. Removed Apache Xerces XML parser dependency from the Zebra JPOS Service Object (SO).

Version 4.4.1-11 – 07/2020

  1. Added supports for Ubuntu 20.04 (64bit) and CentOS 8.1 (64bit).
  2. Logging Agent bundled with Linux SDK.
    1. The Logging Agent allows a 3rd party management console to track scanner information including the scanner’s health by parsing a Logging Agent generated log file.
    2. The Logging Agent is configurable for example it can be output for all devices (1,000s of log files) or just devices that meet a specific condition like failed a firmware update (a few log files).
    3. The Logging Agent can document the following information:
      1. Asset information
      2. Statistics for example battery charge level or UPCs scanned
      3. Firmware failures and or firmware success
      4. Parameter value(s) changed. Achieved by tracking parameter 616 (config file name changed to “Modified”)
  3. Added support for composite barcode types.
  4. Bug fix – Sample application freeze resolved on scanner PNP.
  5. Bug fix – Sample application RSM attributes list shows the correct permissions for each attribute.

Version 4.4.1-8 – 04/2020

  1. Added option for enabling new Zebra HID API instead of using native OS provided HID API. Zebra HID API enabled through a configuration setting, switching from libusb to hidraw.
  2. Add support for additional distributions: Raspbian 8 and ARM7L (32-bit ARM processor). Note this Linux OS runs on Raspberry PI 3.0 hardware.
  3. Bug fix – Resolved app responding delay by sending the Direct I/O commands using the HID API directly from the comlib to the scanner.
  4. Bug fix - Synchronization block introduce when consuming the events from CoreScanner to JPOS driver. Otherwise, the single core POS system is missing different events from different logical devices (JPOS)

Version 4.4.1-4 – 01/2020

  1. Added ability to discover, communicate and manage a third level cascaded device. The SDK now supports connecting cordless scanners like a DS2278 and cradle to a MP7000. The MP7000 is connected to the host.

Version 4.4.1-2 – 10/2019

  1. Added "DotCode" and "GridMatrix" symbology support to JPOS and SDK Sample Applications. Note the Linux SDK already supported these symbologies.
  2. Added Java 12 UI enhancements to JPOS Sample Application. Note no change required in the JPOS driver.

Version 4.4-0-18 – 08/2019

  1. Added Scale Live Weight event support for Multi-Plane scanners.
  2. Vendor specific capability, ‘CapStatusUpdate’ enabled in JPOS Scale driver.
  3. Implemented ‘StatusNotify’ property in JPOS driver.

Version 4.4.0-15 – 06/2019

  1. Added get next Attribute RSM command support in CoreScanner.

Version 4.4.0-14 – 06/2019

  1. "EAN13 Supplementary of 5" symbology support added into JPOS Sample Application.

Version 4.4.0 – 03/2019

  1. Added JPOS 1.14 standard compatibility for the JPOS driver.
  2. Introduced a JPOS based asset query capability (model #, serial #, date of manufacture, firmware version).

Version 4.3.3 – 01/2019

  1. Enhanced Linux log file format to mirror Zebra’s Windows SDK logging format
  2. Added ability to customize logging capabilities via the CoreScanner configuration file. Settings include

    • Log file storage path
    • Number of stored log file. For example, save the last 50 files.

Version 4.3.1 – 08/2018

  1. Added support for JPOS Scale Asynchronized Read Weight -1 (forever) timeout support.
  2. Added support for Intelligent Document Capture (IDC).
  3. Added ability to specify an on board udev library using the CoreScanner’s configuration file instead of the system default.

Version 4.2.4 – 04/2018

  1. JPOS Scale Read Weight Asynchronized mode support.
  2. JPOS Statistics reporting support for Scale.

    Note C++ applications cannot be compiled with C++ 11 based compilers without setting _GLIBCXX_USE_CXX11_ABI macro to 0. Below definition will be used to set ABI to the old C++ version.

    #define _GLIBCXX_USE_CXX11_ABI 0

Version 4.1.11 – 01/2018

  1. Host variant switching from CDC to management modes.

Version 4.1.0 – 10/2017

  1. Support for custom PIDs.

Version 4.0.0 – 05/2017

  1. Source tarball.
  2. Install Verifier application added.

Version 3.0.0 – 08/2016

  1. IBM TT, IBM HID, SNAPI firmware download support.
  2. SNAPI fast firmware downloads support.
  3. SNAPI Imaging and Video capturing.
  4. API events like PNP events.
  5. Detecting HIDKB devices.

Version 2.0.0 – 02/2016

  1. Existing drivers were rebranded from Motorola to Zebra.

Version 1.3.0 – 08/2015

  1. Supports for Ubuntu 14.04, Ubuntu 12.04, SLES 11, CentOS 6.3 distributions.
  2. Concurrent application support for Scanner and Scale of MP6200 in JPOS.
  3. Cascaded device support for MP6200, Presentation Cradle and Standard Cradle.