Zebra Rfid: SDK For Windows
Zebra Rfid: SDK For Windows
Developer Guide
MN-003515-01
ZEBRA and the stylized Zebra head are trademarks of Zebra Technologies Corporation, registered in
many jurisdictions worldwide. All other trademarks are the property of their respective owners. ©2019
Zebra Technologies Corporation and/or its affiliates. All rights reserved.
Information in this document is subject to change without notice. The software described in this document
is furnished under a license agreement or nondisclosure agreement. The software may be used or copied
only in accordance with the terms of those agreements.
For further information regarding legal and proprietary statements, please go to:
SOFTWARE: www.zebra.com/linkoslegal
COPYRIGHTS: www.zebra.com/copyright
WARRANTY: www.zebra.com/warranty
END USER LICENSE AGREEMENT: www.zebra.com/eula
Terms of Use
Proprietary Statement
This manual contains proprietary information of Zebra Technologies Corporation and its subsidiaries
(“Zebra Technologies”). It is intended solely for the information and use of parties operating and
maintaining the equipment described herein. Such proprietary information may not be used, reproduced,
or disclosed to any other parties for any other purpose without the express, written permission of Zebra
Technologies.
Product Improvements
Continuous improvement of products is a policy of Zebra Technologies. All specifications and designs are
subject to change without notice.
Liability Disclaimer
Zebra Technologies takes steps to ensure that its published Engineering specifications and manuals are
correct; however, errors do occur. Zebra Technologies reserves the right to correct any such errors and
disclaims liability resulting therefrom.
Limitation of Liability
In no event shall Zebra Technologies or anyone else involved in the creation, production, or delivery of the
accompanying product (including hardware and software) be liable for any damages whatsoever
(including, without limitation, consequential damages including loss of business profits, business
interruption, or loss of business information) arising out of the use of, the results of use of, or inability to
use such product, even if Zebra Technologies has been advised of the possibility of such damages. Some
jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above
limitation or exclusion may not apply to you.
Revision History
Changes to the original guide are listed below:
2
Contents
Terms of Use ................................................................................................................... 2
Proprietary Statement .............................................................................................. 2
Product Improvements ............................................................................................ 2
Liability Disclaimer ................................................................................................... 2
Limitation of Liability ................................................................................................ 2
Revision History .............................................................................................................. 2
3
Contents
4
List of Figures
About This Guide ................................................................................................................................ 7
5
List of Tables
Reader Search Options ................................................................................................. 10
Supported Events .......................................................................................................... 15
Batch Modes ................................................................................................................ 21
6
About This Guide
Introduction
The RFD8500 RFID SDK Windows Developer Guide provides installation and programming information
that allows RFID application development for Windows 7+ and MC55 (.Net Compact Framework).
Chapter Descriptions
Topics covered in this guide are as follows:
• Zebra RFID SDK for Windows Overview provides detailed information about developing
applications using the Windows RFID SDK.
• Creating, Building, and Running Projects provides step-by-step instructions to import the RFID
SDK module and build Windows applications (with Microsoft .net 4.5/Compact framework) to work
with the RFD8500 reader.
• Demo Applications provides information about the demonstration applications available for the
Windows 7 RFID SDK and the Mobile RFID SDK.
Notational Conventions
The following conventions are used in this document:
• Bold text is used to highlight the following:
• 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 sequential
• Sequential lists (e.g., those that describe step-by-step procedures) appear as numbered lists.
7
About This Guide
Service Information
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 Global Customer Support Center at:
www.zebra.com/support.
When contacting Zebra support, please have the following information available:
• Serial number of the unit
• Model number or product name
• Software type and version number.
Zebra responds to calls by e-mail, telephone or fax within the time limits set forth in support agreements.
If your problem cannot be solved by Zebra support, you may need to return your equipment for servicing
and will be given specific directions. Zebra is not responsible for any damages incurred during shipment if
the approved shipping container is not used. Shipping the units improperly can possibly void the warranty.
If you purchased your business product from a Zebra business partner, contact that business partner for
support.
8
Zebra RFID SDK for
Windows Overview
Introduction
This chapter provides detailed basic through advanced information about developing applications using
the Windows RFID SDK.
The Zebra RFID SDK for Windows provides an API that can be used by external applications to manage
and control RFID specific functionality of an RFD8500 RFID reader connected over Bluetooth. The Zebra
RFID SDK for Windows also allows .Net Compact Framework Smart Device Mobile applications to be
developed for the MC55 mobile computer which communicates with the RFD8500 reader.
The Zebra RFID SDK for Windows provides the ability to manage RFID reader connections, perform
various operations with connected RFID readers, configure connected RFID readers, and retrieve other
information related to connected RFID readers.
All available APIs are defined under the Symbol.RFID.SDK namespace. The application uses the interface
IRfidReader to interact with a reader.
Use available IRfidReader interface to register for events, connect with readers, and after successful
connection, perform required operations such as inventory.
If method calls fail, the corresponding method throws an exception. The application should call all API
methods in try-catch blocks for handling exceptions.
Next call GetReaders method of the IRemoteReaderManagement interface instance object that gives a list
of all available/paired RFID readers with a Windows device/PC. Readers list is in the form of
IRfidReaderInfo interface instance collection.
IList<IRfidReaderInfo>allReaders =
readerManagement.GetReaders(ReaderSearchOptions.AllReaders);
9
Zebra RFID SDK for Windows Overview
The Table 1 lists the reader search options that can be specified as a parameter to GetReaders method.
Next call the RfidSdk.RFIDReaderFactory.Create method with the IRfidReaderInfo instance of the device
to communicate with the device as follows.
IRfidReader reader = RfidSdk.RFIDReaderFactory.Create(allReaders[0]);
The returned IRfidReader reader interface is used for performing all operations with RFID reader. To
connect with the reader; use IRfidReader instance Connect() method.
// Establish connection to the RFID Reader
reader.Connect();
In addition, the application can register for IRemoteReaderWatcher instance events in the following way to
get notified of RFID readers getting added (paired) / removed(unpaired), connected/disconnected.
IRemoteReaderWatcher readerWatcher = RfidSdk.RemoteReaderWatcherServicesFactory.Create();
readerWatcher.ReaderAppeared += ReaderWatcher_ReaderAppeared;
readerWatcher.ReaderDisappeared += ReaderWatcher_ReaderDisappeared;
readerWatcher.ReaderConnected += ReaderWatcher_ReaderConnected;
readerWatcher.ReaderDisconnected += ReaderWatcher_ReaderDisconnected;
}
private void ReaderWatcher_ReaderAppeared(object sender, ReaderStatusChangedEventArgs e)
{
}
10
Zebra RFID SDK for Windows Overview
Disconnect
When the application is done with the connection and operations on the RFID reader, call the following
method to close the connection.
// Disconnects reader
reader.Disconnect();
11
Zebra RFID SDK for Windows Overview
Reader Capabilities
The capabilities (or Read-Only properties) of the reader are listed below.
General Capabilities
• Model Name.
• Serial Number.
• Manufacturer Name.
• Manufacture Date.
• Number of antennas supported.
• Is Tag Event Reporting Supported - indicates the reader's ability to report tag visibility state changes
(New Tag, Tag Invisible, or Tag Visibility Changed).
• Is Tag Locationing Supported - indicates the reader's ability to locate a tag.
• Is Hopping Enabled - Not supported.
Gen2 Capabilities
• Block Erase - Supported
• Block Write - Supported
• State Aware Singulation - Supported
• Maximum Number of Operation in Access Sequence - Not supported
• Maximum Pre-filters allowable per antenna - Not supported
• RF Modes - Not supported.
Regulatory Capabilities
• Country Code
• Communication StandardRegion
• Hopping
• Enable Channels.
For setting/getting Region, see Region Is Not Configured on page 11.
12
Zebra RFID SDK for Windows Overview
Singulation Control
The property SingulationControl sets/gets the current settings of singulation control from the reader, for the
given Antenna ID.
The following settings can be configured:
• Session - session number to use for inventory operation.
• Tag Population - an estimate of the tag population in view of the RF field of the antenna.
• Tag Transit Time - an estimate of the time a tag typically remains in the RF field.
ushort curAntennaID = 0;
// Get Singulation
SingulationControl singulationControl =
reader.Configurations.Antennas[curAntennaID].SingulationControl;
Console.WriteLine("Session : "+singulationControl.Session.ToString());
Console.WriteLine("Population : "+singulationControl.TagPopulation.ToString());
Console.WriteLine("TagTransitTime :"+singulationControl.TagTransitTime.ToString());
// Set Singulation
singulationControl.Session = SESSION.SESSION_S1;
singulationControl.TagPopulation = 30;
reader.Configurations.Antennas[curAntennaID].SingulationControl = singulationControl;
Console.WriteLine("SetSingulation : Session = [" + singulationControl.Session + "]");
Console.WriteLine("SetSingulation : TagPopulation:"+
singulationControl.TagPopulation.ToString());
13
Zebra RFID SDK for Windows Overview
Regulatory Configuration
The SDK supports managing of regulatory related parameters of a specific active RFID reader.
Regulatory configuration options are listed below.
• Code of selected region
• Hopping
• Set of enabled channels.
A set of enabled channels includes only such channels that are supported in the selected region. If
hopping configuration is not allowed for the selected regions, a set of enabled channels is not specified.
Regulatory parameters could be retrieved and set via RegulatoryConfig property accordingly. The region
information is retrieved using Region property. The following example demonstrates retrieving of current
regulatory settings and configuring the RFID reader to operate in one of supported regions.
// Get Regulatory Config
RegulatoryConfig regConfig = reader.Configurations.RegulatoryConfig;
Console.WriteLine("Config.RegulatoryConfig.Region : " + regConfig.Region);
Console.WriteLine("Config.RegulatoryConfig.Hopping : " + regConfig.Hopping);
string[] enabledChannels = regConfig.EnabledChannels;
14
Zebra RFID SDK for Windows Overview
Saving Configuration
Various parameters of a specific RFID reader configured via SDK are lost after the next power down. The
SDK provides an ability to save a persistent configuration of RFID reader. The SaveConfig method can be
used to make the current configuration persistent over power down and power up cycles. The following
example demonstrates utilization of mentioned method.
// Saving the configuration
reader.Configurations.SaveConfig();
Managing Events
The application can register for one or more events, to be notified when it occurs. There are several types
of events. Table 2 lists the events supported.
15
Zebra RFID SDK for Windows Overview
16
Zebra RFID SDK for Windows Overview
Basic Operations
17
Zebra RFID SDK for Windows Overview
NOTE: Tag data is not returned in the form of an event when you enable the setting above.
To enable tag data to be received as events use the following App.Config xml <appSettings> section:
<!--Support tag data dispatching via events for Win 7 and above or powerful WM devices
-->
<add key="ZetiResponseDispatcherAssembly"
value="Symbol.RFID.SDK.Domain.Reader.Infrastructure.dll"/>
<add key="ZetiTagDataDispatcher"
value="Symbol.RFID.SDK.Domain.Reader.Infrastructure.ZetiTagDataDispatcher"/>
Read
The application can call method reader.AccessOperations.TagRead.Read() to read data from a specific
memory bank.
Write
The application can call method reader.AccessOperations.TagWrite.Write() to write data to a specific
memory bank. The response is returned as a Tagdata from where number of words can be retrieved.
Lock
The application can call method reader.AccessOperations.TagLock.Lock() to perform a lock operation
on one or more memory banks with specific privileges.
Kill
The application can call method reader.AccessOperations.TagKill.Kill() to kill a tag.
18
Zebra RFID SDK for Windows Overview
Tag Locationing
This feature is supported only on hand-held readers and is useful to locate a specific tag in the field of view
of the reader’s antenna. The default locationing algorithm supported on the reader can perform locationing
only on a single antenna. reader.TagLocate.Perform(string epc) can be used to start locating a tag, and
reader.TagLocate.Stop() to stop the locationing operation. The result of locationing of a tag is reported as
reader.TagLocate.ProximityPercentReceived event and ProximityPercent in
ProximityPercentReceivedEventArgs gives the relative distance of the tag from the reader antenna.
Advance Operations
Using Triggers
Triggers are the conditions that should be satisfied to start or stop an operation (Inventory). This
information can be specified using TriggerInfo class.
Use reader.Configurations.TriggerInfo.StartTrigger and reader.Configurations.TriggerInfo.StopTrigger
methods to set triggers on the reader.
The following are some use-cases of using TRIGGER_INFO.
• Periodic Inventory: Start inventory at a specified time for a specified duration repeatedly.
TriggerInfo triggerInfo = reader.Configurations.TriggerInfo;
// start inventory every 3 seconds
triggerInfo.StartTrigger.Type=START_TRIGGER_TYPE.START_TRIGGER_TYPE_PERIODIC;
triggerInfo.StartTrigger.Periodic.Period=3000
// stop trigger
triggerInfo.StopTrigger.Type=STOP_TRIGGER_TYPE.STOP_TRIGGER_TYPE_DURATION;
triggerInfo.StopTrigger.Duration=5000; // stop after 5 seconds
reader.Configurations.TriggerInfo = triggerInfo;
• Perform 'n' Rounds of Inventory with a timeout: Start condition could be any; Stop condition is to
perform 'n' rounds of inventory and then stop or stop inventory after the specified timeout.
TriggerInfo triggerInfo = reader.Configurations.TriggerInfo;
// start inventory immediate
triggerInfo.StartTrigger.Type=START_TRIGGER_TYPE.START_TRIGGER_TYPE_IMMEDIATE;
// stop trigger
triggerInfo.StopTrigger.Type=STOP_TRIGGER_TYPE.STOP_TRIGGER_TYPE_N_ATTEMPTS_WITH_TIMEOUT;
triggerInfo.StopTrigger.NumAttempts.N=3; // perform 3 rounds of inventory
triggerInfo.StopTrigger.NumAttempts.Timeout=3000; // timeout after 3 seconds
reader.Configurations.TriggerInfo = triggerInfo;
• Read 'n' tags with a timeout: Start condition could be any; Stop condition is to stop after reading 'n' tags
or stop inventory after the specified timeout.
TriggerInfo triggerInfo = reader.Configurations.TriggerInfo;
// start inventory immediate
triggerInfo.StartTrigger.Type = START_TRIGGER_TYPE.START_TRIGGER_TYPE_IMMEDIATE;
// stop trigger
triggerInfo.StopTrigger.Type =
STOP_TRIGGER_TYPE.STOP_TRIGGER_TYPE_TAG_OBSERVATION_WITH_TIMEOUT;
triggerInfo.StopTrigger.TagObservation.N= 5; // number of tag observations
triggerInfo.StopTrigger.TagObservation.Timeout = 10000; // timeout after 10 seconds
reader.Configurations.TriggerInfo = triggerInfo;
19
Zebra RFID SDK for Windows Overview
• Inventory based on hand-held trigger: Start inventory when the reader hand-held trigger button is
pulled, and stop inventory when the hand-held trigger button is released or subject to timeout.
TriggerInfo triggerInfo = reader.Configurations.TriggerInfo;
// start inventory immediate
triggerInfo.StartTrigger.Type = START_TRIGGER_TYPE.START_TRIGGER_TYPE_HANDHELD;
triggerInfo.StartTrigger.Handheld.HandheldEvent =
HANDHELD_TRIGGER_EVENT_TYPE.HANDHELD_TRIGGER_PRESSED; // number of tag
observations
triggerInfo.StartTrigger.Handheld.Timeout = 10000; // timeout after 10 seconds
// stop trigger
triggerInfo.StopTrigger.Type =
STOP_TRIGGER_TYPE.STOP_TRIGGER_TYPE_HANDHELD_WITH_TIMEOUT;
triggerInfo.StopTrigger.Handheld.HandheldEvent=
HANDHELD_TRIGGER_EVENT_TYPE.HANDHELD_TRIGGER_RELEASED; // number of tag
observations
triggerInfo.StopTrigger.Handheld.Timeout = 10000; // timeout after 10 seconds
reader.Configurations.TriggerInfo = triggerInfo;
Using Beeper
Use the reader.Configurations.BeeperVolume property to turn the beeper on/off, and set volume.
Get beeper setting example:
BEEPER_VOLUME beeperVolume = reader.Configurations.BeeperVolume;
string strBeeperVolume = "";
switch (beeperVolume)
{
case BEEPER_VOLUME.HIGH_BEEP:
strBeeperVolume = "HIGH_BEEP";
break;
case BEEPER_VOLUME.MEDIUM_BEEP:
strBeeperVolume = "MEDIUM_BEEP";
break;
case BEEPER_VOLUME.LOW_BEEP:
strBeeperVolume = "LOW_BEEP";
break;
case BEEPER_VOLUME.QUIET_BEEP: // beeper sound off
strBeeperVolume = "QUIET_BEEP";
break;
}
Console.WriteLine("GetBeeperVolume = " + strBeeperVolume);
Batch Mode
When the RFD8500 reader is configured to operate in batch mode, it is capable of reading RFID tag data
without being connected to a host device. The reader.Configurations.BatchModeConfig property can be
used to configure Batch Mode as follows:
reader.Configurations.BatchModeConfig = BATCH_MODE.ENABLE
20
Zebra RFID SDK for Windows Overview
To clear stored batched tags in the reader's internal database, call the reader.Inventory.PurgeTags()
method.
Using Pre-Filters
Pre-filters are the same as the Select command of C1G2 specification. Once applied, pre-filters are
applied prior to Inventory and Access operations.
Singulation
Singulation refers to the method of identifying an individual Tag in a multiple-Tag environment.
In order to filter tags that match a specific condition, it is necessary to use the tag-sessions and their states
(setting the tags to different states based on match criteria - reader.PreFilters.ConfiguredFilters) so that
while performing inventory, tags can be instructed to participate (singulation -
reader.Config.PreFilters.ConfiguredFilters[filterIndex].IsEnable) or not participate in the inventory based
on their states.
Selected Flag
Tags provide a selected flag, SL, which can be asserted or deasserted based on match criteria using
reader.ConfiguredFilters[filterIndex].Action
21
Zebra RFID SDK for Windows Overview
State-Aware Singulation
In state-aware singulation the application can specify detailed controls for singulation: Action and Target.
Action indicates whether matching Tags assert or deassert SL (Selected Flag), or set their inventoried flag
to A or to B. Tags conforming to the match criteria specified using the
reader.ConfiguredFilters[filterIndex].Action are considered matching and the remaining are non-matching.
Target indicates whether to modify a tag’s SL flag or its inventoried flag, and in the case of inventoried it
further specifies one of four sessions.
Applying Pre-Filters
Follow these steps to use pre-filters.
1. Add pre-filters.
The application can update pre-filters using the reader.ConfiguredFilters list to add and remove
pre-filters.
2. Set appropriate singulation controls.
Now that the pre-filters are set (i.e., tags are classified into matching or non-matching criteria), the
application needs to specify which tags should participate in the inventory using
reader.Configurations.Antennas[curAntennaID].SingulationControl.
3. Perform Inventory or Access operation.
Inventory or Access operation when performed after setting pre-filters, use the tags filtered out of
pre-filters for their operation.
Exceptions
The Zebra RFID Windows SDK throws standard .Net exceptions. All API calls should be under try-catch
block to catch exceptions thrown while performing API calls.
try
{
// Establish connection to the RFID Reader
reader.Connect();
}
catch (Exception e)
{
Debug.Print(e.Message);
}
22
Creating, Building, and
Running Projects
Introduction
This chapter provides step-by-step instructions to import the RFID SDK module and build Windows
applications (with Microsoft .net 4.5/Compact framework) to work with the RFD8500 reader.
NOTE: To build a Microsoft .net 4.5 application for Window 7 use Visual Studio 2015.
For .Net Compact Framework MC55 mobile applications use Visual Studio 2008 (and the Windows Mobile 6
SDK).
23
Creating, Building, and Running Projects
24
Creating, Building, and Running Projects
<add key="RemoteReaderConnectionAssembly"
value="Symbol.RFID.SDK.Connectivity.Windows.dll"/>
<add key="RemoteReaderConnectionService"
value="Symbol.RFID.SDK.Connectivity.Windows.SocketDeviceConnection"/>
<add key="RemoteReaderDiscoveryServiceAssembly"
value="Symbol.RFID.SDK.Discovery.Windows.dll"/>
<add key="RemoteReaderDiscoveryService"
value="Symbol.RFID.SDK.Discovery.Windows.ReaderWatcher"/>
<add key="RemoteReaderInfrastructureServiceAssembly"
value="Symbol.RFID.SDK.Domain.Reader.Infrastructure.dll"/>
<add key="RemoteReaderInfrastructureService"
value="Symbol.RFID.SDK.Domain.Reader.Infrastructure.ZetiRfidReaderAdapter"/>
<add key="RemoteReaderManagementServiceAssembly"
value="Symbol.RFID.SDK.Domain.Reader.Infrastructure.Management.dll"/>
<add key="RemoteReaderManagementService"
value="Symbol.RFID.SDK.Domain.Reader.Infrastructure.Management.RemoteReaderManagement"/>
</appSettings>
</configuration>
NOTE: Ensure the specified DLLs are present in the target application folder and add the <appSettings> section above
to the App.Config xml configuration file of the project. The settings above are for Desktop Windows RFID reader
connections using Bluetooth sockets.
25
Creating, Building, and Running Projects
26
Creating, Building, and Running Projects
• Symbol.RFID.SDK.dll
• Symbol.RFID.SDK.Domain.Reader.dll
For Compact Framework applications built with Visual Studio 2008 (for the MC55) use the serial
connection with StoneStreet One Bluetooth stack. Only StoneStreet One Bluetooth stack is supported for
Mobile Compact Framework applications. Add the following settings to the App.Config file and ensure the
correct paths are specified for the target assemblies.
<configuration>
<appSettings>
<add key="RemoteReaderAssembly" value="Symbol.RFID.SDK.Domain.Reader.dll"/>
<add key="RemoteReaderService" value="Symbol.RFID.SDK.Domain.Reader.ZetiRfidReader"/>
<add key="RemoteReaderConnectionAssembly"
value="Assemblies\Symbol.RFID.SDK.Connectivity.Windows.dll"/>
<add key="RemoteReaderConnectionService"
value="Symbol.RFID.SDK.Connectivity.Windows.SerialPortDeviceConnection"/>
<add key="RemoteReaderDiscoveryServiceAssembly"
value="Assemblies\Symbol.RFID.SDK.Discovery.Windows.dll"/>
<add key="RemoteReaderDiscoveryService"
value="Symbol.RFID.SDK.Discovery.Windows.ReaderWatcherSS"/>
<add key="RemoteReaderInfrastructureServiceAssembly"
value="Symbol.RFID.SDK.Domain.Reader.Infrastructure.dll"/>
<add key="RemoteReaderInfrastructureService"
value="Symbol.RFID.SDK.Domain.Reader.Infrastructure.ZetiRfidReaderAdapter"/>
<add key="RemoteReaderManagementServiceAssembly"
value="Assemblies\Symbol.RFID.SDK.Domain.Reader.Infrastructure.Management.dll"/>
<add key="RemoteReaderManagementService"
value="Symbol.RFID.SDK.Domain.Reader.Infrastructure.Management.RemoteReaderManagementSS"/>
<add key="ZetiResponseDispatcherAssembly"
value="Symbol.RFID.SDK.Domain.Reader.Infrastructure.dll"/>
<add key="ZetiTagDataDispatcher"
value="Symbol.RFID.SDK.Domain.Reader.Infrastructure.ZetiTagDataQueuingDispatcher"/>
</appSettings>
</configuration>
27
Creating, Building, and Running Projects
28
Demo Applications
29
Demo Applications
30
www.zebra.com