About Scanner SDK for Linux


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"?>
            <modelnumber>DS6707-SR20001ZZR </modelnumber>
            <serialnumber>7114000503308	</serialnumber>
            <datatype>11 </datatype>
            <datalabel>0x39 0x37 0x38 0x30 0x32 0x30 0x31 0x34</datalabel>
            <rawdata>0x39 0x37 0x38 0x30 0x32 0x30 0x31 0x34</rawdata>

Supported Devices

For the compatible devices list, please visit following page.


Supported Linux Distributions

Scanner SDK for Linux (CoreScanner and JPOS) and IoT Connector for Linux latest versions supporting following distributions.

Figure 6: Linux Distributions for Barcode Scanner SDK for Linux and IoT Connector for Linux

Active Focus Manager for Linux and Command Line Utility for Linux latest versions supporting following distributions.

Figure 7: Linux Distributions for Active Focus Manager for Linux and Command Line Utility for Linux

Version History

Version 4.4.1-40 - 04/2024

  1. CoreScanner Driver v4.4.1-40
    1. Added configuration name to "GetScanners" command outXML.
    2. Bug Fix - Addressed the CoreScanner segmentation fault that occurred at system shutdown.
  2. JPOS Driver v4.4.1-50
    1. Bug Fix - Minor sample app fix - State of Data Event Enable and Device Enable checkboxes in JPOS Sample application now shows the correct state when JPOS Scale profile is not opened.
    2. Bug Fix - Fixed intermittent exception caused in the JPOS Scale live weight thread when attempting to restart or configure the scale while live weight is in progress.
    3. Bug Fix - Minor sample app fix - Synchronized state of “Device Enable” checkbox when “Auto Device Enable” or “Enable Live Weight” selections are used.
    4. Added a new attribute as “ClearQueueOnRelease” to JPOS.xml file, to configure clearing the data queue when device is released.
    5. Bug Fix - An exception is fired upon performing Zero Scale with weights greater than the firmware implemented scale zeroing weight limit.
    6. Bug Fix - Prevented incorrectly throwing “Timed out with zero stable weight” exception after setting PIDXScal_ZeroValid to true in JPOS Scale live weight DIO.
  3. Command Line Utility (CLU) v1.0.0-6
    1. Added the command "assetinfo" to retrieve asset information. It returns host mode, serial number, firmware version and date of manufacture selected devices.
    2. Added support for returning error/status codes for the executed CLU commands.

Version 4.4.1-38 - 01/2024

  1. Command Line Utility (CLU) - Added new command to retrieve asset information based on scanner ID. It returns host mode, serial number, firmware version and date of manufacture of the scanner.
  2. IoT Connector
    1. Added support for logging of environment variables (pulled from operating system) into the URL and request headers in the HTTP sink. Note the environmental variable check is performed real-time on each logging occurrence.
  3. Bug Fix - Rarely used scenario addressed - Full read/write permission to Corescanner log folder now available. This enables a user to read/write files to the log folder. Access permission now exists for the general user of the zebra log folder regardless of its form of creation (both created through service/created during installation).

Version 4.4.1-36 - 10/2023

  1. Bug Fix - Record count sent with firmware update progress events functions as expected; Intermittent issue addressed.
  2. Bug Fix - Changed default value of "bulktransfer_time_out>" in configuration file to resolve scanner reboot issue seen during firmware update.
  3. Bug Fix - Command Line Utility (CLU) - Resolved a firmware update failure in IBMHID and IBMTT modes, seen with particular versions of scanner firmware.

Version 4.4.1-34 - 07/2023

  1. Enhanced JPOS driver
    1. Bug fix - Fixed issue that incorrectly appended a Label ID for NCR label with barcode type ISSN.
    2. Bug fix - Fixed issue relevant to error arguments (locus and response) in JPOS read weight error events.
    3. Sample App Security fix - Updated library "xercesImpl.jar" used in JPOS Sample application from v2.11.0 to v2.12.2 to resolve security vulnerabilities exposed from v2.11.0.
    4. Sample App Bug fix - Device enable button now gets updated upon enabling auto device enable (button) in JPOS scale.
    5. Sample App Bug fix - Barcode name now correctly displayed for Han Xin Code.
  2. Command Line Utility (CLU) - Bug Fix - Addressed memory allocation issue with "reboot" and "getattribute" commands.

Version 4.4.1-32 - 04/2023

  1. Active Focus Manager (AFM) Module - Alpha release for customer evaluation. Available for download separately, not bundled with the SDK.
  2. Enhanced Driver Data Formatting (DDF) module - Alpha release for customer evaluation - Added support to incorporate ATL key combinations using the Driver
    1. Data Formatting (DDF) module. This functionality enables an ALT key combination to be added to barcode data when using Simulated HID Keyboard.
    2. Configuring this capability is located in the CoreScanner configuration xml file.
    3. An example of this capability is sending "ALT [ + Data + Enter"; also "ALT [ + Data + TAB".
    4. This initial implementation can only support sending ALT + one key sequence like "ALT [".
    5. This new ALT key capability supports modifying data using a Prefix only (Suffix with ALT key is not supported).
  3. Command Line Utility (CLU) - Initial release. This utility provides scripting control of Zebra scanner. Supported functionality includes:
    1. Reboot of a scanner
    2. Parameter Control
      1. Param Get and Set
      2. 123Scan config file consumption
    3. F/W update
  4. Enhanced JPOS driver
    1. Bug fix in Sample App - Fixed error message incorrectly displayed in JPOS Sample application when Zero Scale command is called and weighing item below 30 grams.
    2. Update JPOS driver to fire Scale status update events whenever a status updates and a weight change is detected.
    3. Bug fix in Sample App - Made the display format for scale weight consistent in the sample application for Read Weight, Live Weight and Direct IO NCR Live Weight calls.
    4. Bug fix in JPOS Sample App - Fixed application lockup if enabling both live weight and auto disable simultaneously.

Version 4.4.1-31 - 01/2023

  1. Enhanced IoT Connector - Added support for C98. Note C98 is a C++ compilation standard.
  2. Added IoT connector support for following distributions.
    1. RedHat 7.4 64bit
    2. CentOS 7.9 64bit
    3. Ubuntu 14.04 64bit
  3. Added "Simulated HID Keyboard" support to CoreScanner.
  4. Added "DDF" (Driver Data Formatting) support to CoreScanner.
    1. DDF enables driver-based data formatting like adding an Enter or Tab key to be appended to scanned data before its transmission to a host.
    2. DDF (Driver Data Formatting) is different than ADF (Advanced Data Formatting). DDF is performed by Zebra's CoreScanner Driver versus ADF is performed within the scanner's firmware.
    3. DDF is supported over "Simulated HID Keyboard" using the following comm interfaces: SNAPI, IBM HandHeld, IBM TableTop.

Version 4.4.1-30 - 10/2022

  1. Enhanced SDK Sample Application,
    1. Added Page motor support to the SDK Sample Application.
    2. Now the Scale tab is disabled when the connected device is not a Zebra scale.
  2. Bug fix - Resolved inconsistency in “get all RSM values” responses.
  3. Enhanced JPOS driver
    1. Enhanced driver to support NCR requested “HealthCheck” label IDs.
    2. Bug fix - “Get Error Response” API now returns the correct error on Read Weight in Scale.
    3. Minor UI optimizations in the JPOS Sample Application for Windows.
  4. Enhanced firmware update in non-bulk mode to generate continuous firmware update events in SDK. Note bulk mode already works this way.

Version 4.4.1-29 - 05/2022

  1. Enhanced JPOS driver,
    1. Bug fix, ReadWeight events now reported correctly when DataEventEnabled is false and LiveWeight is true.
    2. Enhanced driver to support all NCR requested “ScanData” label IDs.

Version 4.4.1-28 - 04/2022

  1. Enhanced IoT Connector capabilities - Added support for logging scanner details where Global Unique Identifier (GUID) is invalid.
  2. TGCS support - add from Ken's email after Leads approve.
  3. Enhanced Toshiba Global Commerce Solutions (TGCS) POS system support.
    1. JPOS driver enhanced to support System Management Information calls from TGCS POS systems.
    2. Corescanner enhanced to support TGCS' CIM Service Provider = “UPOS_BarcodeScanner” queries.
  4. Bug fix - Resolved issue in firmware update failure with DS9908 and DS8178 scanner models.

Version 4.4.1-27 - 01/2022

  1. Logging Agent renamed “IoT Connector”.
  2. Enhanced JPOS driver,
    1. Fixed rarely seen JPOS statistics retrieval issue on scanners.

Version 4.4.1-24 - 10/2021

  1. Added support for SLES 15 SP3 (64bit), Ubuntu 21.04 (64bit), Debian 10.10 (32bit and 64bit).
  2. Enhanced JPOS Driver
    1. Added support to execute DirectIO commands without claiming the device.
    2. JPOS sample application enhancement to display the "Live Weight" and the logs on live weight status update events.
    3. Enhanced logging in JPOS driver including access to barcode data, power state, scale weight, and what API calls have been made.
  3. Enhanced Logging Agent capabilities
    1. Added support for logging of operating system environment variables like "host PC name". The environmental variable check is performed real time on each logging occurrence.
    2. Added support for real time logging via a JSON call to cloud-based consoles like Splunk.

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,
    1. Log file storage path
    2. 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.