Zebra RFD8500 UHF RFID Bluetooth Sled RFD8500/i RFID Developer Guide (en)

RFD8500/i RFID DEVELOPER GUIDE

RFD8500/i RFID
DEVELOPER GUIDE
MN002222A04
Revision A
December 2016
ii RFD8500/i RFID Developer Guide
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.

Warranty

For the complete Zebra hardware product warranty statement, go to:
http://www.zebra.com/warranty

Revision History

Changes to the original manual are listed below:
Change Date Description
-01 Rev A 10/2015 Initial Release
-02 Rev A 3/2016 Software Maintenance Updates
-03 Rev A 9/2016 Updates for the standard RFD8500 (for Rev C software) and RFD8500i; changed
-04 Rev A 12/2016 Updates for Rev D software.
.
references of ’DUT’ to RFD8500.

TABLE OF CONTENTS

Warranty ......................................................................................................................................... ii
Revision History.............................................................................................................................. ii
About This Guide
Introduction..................................................................................................................................... ix
Chapter Descriptions ...................................................................................................................... ix
Related Documents ........................................................................................................................ x
Notational Conventions................................................................................................................... xi
Service Information......................................................................................................................... xi
Chapter 1: RFD8500 DEVICE OVERVIEW
Introduction .................................................................................................................................... 1-1
System Requirements .................................................................................................................... 1-1
Setting up the Device ..................................................................................................................... 1-1
Resetting the Device ...................................................................................................................... 1-2
Enabling Bluetooth® (BT) .............................................................................................................. 1-2
Using Bluetooth on the RFD8500 ............................................................................................ 1-2
Pairing with Bluetooth .............................................................................................................. 1-3
Pairing with Android Devices ............................................................................................. 1-3
Pairing with a Personal Computer ...................................................................................... 1-3
Pairing with an iOS Device ................................................................................................. 1-4
Pairing using S/N Bar Code ............................................................................................... 1-5
Using a PC Based Terminal Over ZETI with the RFD8500 ........................................................... 1-5
Chapter 2: GETTING STARTED with the ZEBRA RFID APPLICATION
and SETTING UP the RFID SDK for iOS XCODE PROJECT
Introduction .................................................................................................................................... 2-1
Using the Zebra RFID Application for iOS with iOS Devices ......................................................... 2-1
Setting up an XCode Project for SDK-based iOS Applications ...................................................... 2-2
iv RFD8500/i RFID Developer Guide
Chapter 3: ZEBRA RFID SDK for iOS
Introduction .................................................................................................................................... 3-1
RFID SDK Basics .......................................................................................................................... 3-1
Receiving Asynchronous Notifications from the SDK .............................................................. 3-2
Connectivity Management ............................................................................................................. 3-2
Knowing the Reader Related Information ...................................................................................... 3-5
Knowing the Software Version ................................................................................................. 3-5
Knowing the Reader Capabilities ............................................................................................. 3-6
Knowing Supported Regions ................................................................................................... 3-8
Knowing Supported Link Profiles ............................................................................................. 3-10
Knowing Battery Status ............................................................................................................ 3-11
Configuring the Reader .................................................................................................................. 3-11
Antenna Configuration ............................................................................................................. 3-12
Singulation Configuration ......................................................................................................... 3-14
Trigger Configuration ............................................................................................................... 3-16
Tag Report Configuration ......................................................................................................... 3-19
Regulatory Configuration ......................................................................................................... 3-20
Pre-filters Configuration ........................................................................................................... 3-22
Beeper Configuration ............................................................................................................... 3-25
Managing Configuration ........................................................................................................... 3-26
Performing Operations ................................................................................................................... 3-27
Rapid Read .............................................................................................................................. 3-27
Inventory .................................................................................................................................. 3-29
Inventory with Pre-filters .......................................................................................................... 3-32
Tag Locationing ....................................................................................................................... 3-33
Access Operations ................................................................................................................... 3-34
Access Criteria ................................................................................................................... 3-36
Timeout Value .................................................................................................................... 3-36
srfidSetUniqueTagReportConfiguration ................................................................................... 3-36
srfidGetUniqueTagReportConfiguration ................................................................................... 3-37
srfidAuthenticate ...................................................................................................................... 3-37
srfidUntraceable ....................................................................................................................... 3-37
srfidReadBuffer ........................................................................................................................ 3-37
srfidSetCryptoSuite .................................................................................................................. 3-37
srfidStopOperation ................................................................................................................... 3-37
Chapter 4: GETTING STARTED WITH THE ZEBRA RFID MOBILE APPLICATION
and RFID API3 SDK for ANDROID
Introduction .................................................................................................................................... 4-1
Installing Android Studio ................................................................................................................ 4-1
Importing the Zebra RFID Mobile Application Project .................................................................... 4-2
Building and Running a Project ..................................................................................................... 4-4
RFID API3 Android SDK ................................................................................................................ 4-7
Creating an Android Project ..................................................................................................... 4-7
Table of Contents v
Chapter 5: ZEBRA RFID SDK for Android
Introduction .................................................................................................................................... 5-1
Basics ...................................................................................................................................... 5-1
Connection Management ............................................................................................................... 5-2
Connect to an RFID Reader .................................................................................................... 5-2
Special Connection Handling Cases .................................................................................. 5-2
Disconnect ............................................................................................................................... 5-4
Reconnect ................................................................................................................................ 5-4
Knowing the Reader Capabilities ................................................................................................... 5-4
General Capabilities ................................................................................................................. 5-4
Gen2 Capabilities ..................................................................................................................... 5-4
Regulatory Capabilities ............................................................................................................ 5-5
UHF Band Capabilities ............................................................................................................. 5-5
Reader Identification ................................................................................................................ 5-5
Configuring the Reader .................................................................................................................. 5-6
RF Mode .................................................................................................................................. 5-6
Antenna Specific Configuration ................................................................................................ 5-6
Antenna Configuration ....................................................................................................... 5-6
Singulation Control ............................................................................................................. 5-7
Tag Report Configuration ......................................................................................................... 5-8
Regulatory Configuration ......................................................................................................... 5-8
Beeper Configuration ............................................................................................................... 5-9
Dynamic Power Management Configuration ........................................................................... 5-9
Saving Configuration ................................................................................................................ 5-9
Managing Events ........................................................................................................................... 5-10
Device Status Related Events ................................................................................................. 5-12
Basic Operations ............................................................................................................................ 5-12
Tag Storage Settings ............................................................................................................... 5-12
Simple Inventory (Continuous) ........................................................................................... 5-13
Simple Access Operations - On Single Tag ....................................................................... 5-13
Read ................................................................................................................................... 5-13
Write, Block-Write .............................................................................................................. 5-14
Lock .................................................................................................................................... 5-14
Kill ...................................................................................................................................... 5-15
Block-Erase ........................................................................................................................ 5-15
Block-Permalock ................................................................................................................ 5-15
Access Operations on Specific Memory Field of Single Tag ............................................. 5-16
Advanced Operations .................................................................................................................... 5-16
Using Pre-Filters ...................................................................................................................... 5-16
Introduction .............................................................................................................................. 5-16
Singulation ......................................................................................................................... 5-16
Sessions and Inventoried Flags ......................................................................................... 5-16
Selected Flag ..................................................................................................................... 5-17
State-Aware Singulation ..................................................................................................... 5-17
Applying Pre-Filters ............................................................................................................ 5-17
Add Pre-filters .................................................................................................................... 5-17
Using Triggers .......................................................................................................................... 5-19
Inventory .................................................................................................................................. 5-21
Inventory with Triggers ....................................................................................................... 5-21
Access ..................................................................................................................................... 5-22
Using Access-Filters .......................................................................................................... 5-22
vi RFD8500/i RFID Developer Guide
Access Operation on Multiple Tags ................................................................................... 5-22
Using Access Sequence .......................................................................................................... 5-25
Gen2v2 Operations .................................................................................................................. 5-26
authenticate ............................................................................................................................. 5-26
untraceable ........................................................................................................................ 5-28
Tag Locationing ............................................................................................................................. 5-29
Exceptions ..................................................................................................................................... 5-30
Exception Handling .................................................................................................................. 5-30
Chapter 6: ZEBRA RFID MOBILE APPLICATION for WINDOWS PHONE
Introduction .................................................................................................................................... 6-1
Installing and Understanding the UWP .......................................................................................... 6-1
Creating a Sample Application ...................................................................................................... 6-2
BluetoothRfcommChat Sample Application ................................................................................... 6-4
Downloading UWP Sample Applications ....................................................................................... 6-5
Chapter 7: ZETI PROGRAMMING GUIDE
ZETI Prerequisites ...................................................................................................... ................... 7-1
ZETI Format ................................................................................................................................... 7-2
General Flow. ................................................................................................................................ 7-4
Getting the Reader Capabilities ..................................................................................................... 7-5
Configuring the Reader .................................................................................................................. 7-5
Antenna Configuration ............................................................................................................. 7-5
Report Configuration ................................................................................................................ 7-6
Beeper Configuration ............................................................................................................... 7-6
Simple Inventory and Abort ........................................................................................................... 7-7
Handling Tags, Events and Start/Stop Notifications ...................................................................... 7-7
Simple Access Operation (Read, Write, Lock, Kill) ........................................................................ 7-8
Advanced Operations .................................................................................................................... 7-10
Using Pre-Filters ...................................................................................................................... 7-10
Using Start and Stop Triggers .................................................................................................. 7-11
Access with Access Criteria ..................................................................................................... 7-13
Access Sequence .................................................................................................................... 7-13
NXP Gen2V2 Features ............................................................................................................ 7-14
Tag Locationing ............................................................................................................................. 7-15
Batch Mode and getTags, PurgeTags ........................................................................................... 7-16
Management and Configuration .................................................................................................... 7-17
Setting and Getting Region Configuration ............................................................................... 7-17
SaveConfig Including resetTodefaults ..................................................................................... 7-17
Connection with Password ....................................................................................................... 7-17
ASCII Protocol Configuration ................................................................................................... 7-18
GetVersion ............................................................................................................................... 7-19
Battery and Device Information ................................................................................................ 7-19
Appendix A: ZETI REFERENCE
ZETI Interface Command Reference ............................................................................................. A-1
Possible Errors Reported Back for ZETI Commands .................................................................... A-45
Generic Errors Applicable to ZETI Commands .............................................................................. A-56
Radio Protocol Specific Errors Returned For An Operation .......................................................... A-57
Command Specific Errors for Different ZETI Commands .............................................................. A-58
Table of Contents vii
Appendix B: COMMANDS and ATTRIBUTE REFERENCES
Appendix C: NFC BASED CONNECTION to RFD8500i USING the ANDROID APPLICATION DEVELOP­ER
General Application NFC Implementation for RFD8500i ............................................................... C-1
EMDK Usage for NFC Functionality .............................................................................................. C-2
Initialization .............................................................................................................................. C-2
Connecting on Receiving the NFC Intent ................................................................................. C-3
Setting up Foreground Dispatchers ......................................................................................... C-5
Disabling/Enabling NFC ........................................................................................................... C-5
viii RFD8500/i RFID Developer Guide

ABOUT THIS GUIDE

Introduction

The RFD8500 RFID Developer Guide provides installation and programming information for the Software
Developer Kit (SDK) that allows RFID application development for Android and iOS devices.

Chapter Descriptions

This guide includes the following topics:
Chapter 1, RFD8500 DEVICE OVERVIEW provides an overview of the RDF8500 device including system
requirements, device setup, enabling Bluetooth, pairing information, using the Zebra RFID Mobile application for Android, using the Zebra RFID application for iOS, and using a PC Based Terminal Over ZETI with the RFD8500.
Chapter 2, GETTING STARTED with the ZEBRA RFID APPLICATION and SETTING UP the RFID SDK for iOS XCODE PROJECT provides instructions to import and run the Zebra RFID Mobile Application code and
to set up a new XCode project to work with the Zebra RFID SDK for iOS.
Chapter 3, ZEBRA RFID SDK for iOS provides detailed information about how to develop iOS applications
using the Zebra RFID SDK for iOS.
Chapter 4, GETTING STARTED WITH THE ZEBRA RFID MOBILE APPLICATION and RFID API3 SDK for ANDROID provides instruction for importing Zebra RFID Mobile Application and setting up new Android
application project using the Zebra RFID SDK for Android.
Chapter 5, ZEBRA RFID SDK for Android provides detailed information about how to use various
functionality of SDK from basic to advance to develop Android application using the Zebra RFID SDK for Android.
Chapter 6, ZEBRA RFID MOBILE APPLICATION for WINDOWS PHONE provides information to setup a
development environment for the Windows 10 Universal Windows Platform (UWP) to wo rk with the RFD8500 over Bluetooth.
Chapter 7, ZETI PROGRAMMING GUIDE provides information for developing applications using the ZETI
interface directly.
Appendix A, ZETI REFERENCE provides a ZETI Interface Command Reference table.
Appendix B, COMMANDS and ATTRIBUTE REFERENCES includes commands and attributes.
x RFD8500/i RFID Developer Guide

Related Documents

Zebra Scanner SDK for Android Developer Guide, p/n MN002223Axx.
Zebra Scanner SDK for iOS Developer Guide, p/n MN001834Axx.
Java Class Reference Guide - This guide is in HTML format located under the javadoc directory in the RFID SDK for Android distribution package.
Zebra RFID SDK for iOS API document (Zebra_Bluetooth_RFID_iOS_SDK_API.pdf) - This document is packaged with Zebra_RFID_SDK_1.0.*.pkg an d is located und er \Zebra Technologies\RFID SDK\doc\ at the package installation path.
RFD8500 User Guide, p/n MN002065Axx.
RFD8500i User Guide, p/n MN-002761-XX.
RFD8500 Quick Start Guide, p/n MN002225Axx.
RFD8500i Quick Start Guide, p/n MN-002760-XX
RFD8500 Regulatory Guide, p/n MN002062Axx.
RFD8500i Regulatory Guide, p/n MN-002856-xx.
CRDUNIV-RFD8500-1R Three Slot Universal Charge Only Cradle Regulatory Guide, p/n MN002224 Axx.
RFD8500 Bluetooth Pairing Using S/N Barcode White Paper, available at: www.zebra.com/support.
Zebra RFD8500 Attribute Data Dictionary, available at: www.zebra.com/support.
Zebra Scanner SDK Attribute Data Dictionary. p/n 72E-149786-XX.
For the latest version of this guide and all guides, go to: www.zebra.com/support
.

Notational Conventions

This document uses the following conventions:
The prefix SRFID is used to reference Zebra RFID SDK for iOS APIs via Bluetooth.
The abbreviation for Bluetooth is BT.
The acronym ZETI is an acronym for Zebra Easy Text Interface.
Italics are used to highlight chapters, sections, screen names, and field names in this and related documents
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.
NOTE This symbol indicates something of special interest or importance to the reader. Failure to read the note
will not result in physical harm to the reader, equipment or data.
ABOUT THIS GUIDE xi
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

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:
http://www.zebra.com/support.
When contacting Zebra support, please have the following information available:
Product name
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.
injury may occur.
If you purchased your business product from a Zebra business partner, contact that business partner for support.
xii RFD8500/i RFID Developer Guide

Chapter 1 RFD8500 DEVICE OVERVIEW

Introduction

This chapter provides an overview of the RDF8500 device including system requirements, device setup, enabling Bluetooth, pairing information, using the Zebra RFID Mobile application for Android, using the Zebra RFID application for iOS, and using a PC Based Terminal Over ZETI with the RFD8500.

System Requirements

Developer Computers: Windows 7/64-bit, MacBook Pro with at least 8 Gb of memory.
Android: Android Studio (1.0 or later), and Android API Level 19 or later. The recommended Android
device version is KitKat 4.4.x.
iOS: iOS SDK 7.0 or later; XCode version 6.0 or later. The recommended iOS version is 8.0 or later.
Recommended devices: iPod Touch (5th generation), and iPhone 6.

Setting up the Device

To setup the device:
1. Fully charge the RFD8500 battery by using a USB cable connected to a PC or charger. It is recommen ded
to use a USB power adapter rated at 1.2A
When the RFD8500 is fully charged the power LED stops blinking and the unit goes into to Off Mode.
IMPORTANT The RFD8500 can not fully boot up if the battery level is low.
2. Disconnect the USB cable and reset the unit by pressing the Power button (if the unit is on, press Power
for 3 seconds to turn it off, and press again to turn it on).
3. Enable Bluetooth
4. To avoid the device moving into low power mode, reconnect the USB cable.
®
.
. See Enabling Bluetooth® (BT).
1 - 2 RFD8500/i RFID Developer Guide

Resetting the Device

To reset the RFD8500, press the Power button for 3 seconds.
To reset to factory default procedures, press the Power and Bluetooth buttons simultaneously for 3 seconds.

Enabling Bluetooth® (BT)

Using Bluetooth on the RFD8500

The RFD8500 supports a dual SPP port - SSI and RFID serial ports with Android devices.
The custom UUIDs listed below are exposed for SSI and RFID to be used from the Android device.
SSI Custom UUID - 39f8fbf4-dc42-86c6-d163-79a0dcc58858
RFID Custom UUID - 2ad8a392-0e49-e52c-a6d2-60834c012263
Standard SPP UUID - 00001101-0000-1000-8000-00805F9B34FB.
BT profiles: SPP, HID, and MFi modes.
The RFD8500 supports MFi mode (iAP framework) to connect to iOS devices.
RFID functions are supported using the new ZETI protocol (see Appendix A, ZETI REFERENCE). For iOS devices, SDKs, and the Zebra RFID application for iOS are provided using ZETI in MFI mode. For Android devices only the Zebra RFID Mobile application for Android is provided using ZETI in BT SPP mode. The SDK for Android and Zebra RFID Mobile with API showcasing the use of the SDK is also supported.
Bar code functions are supported using the Simple Serial Interface (SSI) protocol for scanners. For iOS devices, SDKs and the Zebra Scanner Control for iOS application are provided, and it works in MFI mode. For Android devices, an SDK and two Zebra RFID Mobile applications are provided. One of the demo applications uses the ZETI in BT SPP mode, and the other uses the Android APIs. See Related
Documents on page x for information on the scanner developer guides.
RFD8500 DEVICE OVERVIEW 1 - 3

Pairing with Bluetooth

Prior to pairing, note the following to identify the device:
Device S/N is printed on the device sticker on the back of the antenna as well as below the battery.
NOTE The RFD8500 requires a physical trigger press for BT pairing to complete. The paring request
is visible when a blue BT LED blinks on the RFD8500.
Pairing with Android Devices
1. Go to Settings > Bluetooth > Search for devices.
2. If the BT LED is not blinking, press the BT button for 1 second to make th e RFD8500 di scoverable ( the BT
LED starts blinking when in discoverable mode). When the device appears in the list tap the device name.
3. When the BT LED starts to blink rapidly, press the RFD8500 trigger within 25 seconds to accept the pairing
request.
Figure 1-1
Pairing with an Android Device
Pairing with a Personal Computer
1. If the BT LED is not blinking, press the BT button for 1 second to make th e RFD8500 di scoverable ( the BT
LED starts blinking when in discoverable mode). From the Start menu, select Device and Printers. Select
Add a device.
2. Select the device and click Next. When the BT LED starts blinking rapidly press the trigger within 25
seconds to acknowledge pairing.
Figure 1-2
Adding a Device to Pair
1 - 4 RFD8500/i RFID Developer Guide
3. Click Close to complete the pairing process.
Figure 1-3
4. When the device is successfully paired, right click to check its properties. Select the Services tab and
Adding a Device to Pair
record the assigned COM port number for SPP.
Figure 1-4
Checking Device Properties
Pairing with an iOS Device
See Pairing with Android Devices on pa ge 1-3 for the pairing process. The iOS process is similar to the Android pairing process.
Pairing using S/N Bar Code
The RFD8500 can be paired with a host that can scan the bar code printed at the bottom of the RFD8500 antenna.
An Android de mo applica tion, sample code , and a white paper ( see Relate d Documents on p age x) descr ibing this Bluetooth pairing process can be obtained by sending a request to Zebra support.
The procedure generally entails the following, in this order:
1. Run the Android demo application.
2. Press the RFD8500 Bluetooth button to start Bluetooth discovery mode.
3. Scan the RFD8500 S/N bar code at the bottom of the RFD8500 antenna.
4. Press the RFD8500 trigger to complete the pairin g pr oc ess.

Using a PC Based Terminal Over ZETI with the RFD8500

5. Open the PC based terminal application.
RFD8500 DEVICE OVERVIEW 1 - 5
6. Connect to the COM port identified in Checking Device Properties on page 1-4.
7. Run the cn command to connect with the RFD8500.
8. Run the gv command to get version related information.
NOTE The region must be set before proceeding to the RFID operation region.
9. Run the in command to read the tags.
10. Run the a command to abort the operation.
Figure 1-5
Commands
1 - 6 RFD8500/i RFID Developer Guide
Chapter 2 GETTING STARTED with the
ZEBRA RFID APPLICATION and SETTING UP the RFID SDK for iOS XCODE PROJECT

Introduction

This chapter provides step-by-step instructions to import and run the Zebra RFID Mobile Application code and to set up a new XCode project to work with the Zebra RFID SDK for iOS.

Using the Zebra RFID Application for iOS with iOS Devices

The iOS application must be compiled from sources to be deployed to your iOS devices. Recommendations:
iOS version is 8.0 or later.
Devices - iPod Touch (5th generation); iPhone 6. Use XCode to open the RFIDDemoApp project (RFIDDemoApp.xcodeproj). From XCode select iPhone6 as
the target device and build the project.
Figure 2-1
Successful Build Screen
2 - 2 RFD8500/i RFID Developer Guide

Setting up an XCode Project for SDK-based iOS Applications

To set up a new XCode project to work with the Zebra RFID SDK for iOS:
1. In XCode IDE, click Single View Application to create a new iOS Application project.
Figure 2-2
2. Click Next.
3. Choose the options for the project.
Choosing Project Template
Figure 2-3
Choosing Project Options
GETTING STARTED with the ZEBRA RFID APPLICATION and SETTING UP the RFID SDK for iOS XCODE PROJECT 2 - 3
4. Copy the symbolrfid-sdk folder with static library and headers from the Zebra RFID SDK for iOS installation
directory to the root folder of your XCode project.
NOTE Symbolic link can also be used instead of copying.
Figure 2-4
5. Configure your XCode project to support the com.zebra.rfd8x00_easytext external accessory
Copying Folder to Project
communication protocol by including the UISupportedExternalAccessoryProtocols key in your application's Info.plist file, or via the [Info] tab of your project settings.
Figure 2-5
Configure the Supported External Accessory Protocols
2 - 4 RFD8500/i RFID Developer Guide
6. If your application is able to communicate with BT RFID readers in a background mode, configure your
XCode project to declare the background modes your application supp orts by including the UIBackgroundModes key in your application's Info.plist file, or via the [Info] tab of your project settings.
Figure 2-6
7. Configure your application to link with the default iOS frameworks listed below that are required for
Configure the Required Background Modes
utilization of the Zebra RFID SDK for iOS via [Link Binary With Libraries] section of the [Build Phases] tab of your project settings.
- ExternalAccessory.framework
- CoreBluetooth.framework
Figure 2-7
Configure the Linked Libraries
GETTING STARTED with the ZEBRA RFID APPLICATION and SETTING UP the RFID SDK for iOS XCODE PROJECT 2 - 5
8. Configure your XCode project to make Zebra RFID SDK for iOS headers available through the
$(SRCROOT)/symbolrfid-sdk/include/ value of the [User Header Search Paths] option in the [Search Paths] section of the [Build Settings] tab of your project settings.
Figure 2-8
9. Configure your application to link with the Zebra RFID SDK for iOS static library through the [Link Binary
Configure the User Header Search Paths
With Libraries] section of the [Build Phases] tab of your project settings.
Figure 2-9
Link Application to the Zebra RFID SDK for iOS Static Library
2 - 6 RFD8500/i RFID Developer Guide
Figure 2-10
Select the Static Library - libsymbolrfid-sdk.a
Figure 2-11
Selected Library in the List of Linked Libraries

Chapter 3 ZEBRA RFID SDK for iOS

Introduction

This chapter provides detailed information about how to develop iOS applications using the Zebra RFID SDK for iOS.
The Zebra RFID SDK for iOS allows an application to communicate with RFID readers that support the ASCII protocol interface and are connected to an iOS device wirelessly via Bluetooth.
The Zebra RFID SDK for iOS provides the API that can be used by external applications to manage connections of remote RFID readers, and to control connected RFID readers.

RFID SDK Basics

NOTE Detailed API documentation can be found in Zebra_Bluetooth_RFID_iOS_SDK_API.pdf distributed with
the Zebra RFID SDK for iOS (see Related Documents on page x.)
The Zebra RFID SDK for iOS is intended for interaction with RFID readers connected to an iOS device via Bluetooth wireless interface. The SDK provided an ability to manage RFID readers' connections, performing various operations with connected RFID readers, configuring connected RFID readers and knowing other information related to connected RFID readers.
The Zebra RFID SDK for iOS consists of a static library that is supposed to be linked with an external iOS application and a set of necessary header files. Step -by-step instructions for configur ing XCode project to enable utilization of Zebra RFID SDK for iOS are provided in Getting Started document.
All available API functions are defined by srfidISdkApi Objective C protocol. A single shared instance of an API object that implements srfidISdkApi protocol can be obtained via createRfidSdkApiInstance method of srfidSdkFactory class.
/* variable to store single shared instance of API object */ id <srfidISdkApi> apiInstance; /* receiving single shared instance of API object */ apiInstance = [srfidSdkFactory createRfidSdkApiInstance]; /* getting SDK version string */ NSString *sdk_version = [apiInstance srfidGetSdkVersion]; NSLog(@"Zebra SDK version: %@\n", sdk_version);
3 - 2 RFD8500/i RFID Developer Guide

Receiving Asynchronous Notifications from the SDK

The SDK supports a set of asynchronous notifications to inform the application about RFID reader related events (e.g., reception of tag data, starting of radio operation, etc.) and connectivity related events (e.g., appearance of RFID reader). All supported callbacks are defined by srfidISdkApiDelegate Objective C protocol.
In order to receive asynchronous notification s from the SDK the application performs the following steps.
1. Create an object that implements srfidISdkApiDelegateProtocol.
/* definition of class that implements srfidISdkApiDelegate protocol */ @interface EventReceiver : NSObject <srfidISdkApiDelegate> {
/* variables */
/* methods definition */
Register the created object as notification receiver via srfidSetDelegate API function.
2.
/* registration of callback interface with SDK */ EventReceiver *eventListener = [[EventReceiver alloc] init]; apiInstance srfidSetDelegate:eventListener];
Subscribe for asynchronous event of specific ty pes via srfidSubscribeForEvents API function.
3.
/* subscribe for tag data and operation status related events */ [apiInstance srfidSubsribeForEvents:(SRFID_EVENT_MASK_READ | SRFID_EVENT_MASK_STATUS)]; /* subscribe for battery and hand-held trigger related events */ [apiInstance srfidSubsribeForEvents:(SRFID_EVENT_MASK_BATTERY | SRFID_EVENT_MASK_TRIGGER)];
If a specific object is registered as a notification receiver the SDK calls the corresponding method of the registered object when a specific event occurs if the application is subscribed for events of this type. The SDK may deliver asynchronous events on a main thre ad or on on e of SDK helpe r th re ad s so the ob ject t hat implements srfidISdkApiDelegate protocol is thread-safe.

Connectivity Management

The Zebra RFID SDK for iOS is designed to support interaction with RFID readers operating in either BT MFi or BT LE mode. The SDK is intentionally configured to enable communication with a specific type of RFID readers via srfidSetOperationalMode API function. If operating mode of the SDK is not configured the SDK remains disabled and is not able to communicate with RFID readers in neither BT MFi nor BT LE modes.
Following example demonstrates enabling interaction with RFID readers in BT MFi mode.
/* configuring SDK to communicate with RFID readers in BT MFi mode */ [apiInstance srfidSetOperationalMode:SRFID_OPMODE_MFI];
The following terms are introduced to distinguish RFID readers that are seen by the SDK via OS API and RFID readers with which the SDK established a logical communication session and is able to interact. An RFID reader is called available if it is already connected to the iOS device via Bluetooth. The RFID reader is seen by the SDK and the SDK can establish a logical communication session to interact with the RFID reader. If a logical communication session is established with an already connected (via Bluetooth) RFID reader, the RFID reader is called active.
The SDK maintains internal lists of active and available RFID readers. The following example demonstrates reception of lists of active and available RFID readers from the SDK.
(continued on next page)
ZEBRA RFID SDK for iOS 3 - 3
/* allocate an array for storage of list of available RFID readers */ NSMutableArray *available_readers = [[NSMutableArray alloc] init];
/* allocate an array for storage of list of active RFID readers */ NSMutableArray *active_readers = [[NSMutableArray alloc] init];
/* retrieve a list of available readers */ [apiInstance srfidGetAvailableReadersList:&available_readers];
/* retrieve a list of active readers */ [apiInstance srfidGetActiveReadersList:&active_readers];
/* merge active and available readers to a single list */ NSMutableArray *readers = [[NSMutableArray alloc] init]; [readers addObjectsFromArray:active_readers]; [readers addObjectsFromArray:available_readers]; [active_readers release]; [available_readers release];
for (srfidReaderInfo *info in readers) {
/* print the information about RFID reader represented by srfidReaderInfo object */
NSLog(@"RFID reader is %@: ID = %d name = %@\n", (([info isActive] == YES) ? @"active" : @"available"), [info getReaderID], [info getReaderName]); }
[readers release];
The SDK supports automatic detection of appearance and disap pearance of available RFID reader s. When the Available readers detection option is enabled the SDK updates its internal list of available RFID readers and delivers a corresponding asynchronous notification once it detects connection or disconnection of a specific RFID reader to the iOS device via Bluetooth . If the option is disabled the SDK updates its internal list of available RFID readers only when it is requested by an application via srfidGetAvailableReadersList API function. Following example demonstrates enabling of automatic detection and processing of corresponding asynchronous notifications.
/* subscribe for connectivity related events */ [apiInstance srfidSubsribeForEvents:(SRFID_EVENT_READER_APPEARANCE | SRFID_EVENT_READER_DISAPPEARANCE)]; /* configuring SDK to detect appearance and disappearance of available RFID readers */ [apiInstance srfidEnableAvailableReadersDetection:YES];
/* EventReceiver class: partial implementation */ @implementation EventReceiver ...
-(void)srfidEventReaderAppeared:(srfidReaderInfo*)availableReader {
/* print the information about RFID reader represented by srfidReaderInfo object */
NSLog(@"RFID reader has appeared: ID = %d name = %@\n", [availableReader getReaderID], [availableReader getReaderName]); }
-(void)srfidEventReaderDisappeared:(int)readerID { NSLog(@"RFID reader has disappeared: ID = %d\n", readerID); } ... @end
3 - 4 RFD8500/i RFID Developer Guide
To enable interaction with a specific available RFID reader the application shall establish a logical communication session via srfidEstablishCommunicationSession API function. The SDK will deliver a corresponding asynchronous notification once the logical communication session is established if the application has subscribed for events of this type. To perform various operations wit h a specific active RFID reader the application shall also establish an ASCII protocol leve l connection via srfidEstablishAsciiConne ction API function. Without an established ASCII protocol level connection most of API functions will fail with a SRFID_RESULT_ASCII_CONNECTION_REQUIRED error code. The interaction with a specific active RFID reader can be terminated by the application via srfidTerminateCommunicationSession API function. When the existing logical communication session is terminated either per application request or due to Bluetooth disconnection the SDK will deliver a corresponding asynchronous notification if the application has subscribed for events of this type. The example on the following page demonstrates establishment of a logical communication session with one of available RFID readers, termination of an existing logical communication session with one of active RFID readers and processing of logical communication session related asynchronous events.
/* subscribe for connectivity related events */ [apiInstance srfidSubsribeForEvents:(SRFID_EVENT_SESSION_ESTABLISHMENT | SRFID_EVENT_SESSION_TERMINATION)];
/* allocate an array for storage of list of available RFID readers */ NSMutableArray *available_readers = [[NSMutableArray alloc] init]; /* retrieve a list of available readers */ [apiInstance srfidGetAvailableReadersList:&available_readers]; if (0 < [available_readers count]) {
/* at least one available RFID reader exists */ srfidReaderInfo *reader = (srfidReaderInfo*)[available_readers objectAtIndex:0]; /* establish logical communication session */
[apiInstance srfidEstablishCommunicationSession:[reader getReaderID]]; } [available_readers release]; /* allocate an array for storage of list of active RFID readers */ NSMutableArray *active_readers = [[NSMutableArray alloc] init]; /* retrieve a list of active readers */ [apiInstance srfidGetActiveReadersList:&active_readers]; if (0 < [active_readers count]) {
/* at least one active RFID reader exists */
srfidReaderInfo *reader = (srfidReaderInfo*)[active_readers objectAtIndex:0];
/* terminate logical communication session */
[apiInstance srfidTerminateCommunicationSession:[reader getReaderID]]; } [active_readers release];
/* EventReceiver class: partial implementation */ @implementation EventReceiver ...
-(void)srfidEventCommunicationSessionEstablished:(srfidReaderInfo*)activeReader { /* print the information about RFID reader represented by srfidReaderInfo object */ NSLog(@"RFID reader has connected: ID = %d name = %@\n", [activeReader getReaderID], [activeReader getReaderName]);
(continued on next page)
Loading...
+ 170 hidden pages