No part of this publication may be reproduced or used in any form, or by any electrical or mechanical means,
without permission in writing from Zebra. This includes electronic or mechanical means, such as photo copying,
recording, or information storage and retrieval systems. The material in this manual is subject to change
without notice.
The software is provided strictly on an “as is” basis. All software, including firmware, furnished to the user is on
a licensed basis. Zebra grants to the user a non-transferable and non-exclusive license to use each software
or firmware program delivered hereunder (licensed program) . Except as n oted below, such licen se may not b e
assigned, sublicensed, or otherwise tran sfe rr e d by th e user without prior written consent of Zebra. No right to
copy a licensed program in whole or in part is granted, except as permitted under copyright law. The user shall
not modify , merge, or incorporate any for m or portion of a licensed program with other pro gram material, create
a derivative work from a licensed program , or us e a li censed program in a network without written permission
from Zebra. The user agrees to maintain Zebra’s copyright notice on the licensed programs delivered
hereunder , and to include the same on any au thorized copies it m akes, in whole or in part. The user agrees not
to decompile, disassemble, decode, or reverse engineer any licensed program delivered to the user or any
portion thereof.
Zebra reserves the right to make changes to any software or product to improve reliability, function, or design.
Zebra does not assume any product liability arising out of, or in connection with, the application or use of any
product, circuit, or application described herein.
No license is granted, either expressly or by implication, estoppel, or otherwise under any Zebra Technologies
Corporation, intellectual property rights. An implied license only exists for equipment, circuits, and su bsystems
contained in Zebra products.
Revision History
Changes to the original guide are listed below:
ChangeDateDescription
-01 Rev A6/2011Initial release.
-02 Rev A3/2012Updates for 64-bit:
-03 Rev A11/2013Adds:
iii
- updated Table 2-2; converted code to text from graphics
- removed unsupported methods
- updated Table 2-2 (add cradle info for DS6878 & LS4278)
- added USB CDC support
- updated pgs. 4-13 & 4-14: DEVICE_BEEP_CONTROL & DEVICE_LED_ON
changed to SET_ACTION; <arg-int> values changed to 2 & 43, respectively
- updated note and Step 6 on page 4-14; adde d 3 rows for TW AIN to the bo ttom
of Table 2-3 on page 2-11.
->Scale information.
->Intelligent Document Ca pture (IDC) information.
->USB IBM Table-top; SSI
Updates:
->Installation package name changes
->New Configuration section (pg. 2-13).
-04 Rev A4/2015Zebra software branding.
-05 Rev A3/2016Zebra software rebranding.
-06 Rev A3/2017- Removed /r ep la ce d re fe re nc es to the Attribute Data Dictionary
- Updated supported operating systems table
- Updated List of Methods table
- Added Action Attributes table
- Removed CONFIGURE_DADF and RESET_DADF commands
-07EN Rev A12/2020Software updates.
ivZEBRA SCANNER SDK FOR WINDOWS DEVELOPER’S GUIDE
TABLE OF CONTENTS
Revision History.............................................................................................................................. iii
About This Guide
Introduction..................................................................................................................................... ix
Chapter Descriptions ...................................................................................................................... ix
Notational Conventions................................................................................................................... x
Service Information......................................................................................................................... x
Microsoft DebugView ..................................................................................................................... D-2
Index
Quick Startup
ABOUT THIS GUIDE
Introduction
This guide provides information about the Ze bra Scan ne r Softwa re D evelo pe r Kit (SDK) - an archit ectural
framework providing a single programm in g in te r fac e ac ro ss mu ltip le pr og r am m ing lang u ag e s and acr os s mu ltiple
system environments for all scanners communication variants (such as IBMHID, SNAPI, SSI, HIDKB, Nixdorf
Mode B, etc.).
Chapter Descriptions
Topics covered in this guide are as follows:
•
Chapter 1, INTRODUCTION TO THE SCANNER SDK provides an overview of the Zebra Scanner Software
Developer Kit (SDK).
•
Chapter 2, INSTALLATION & CONFIGURATION describes how to install Zebra Scanner SDK and its
components on recommended platforms.
•
Chapter 3, SCANNER SDK API provides the set of APIs to interface with scanner devices.
•
Chapter 4, TEST UTILITIES & SOURCE CODE provides information about testing and evaluation of the
Zebra Scanner SDK's software components using the test utilities provided in the SDK.
•
Chapter 5, SAMPLE SOURCE CODE provides information about how a developer uses the Zebra Scanner
SDK.
•
Appendix A, WRITE SIMPLE APPLICATIONS USING THE SCANNER SDK API provides a step by step
guide to writing simple applications using CoreScanner APIs.
•
Appendix B, SCANNER SDK VISUAL STUDIO PROJECT TEMPLATE provides information about using the
SDK project template.
•
Appendix C, DESCRIPTION OF INTELLIGENT DOCUMENT CAPTURE FORMAT provides Intelligent
Document Capture output information.
•
Appendix D, CORESCANNER DEBUG LOGGING provides information about enabling debug logging.
xZEBRA SCANNER SDK FOR WINDOWS DEVELOPER’S GUIDE
Notational Conventions
The followingconventions are used in this document:
•
Courier New font is used for code segments.
•
Italics are used to highlight:
• Chapters and sections in this and related documents
• Dialog box, window and screen names
• Drop-down list and list box names
• Screen field names
• Check box and radio button names
• File names
• Directory names.
•
Bold text is used to highlight:
• Parameter and option names
• Icons on a screen
• Key names on a keypad
• Button names on a screen.
•
bullets (•) indicate:
• Action items
• Lists of alternatives
• Lists of required steps that are not necessarily seq ue nt ial
•
Sequential lists (e.g., those that describe step-by-step procedures) appear as numbered lists.
•
Notes, caution and warning statements appear as follows:
NOTE This symbol indicates something of special interest or importance to the reader. Failure to read the note
does not result in physical harm to the reader, equipment or data.
CAUTION This symbol indicates that if this information is ignored, the possibility of data or material damage may
occur.
WARNING! This symbol indicates that if this information is ignored the possibility that serious personal
Service Information
injury may occur.
If you have a problem using the equipment, contact your facility's technical or systems support. If there is a
problem with the equipment, they will contact the Zebra Technologies Global Customer Support Center at:
www.zebra.com/support
.
CHAPTER 1 INTRODUCTION TO THE
SCANNER SDK
Overview
The Zebra Scanner Software Developer Kit (SDK) defines an architectural framework providing a single
programming interface across multiple programming languages (such as MS .NET, C++, Java) and across
multiple system environments (such as Vista, Linux) for all scanners communication variants (such as IBMHID,
SNAPI, HIDKB, Nixdorf Mode B, etc.).
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.
With this SDK you can read barcodes, manage scanner configurations, cap ture images/vide os and selectively
choose a list of scanners on which to work. While one application is in one programming language using a
scanner or a set of scanners, another application in a different language can be used differently within the
same system environment.
For a list of the most commonly requested topics within this guide, see Quick Startup in the back of the guide.
Figure 1-1
The SDK can build an application with complete control of its scanner's capabilities.
•
Software Developer Framework
Data, Barcode
• Simulation HID Keyboard output
• OPOS/JPOS output
• SNAPI output
1 - 2ZEBRA SCANNER SDK FOR WINDOWS DEVELOPER’S GUIDE
•
Command and Control
• LED and Beeper Control
• Aim Control
•
Imaging
• Capture/Transfer of images
• Capture/Transfer of Video
•
Remote Scanner Management
• Asset Tracking
• Device Configuration (Get, Set and Store scanner attributes)
• Firmware Upgrade
• Scanner Communication Protocol Switching
• Service to Automate Configuration/Firmware Upgrade Process.
NOTE For a list of a scanner's supported attribute (parame ter) numbers and definitions, refer to the Product
Reference Guide for that model scanner, available from the Zebra Support website at
http://www.zebra.com/support. Attributes include configuration parameters, monitored data, and asset
T est and sample utilities.............................................................................................................................4-2
Table of buttons and input fie lds.............................................................................................................4-4
List of utility functionality ........................................................................................................................4-2
Bar code Data Display ................................ ... .................................... ...............A-13, A-12, 4-10, 4-10
Enable/disable a symbology .....................................................................................A-12, 4-22
API overview................................................................................................................................................3-1
Create com object..............................................................................................................
Register for event............................................................................................................................5-2, 4-8
Open ....................................................................................................................................... A-5, 3-3, 5-2
Get scanner......................................................................................................................A-6, 3-4, 4-8, 5-3
List of Methods.....................................................................................................................................3-17
1 - 4ZEBRA SCANNER SDK FOR WINDOWS DEVELOPER’S GUIDE
FAQs
•
Can multiple scanners be connected to the CoreScanner Driver?
• Yes, multiple scanners can be connected simultaneously to one host running the CoreScanner driver.
•
If two scanners are connected, can data be tracked by scanner ID?
• Yes, if scanner X decodes a barcode 123, it returns to the application a data event consisting of 123
as the data label and the serial number as the scanner ID.
•
Can multiple applications be connected to the CoreScanner Driver?
• Yes, multiple applications can be connected simultaneously on one host running the CoreScanner
driver. An application can register from a selection of event types (such as barcode, image, video or
management). The application receives the event information plus the originating scanner ID.
•
Are the CoreScanner calls common across operating systems?
• Yes. For example, the Open method's function signatures for C++ and Java are the same except for
the platform specific data and return types (highlighted in yellow below).
Figure 1-2
Function Signatures for C++ and Java
Scanner SDK Architecture
Zebra Scanner SDK
INTRODUCTION TO THE SCANNER SDK1 - 5
Figure 1-3
You can configure Zebra scanner devices to be operated in different host communication modes such as USB
SNAPI, USB OPOS, USB HID Keyboard, USB IBM Table-top, SSI, and RS232 Nixdorf Mode B. Device feature
support varies depending on communication mode but all modes support barcode scanning. Refer to the
Product Reference Guide of a specific scanner for the barcodes to set its supported host communication
modes.
Using the Zebra Scanner SDK, you can switch between supported host communication modes by calling the
host variant switching command programmatically. This is useful when the device is in a less feature
supportive mode and some advanced functionality is required but no t supported by the cu rrent communica tion
mode. The scanner can be switched to a featur e rich mode and commands executed before switching the
scanner back to the previous mode.
For example, you want to disable the UPC-A symbology but the device is in USB HID Keyboard mode. If the
mode is supported by the scanner, you may switch to USB SNAPI or USB OPOS, set UPC-A to be disabled
permanently and then switch the scanner back to USB HID Keyboard mode. See Table 1-1 on page 1-6 for
more information.
SDK Architecture
1 - 6ZEBRA SCANNER SDK FOR WINDOWS DEVELOPER’S GUIDE
Table 1-1 illustrates scanner capabilities supported by each communication mode. Refer to the specifications
of a device for its ability to support of each communication mode.
*Advanced Data Formatting (ADF) is not supported when using Simulated HID Keyboard Output.
Scanner Device Communication Modes Vs. Capabilities
Capabilities
*
Simulated HID Keyboard Output is a feature enabling scanners in USB SNAPI, USB IBM Table-top, USB
OPOS, or SSI mode to emulate HID Keyboard keystrokes to a host system for scanned data labels. It sends
the content of the scanned data label as HID Keyboard keystrokes thus emulating USB HID Keyboard scanner
mode.
Multiple Scanner Device Identification Methodology For Applications
The Zebra Scanner SDK supports multiple scanner devices to any application that runs on top of CoreSca nner
APIs. Each scanner device is shown to the user application by a unique scanner identification number. The
scanner ID is a numeric value assigned to e ach connected device so there cannot be multiple scanner devices
holding the same scanner ID.
Asset tracking information like model number , serial nu mber, current firmware version and date of manufacture
are available if the scanner and its current host mode support the management feature.
For example, in some modes like USB HID Keyboard, you do not see asset tracking information but the same
scanner device shows you such information when it is in USB OPOS or USB SNAPI mode.
The format of device asset tracking informatio n can follo w different na m ing con ve nt ion s for dev ice mod e l,
serial number or current firmware version. For example, the length of a serial nu mber for DS67 07 and DS98 08
scanners can be different.
How Multiple Applications Access Multiple Scanners From Scanner SDK
The Zebra Scanner SDK supports multiple applications accessing multiple scanner devices connected to the
host at the same time.
As described previously, a scanner ID uniquely identifies a connected scanner device to all applications. A
scanner ID is consistent among all applications for one SDK instance. If the CoreScanner service or the host
machine is restarted, a device may be assigned a different scanner ID but it is unique and referenced by all
applications.
Three Applications Connected To One Scanner
Figure 1-4 illustrates how multiple applications communicate with multiple scanner devices.
Figure 1-4
Three Applications Connected to One Scanner
Implementation Details
•
Three applications are connected to one scanner.
•
App 1 & App 2 support bi-directional (two way) communication with the scanner.
•
Legacy App 3 supported by driver converting SNAPI data into HID format.
1 - 8ZEBRA SCANNER SDK FOR WINDOWS DEVELOPER’S GUIDE
Three Applications Connected To Two Scanners
Figure 1-4 illustrates how multiple applications communicate with multiple scanner devices.
Figure 1-5
Three Applications Connected To Two Scanners
Implementation Details
•
Three applications are connected to two scanners.
•
App 1 and App 2 support bi-directional (two way) communication with the DS6878.
•
Legacy App 3 receives HID keyboard emulation data from the LS2208.
Many-to-Many Application Device Usage
Figure 1-6
Many-to-Many Application Device Usage
Implementation Details
•
App 1 performs image capture with the DS6878.
•
App 2 can remotely manage both the DS6878 and LS4208.
•
App 3 receives OPOS data from both the DS6878 and LS4208.
One Application Connected to Two Scanners
INTRODUCTION TO THE SCANNER SDK1 - 9
Figure 1-7
One Application Connected to Two Scanners
Implementation Details
•
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 responses from the scanners consist of the scanner device details (ScannerID, seria l number, model
number, etc.) identifying the device that sent the response.
For example, a barcode event for a scanned label is shown below. The scanned data label arrives with a
unique ScannerID and the scanner's model number and the serial number.
1 - 10ZEBRA SCANNER SDK FOR WINDOWS DEVELOPER’S GUIDE
CHAPTER 2 INSTALLATION &
CONFIGURATION
Overview
This chapter describes how to install Zebra Scanner SDK and its components on recommended platforms.
NOTE See System Requirements on page 2-2 for supported platforms.
The SDK installation package includes support for:
•
Installing required components to 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.
This section covers installation and configuration instructions.
NOTE Uninstall any previous Zebra, Symbol or 3rd party drivers or SDKs installed on your system which
communicate with Zebra Scanner Devices before installing the Zebra Scanner SDK. This includes but is
not limited to Zebra and Symbol supplied OPOS, JPOS and SNAPI drivers.
For a list of the most commonly requested topics within this guide, see Quick Startup in the back of the guide.
NOTE For a list of a scanner's supported attribute (para me ter) numbers and definitions, refer to the Product
Reference Guide for that model scanner, available from the Zebra Support website at
http://www.zebra.com/support. Attributes include configuration parameters, monitored data, and asset
tracking information.
2 - 2 ZEBRA SCANNER SDK FOR WINDOWS DEVELOPER’S GUIDE
SDK Components
The SDK installation package includes following components.
For an up-to-date table listing scanner models and their suppo rted communication mod es refer to the Scanne r
SDK for Windows website at: www.zebra.com/scannersdkforwindows
Installing the SDK
Download the relevant Scanner SDK setup program for the 32-bit or 64-bit operating system on your PC from
http://www.zebra.com/scannersdkforwindows.
There are two options for installing the Zebra Scanner SDK on a system.
•
Typical installation - Loads all components in the installation package.
•
Custom installation - Provides the ability to change the default selection of components.
If you install components such as OPOS, JPOS or WMI provider (remote management), the installer
automatically installs sample programs and test utilities related to those components.
To download the appropriate OPOS, JPOS and WMI Developer’s Guides go to:
INSTALLATION & CONFIGURATION2 - 3
.
http://www.zebra.com/scannersdkforwindows
.
Step-by-Step Installation Instructions
1.Execute the setup program. The installation process checks for CoreScanner drivers on the target
machine. If the driver package is not present or outdated, clicking Install adds updated drivers before
installing the scanner SDK package.
Figure 2-1
Prerequisite Check And Install
2 - 4 ZEBRA SCANNER SDK FOR WINDOWS DEVELOPER’S GUIDE
2.Installation continues once the prerequisite drivers are installed on the machine.
Figure 2-2
3.Click Next on the Welcome screen.
Initial Window
Figure 2-3
Welcome Screen
4.Review the license agreement and click Yes to accept.
INSTALLATION & CONFIGURATION2 - 5
Figure 2-4
5.Select the Setup Type.
License Agreement
The user is prompted with two installation options:
• Complete - The installation package installs all components.
• Custom - The installation package gives the option to select which compone nts are loaded during th e
installation process. The user is prompted to select components from the available list.
2 - 6 ZEBRA SCANNER SDK FOR WINDOWS DEVELOPER’S GUIDE
The user can select the destination folder by clicking Browse and selecting the drive and fo lder in which to
install the Zebra Scanner SDK. However, common components are placed in designated locations for
consistency with other SDK users.
Figure 2-5
6.Select features. The user is prompted to select features to be installed from the available components list.
Setup Type
Figure 2-6
NOTE Scanner SDK and USB imaging drivers are common components and are installed automatically.
Select Features
7.Wait for the installation to complete.
INSTALLATION & CONFIGURATION2 - 7
Figure 2-7
8.Installation complete.
Figure 2-8
Installation Progress
Installation Complete
2 - 8 ZEBRA SCANNER SDK FOR WINDOWS DEVELOPER’S GUIDE
Installed Components
There are three Windows services installed with the CoreScanner driver in a default installation:
•
CoreScanner - coordinates activity between the communication layer (SNAPI, IBMHH, SSI, etc.) and
upper level drivers (OPOS, JPOS, SDK API, etc.).